Compare commits

...

3206 Commits

Author SHA1 Message Date
moodler 2079bf0472 Bumped the version up to 1.9.3 2008-10-15 05:43:18 +00:00
moodler ddd1e701ed Updated tags file for 1.9.3 2008-10-15 05:33:16 +00:00
dongsheng 79c29f165b "User Filter: empty filter form fixed, MDL-16880" 2008-10-15 05:29:48 +00:00
moodlerobot 94a5897dcb Updated the 19 build version to 20081015 2008-10-15 02:03:35 +00:00
skodak f06de5f7bc MDL-16881 gradebook: overview report does not ignore hidden grades if user can not view them 2008-10-14 20:32:47 +00:00
dongsheng c77c231e17 "Chat Module, refreshing in safari fixed, MDL-16878" 2008-10-14 08:38:26 +00:00
piers 8dab4c6a9e MDL-16810 - fix typo on function name. thanks to Jason Hardin. Backport to 1.9. 2008-10-14 04:42:06 +00:00
moodlerobot fced6c75ca Updated the 19 build version to 20081014 2008-10-14 02:03:30 +00:00
stronk7 a9c060f742 MDL-16709. Improve scheduling of stats. They only will run if:
- 20 hours has passes since last execution.
- We are in a 4 hours time window since last scheduled time.

Should work for 99.99% os sites (running cron in < 4h intervals)
2008-10-13 23:21:58 +00:00
skodak 435f116fed MDL-14972 groupings and groupmembers only help icons 2008-10-13 22:42:24 +00:00
skodak a35e1c073b MDL-14972 new help files for groupings and groupmembersonly - most of the credit goes to Helen ;-) 2008-10-13 22:40:45 +00:00
stronk7 a1fb0461d1 Adding new setting "statsruntimedays" to configure the number
of days to calculate as max per stats cron invocation. Part of MDL-16709
2008-10-13 21:45:23 +00:00
skodak 8c5ea44aaf MDL-16839 forms: workaround for problematic hard frozen values 2008-10-13 19:38:49 +00:00
nicolasconnault 7b799d0c18 MDL-16568 Hiding courses with showgrades set to 0 2008-10-13 12:34:14 +00:00
jamiesensei 1b19052646 MDL-16842 "Adding group of elements in function lib/formslib.php/repeat_elements() not working correctly" Fixed using fullclone instead of clone now. 2008-10-13 11:50:14 +00:00
nicolasconnault c833e8c3ba MDL-15680 Committing the small refactorings required for the implementation of the weights interface 2008-10-13 07:05:40 +00:00
moodlerobot 4cbdb49e2b Updated the 19 build version to 20081013 2008-10-13 01:59:04 +00:00
moodlerobot 13c7ebc071 Automatic installer.php lang files by installer_builder (20081013) 2008-10-13 01:46:53 +00:00
dongsheng e10b05289e "MDL-16844, making choose very old stats data possible" 2008-10-12 05:45:58 +00:00
moodlerobot df5b42819f Updated the 19 build version to 20081012 2008-10-12 01:51:10 +00:00
moodlerobot eab7d2b9f4 Updated the 19 build version to 20081011 2008-10-11 01:56:05 +00:00
stronk7 f6a81a6698 Detect non-utf8 langs in user edition forms. MDL-16845 MDL-11829 2008-10-10 21:27:42 +00:00
stronk7 e2994aa61f Set the user->lang DB default to en_utf8. MDL-16845 2008-10-10 17:48:18 +00:00
nicolasconnault ca90016b5d MDL-15887 Changed showpercentage to On by default 2008-10-10 08:39:14 +00:00
moodlerobot 3d50601189 Updated the 19 build version to 20081010 2008-10-10 02:01:09 +00:00
poltawski 3c73cdd15d MDL-16205 - fix 'coltroller' typo 2008-10-09 13:17:19 +00:00
poltawski bfeb5ed8c2 MDL-16428 - fix typo 2008-10-09 12:59:27 +00:00
poltawski 664428a5a2 MDL-16461 - default wasn't being set on send for marking due to
incorrect element name

thanks to Brian Gray
2008-10-09 11:22:14 +00:00
mudrd8mz 09c2eb69e2 MDL-16506 Fixed error when deleting the only page in the Lesson. Credit goes to Chris Bertagne for the patch. 2008-10-09 11:04:12 +00:00
poltawski 8b21237fd4 MDL-16434 fix typo in class name "generalbox"
thanks to Joseph Rézeau
2008-10-09 10:51:06 +00:00
scyrma 2efc9eb251 Files/MDL-14231: reverting previous commit. 2008-10-09 07:11:19 +00:00
scyrma bd0185707b Files/MDL-14231: return false on file not found so that the user is warned that the file could not be deleted. 2008-10-09 06:20:17 +00:00
moodlerobot 732866c986 Updated the 19 build version to 20081009 2008-10-09 01:58:31 +00:00
moodlerobot 614ccf9671 Automatic installer.php lang files by installer_builder (20081009) 2008-10-09 01:49:36 +00:00
skodak 32c987cdd6 MDL-15262 using hardFreeze instead of static, because we need this info to b returned from form; the new change* caps are not in effect when adding new courses 2008-10-08 20:48:23 +00:00
skodak 02d4a0bbd8 MDL-15262 adding xss risks to new course update related caps 2008-10-08 20:06:35 +00:00
skodak 39eccdd11a MDL-15262 fixed major regressions for non-legacy roles with course:update enabled 2008-10-08 20:00:22 +00:00
wildgirl b72fd9598e reverted to previous version (changed in error - see MDL-15887) 2008-10-08 19:57:57 +00:00
skodak 25a237a24d MDL-16738 fixed + array operator overriding the same numeric keys - credit goes to Vince Gángó 2008-10-08 19:09:43 +00:00
skodak ebbc87af56 MDL-14840 trimming scale options - the spaces should not be there in the first place (to be addressed later MDL-16832) - credit goes to Mike Corb and Dan Marsden 2008-10-08 18:52:46 +00:00
nicolasconnault 821c604e82 MDL-15262 Instead of removing these form fields entirely, rendering them as static form elements 2008-10-08 13:40:26 +00:00
nicolasconnault 81dc7d8b36 MDL-15262 Added 3 new capabilities without changing defaults, as suggested by Matt. 2008-10-08 13:15:27 +00:00
nicolasconnault 1b52625473 MDL-12198 Fixed ordering of sections 2008-10-08 12:13:39 +00:00
nicolasconnault 783425fc96 MDL-15887 Implemented new setting 2008-10-08 10:56:10 +00:00
jamiesensei 9a4ba0a430 MDL-14676 "In question bank, problem with moodle/question:edit* when do not have moodle/question:move*" Fixed logic for processing submission of question form and also added some validation to check that the user has permissions to move a question. 2008-10-08 10:19:51 +00:00
nicolasconnault 0e64f1234c MDL-10301 Applying language patch 2008-10-08 09:21:14 +00:00
nicolasconnault e177755c7f MDL-10201 Applying patch 2008-10-08 09:07:23 +00:00
nicolasconnault a51c4acab3 MDL-15871 Applying patch 2008-10-08 08:25:03 +00:00
nicolasconnault 92e0ed3ca3 MDL-16784 Adding missing files to 1.9 2008-10-08 08:12:11 +00:00
dongsheng 1c6ec70112 "MDL-11371, The View past chat sessions should not appear if there haven't been any." 2008-10-08 07:51:40 +00:00
skodak af94c62bb4 MDL-16765 - undoing MDL-14303 and adding different fix 2008-10-08 07:15:34 +00:00
dongsheng 44b1830731 MDL-15370, replace some old html and javascript code. 2008-10-08 06:41:55 +00:00
moodlerobot 0dfe475afc Updated the 19 build version to 20081008 2008-10-08 02:03:40 +00:00
fmarier 9c0fbb65c2 mod/label: Fix typo in function name 2008-10-08 01:46:40 +00:00
dongsheng fe7c27f5b4 "MDL-16753, remove single quote in SQL (parameter is not empty)" 2008-10-08 01:18:23 +00:00
skodak 536db61cae MDL-15800 fixed undefined wwwroot problem - credit goes to Charlie Owen 2008-10-07 22:04:51 +00:00
wildgirl 1afb6de73e MDL-13875 multiplicator help file rewording 2008-10-07 10:47:16 +00:00
scyrma 99dfda7a6d Forum/MDL-14558: Prevent users from subscribing or getting subscribed to forums where subscriptions are not allowed. 2008-10-07 08:13:01 +00:00
scyrma e4909c4527 Lesson/MDL-13311: make it possible to have a short answer question using 0 has answer. 2008-10-07 05:13:51 +00:00
jerome 0dd18fa6f6 MDL-15800: clean filelib.php, fix https image link into the edit profil page (weblib.php), and also into the YUI integration (ajaxlib.php) 2008-10-07 02:09:51 +00:00
moodlerobot 2267cd6a20 Updated the 19 build version to 20081007 2008-10-07 01:49:19 +00:00
skodak 460de28701 MDL-15431 User icon and Guest icon mixed up on compressed Course list 2008-10-06 22:29:00 +00:00
skodak d9a17dc900 MDL-16799 - Unit tests failing on events testing - caused by handler caching 2008-10-06 22:07:10 +00:00
wildgirl 623dab16e0 MDL-14830 backup info added to role renaming help file 2008-10-06 15:23:04 +00:00
skodak a1365689d1 MDL-14696 Option to unenrol user from course when assigned to a role at a higher context 2008-10-06 09:28:26 +00:00
andreabix 813a34b3b6 Fixed non compliant HTMl in README 2008-10-06 08:18:21 +00:00
moodlerobot 8756039fac Updated the 19 build version to 20081006 2008-10-06 01:46:31 +00:00
moodlerobot 186328cfcd Updated the 19 build version to 20081005 2008-10-05 01:43:56 +00:00
moodlerobot 0c897809db Automatic installer.php lang files by installer_builder (20081005) 2008-10-05 01:37:51 +00:00
moodlerobot 9cf2c68924 Updated the 19 build version to 20081004 2008-10-04 01:46:16 +00:00
nicolasconnault ef322c9a8b MDL-16784 Removing old YUI 2008-10-03 13:18:25 +00:00
nicolasconnault 8e3a2f3d47 MDL-16784 Added YUI 2.6.0 2008-10-03 13:12:58 +00:00
nicolasconnault c1d9d90e71 MDL-16784 Removing old YUI 2008-10-03 13:08:39 +00:00
nicolasconnault 5c8b0beeaf MDL-16780 Updated README.txt 2008-10-03 07:10:16 +00:00
nicolasconnault 059a33a8f9 MDL-16780 Added HTML/AJAX 2008-10-03 07:09:49 +00:00
nicolasconnault 173ffb591f MDL-16780 Moved JSON class and updated core files 2008-10-03 07:07:32 +00:00
moodlerobot 73e448e0b2 Updated the 19 build version to 20081003 2008-10-03 01:46:08 +00:00
poltawski 776f1020c9 Group overview displays incorrect user count
When there are no users in a group, the count displays
as 1 - MDL-16705
2008-10-02 15:29:57 +00:00
poltawski 9f9539bdea MDL-16729 - typo in 'Statements' 2008-10-02 14:39:13 +00:00
nicolasconnault d292294c97 MDL-16768 Added php version-dependent function definitions so that we can use json_encode() and json_decode() no matter what PHP version the server is running. 2008-10-02 07:40:11 +00:00
tjhunt 587397becf MDL-8547 Time remaining covers question text in the quiz when using secure mode. 2008-10-02 02:45:25 +00:00
moodlerobot 329952a56c Updated the 19 build version to 20081002 2008-10-02 01:54:24 +00:00
moodlerobot 6031cd5187 Updated the 19 build version to 20081001 2008-10-01 01:55:22 +00:00
moodlerobot 394b9fe3f7 Updated the 19 build version to 20080930 2008-09-30 01:46:31 +00:00
stronk7 694db66283 Reviewed breadcrumb in 19_STABLE. Page name was missing. MDL-16331 2008-09-29 22:37:06 +00:00
stronk7 57ee499fc6 Improve DOM detection (due to conficts with old DOM-XML). MDL-15637. Thanks Dariem! 2008-09-29 17:09:42 +00:00
moodlerobot 61e6f7cd92 Updated the 19 build version to 20080929 2008-09-29 01:44:03 +00:00
tjhunt e42effaa67 MDL-16720 The edit icon in the quiz preview screen pops up the edit form in a window that is too small 2008-09-28 09:00:05 +00:00
moodlerobot fc193feda1 Updated the 19 build version to 20080928 2008-09-28 01:47:54 +00:00
moodlerobot eadeac6943 Automatic installer.php lang files by installer_builder (20080928) 2008-09-28 01:41:42 +00:00
moodlerobot da27ea2b48 Updated the 19 build version to 20080927 2008-09-27 01:48:14 +00:00
ethem 55246ce2e3 Authorize.net Trans IDs are changing in October-Will it break moodle? YES
http://moodle.org/mod/forum/discuss.php?d=106626
Backported from HEAD.
2008-09-27 00:40:00 +00:00
stronk7 7dd49286ad Cleaning wiki recent activity URLs. MDL-15896 2008-09-26 09:33:03 +00:00
scyrma a17718ae3e MDL-14092: forcing imported users with a weak password to change it on first login. 2008-09-26 09:10:20 +00:00
scyrma 93586136d2 MDL-16700: Making the password policy be applied all at once.
Also, any policy letting a user use password "password" is not worth using, so removing this check.
2008-09-26 08:08:21 +00:00
tjhunt 6a96e586d6 Correct comment. 2008-09-26 05:55:37 +00:00
tjhunt 1c2c8b0946 MDL-16600 forcedownload broken for file resources. 2008-09-26 05:49:06 +00:00
tjhunt 6852263fc2 XHTML strict. 2008-09-26 05:15:45 +00:00
tjhunt 72737be236 Fix whitespace. 2008-09-26 04:49:32 +00:00
tjhunt d25bee6187 MDL-16683 - add 5/6 as a grading option. 2008-09-26 03:13:30 +00:00
moodlerobot 9bda662574 Updated the 19 build version to 20080926 2008-09-26 01:58:32 +00:00
piers 705154d96f MDL-7068 - SCORM 2004 compliance. Handle cmi.interactions hydration (scorm 1.2 to as well). Backport to 1.9 - rerun compliance test. 2008-09-26 00:35:10 +00:00
stronk7 11d1f8ef69 Protect message settings with sesskey. MDL-16688 2008-09-25 22:31:39 +00:00
skodak 195ccb83ce MDL-15896 undoing last commit, sorry 2008-09-25 21:45:28 +00:00
skodak e990f1b6ad MDL-15896 proper pagename quoting 2008-09-25 21:44:01 +00:00
mudrd8mz d69d156acf MDL-16308 Use default country instead of empty one when some external auth source (LDAP, POP3 etc) is used 2008-09-25 10:09:59 +00:00
peterbulmer 1ec17a6380 MDL-16560 - correct bogus function call
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-25 09:57:33 +00:00
skodak 123b38e44b MDL-15682 fixed isset() test 2008-09-25 07:40:54 +00:00
skodak db12065ba8 MDL-16617 fixed forum name filtering - thanks Mark Nielsen 2008-09-25 07:11:31 +00:00
moodlerobot 9620024032 Updated the 19 build version to 20080925 2008-09-25 01:48:47 +00:00
skodak e6613a931c MDL-15810 whitelist _blank target in htmlpurifier cleaning 2008-09-24 21:38:43 +00:00
skodak 1faa5a441e MDL-16667 security fixes in htmlpurifier 2.1.5 2008-09-24 21:24:14 +00:00
skodak 373f371166 MDL-16598 Admin config setting to make enrolment key hint optional; backported from HEAD 2008-09-24 18:48:08 +00:00
stronk7 4c22bf9766 Substring MSSQL function *requires* 3rd parameter - MDL-16655 2008-09-24 17:26:27 +00:00
skodak ccceaab929 MDL-16365 domain restrictions are now optional when changing email address 2008-09-24 16:58:36 +00:00
scyrma b78c2ceb0c MDL-14489: Make the tag cloud "more extended" in size with small dataset (credits to Matt Gibson) 2008-09-24 08:04:01 +00:00
danmarsden a31878015b MDL-16599 - tidy up error message to be make more sense to the user. merged from HEAD 2008-09-24 07:02:46 +00:00
dongsheng 7f601668fb "MDL-16648, UTF-8 lang file for phpmailer" 2008-09-24 02:40:42 +00:00
moodlerobot c8961f175a Updated the 19 build version to 20080924 2008-09-24 01:52:44 +00:00
moodlerobot 6f48b3d99f Automatic installer.php lang files by installer_builder (20080924) 2008-09-24 01:46:29 +00:00
jerome 3e60778c6f MDL-12297: improvement for fix "assignment view submission" link into "Profil/Activty Report/all logs 2008-09-23 07:46:53 +00:00
jerome 472d8bf771 MDL-12297: fix "assignment view submission" link into "Profil/Activty Report/all logs 2008-09-23 07:21:40 +00:00
tjhunt 3177a65e62 MDL-13894 Impoved fix with less duplicated code, no notices displayed before you get to the 'New settings' screen, and named constants instead of magic numbers. 2008-09-23 05:18:03 +00:00
moodlerobot 9d4d9e2dd4 Updated the 19 build version to 20080923 2008-09-23 01:50:40 +00:00
scyrma 6ae3a5a15b MDL-16602: always display teachers. 2008-09-22 09:08:49 +00:00
dongsheng 5f2c283ad0 "MDL-16554, strip slashes in email, chech the patch, vefired" 2008-09-22 02:30:13 +00:00
moodlerobot 86d9320313 Updated the 19 build version to 20080922 2008-09-22 01:41:08 +00:00
moodlerobot 909ea21954 Automatic installer.php lang files by installer_builder (20080922) 2008-09-22 01:34:55 +00:00
arborrow 582bab05c0 CONTRIB-716 - removing files intended for CONTRIB from 19STABLE 2008-09-21 04:28:23 +00:00
arborrow 666a4a6eb7 CONTRIB-716 - adding the exabis_student_review block. Thanks to Daniel Prieler for contributing the code. 2008-09-21 04:14:49 +00:00
moodlerobot 88d8b37b18 Updated the 19 build version to 20080921 2008-09-21 01:42:10 +00:00
moodlerobot 6f147abf9f Automatic installer.php lang files by installer_builder (20080921) 2008-09-21 01:36:28 +00:00
pichetp edcf824953 MDL-16427 implement the '*' convention as for other questiontypes 2008-09-20 14:07:47 +00:00
pichetp 7564f1d095 merge from HEAD MDL-15358 negative data from datasets between () 2008-09-20 14:01:51 +00:00
moodlerobot 81fc3036eb Updated the 19 build version to 20080920 2008-09-20 01:47:40 +00:00
nicolasconnault 82a82552e3 MDL-16556 Merging from MOODLE_18_STABLE 2008-09-19 20:33:52 +00:00
scyrma eb61a1e83a MDL-16585: fixing query. 2008-09-19 10:02:30 +00:00
thepurpleblob d178d3a213 MDL-16570
Use CDATA sections for text where required. More readable and less error
prone.
2008-09-19 09:58:57 +00:00
nicolasconnault 577fb1cd3b MDL-16556 Reverting commit of test code 2008-09-19 06:22:43 +00:00
nicolasconnault 23375cea89 MDL-16556 Applied Mark Nielsen's patch 2008-09-19 05:32:23 +00:00
scyrma 21f1d5ec78 MDL-16574: improving configgetremoteaddrconf documentation 2008-09-19 03:33:29 +00:00
moodlerobot 2d46263265 Updated the 19 build version to 20080919 2008-09-19 01:46:59 +00:00
stronk7 7f08b6a5d7 Setting some proper zeros. MDL-16565 2008-09-18 16:14:12 +00:00
stronk7 f2e8a852b2 Respect role names for logged students. MDL-16569. Credit goes to Otakar Šprdlík 2008-09-18 15:13:34 +00:00
stronk7 c051d555b9 Fixing typo in my last commit, apologizes. MDL-13894 2008-09-18 14:43:20 +00:00
pichetp 253df4f69b MDL-16427 changing $answer=='*' to $answer ==='*' 2008-09-18 14:37:50 +00:00
stronk7 fe4550bbdf Fixing mistyped cfg var. Backported from HEAD. MDL-13894 2008-09-18 14:13:40 +00:00
scyrma 90ada2fc85 MDL-13894: saving a better source IP, following what the admin wants. 2008-09-18 08:16:01 +00:00
moodlerobot 6982a49147 Updated the 19 build version to 20080918 2008-09-18 01:58:55 +00:00
piers 372c1dd2d7 MDL-7097 - API debug. Add ability to manually poke the SCORM API for 1.2 and 2004. backport 1.9. 2008-09-17 02:11:46 +00:00
moodlerobot a238e79026 Updated the 19 build version to 20080917 2008-09-17 01:50:02 +00:00
moodler 4a8b9598bf MDL-12563 Fixed RSS dates so that they are always GMT 2008-09-16 08:55:43 +00:00
moodlerobot 8b7a64cdb7 Updated the 19 build version to 20080916 2008-09-16 01:59:19 +00:00
stronk7 f7ad0c514a Re-introducing colons in page names + cleaning tabs output. MDL-15896 2008-09-15 16:23:21 +00:00
wildgirl d7739ac095 MDL-16389 meta course help file update 2008-09-15 15:43:29 +00:00
wildgirl a2234cd4da MDL-15314 lang string rewording, thanks to Ray Lawrence 2008-09-15 15:14:52 +00:00
thepurpleblob c43541599b MDL-16508
Changed deprecated error() calls to print_error()
2008-09-15 14:21:02 +00:00
wildgirl e118ad4709 MDL-15134 lang string typo fix, thanks to David Mudrak 2008-09-15 14:18:46 +00:00
wildgirl b9c9531cee MDL-14404 enrolment expiry notification help file text 2008-09-15 14:00:50 +00:00
mudrd8mz 353f7ee981 MDL-16355 Do not set lesson maxgrade to 100 but use the real value without multfactor 2008-09-15 11:56:14 +00:00
mudrd8mz 45794074b5 MDL-16356 Fix capability name 2008-09-15 11:48:06 +00:00
mudrd8mz b0f74680f7 MDL-16441 Display language selection drop-down list at My Moodle page 2008-09-15 11:29:24 +00:00
andreabix 9b82222107 Fixed duplicated style in fw_fonts.css 2008-09-15 08:01:42 +00:00
moodlerobot ef043800b5 Updated the 19 build version to 20080915 2008-09-15 01:53:12 +00:00
moodlerobot 963c69ce92 Updated the 19 build version to 20080914 2008-09-14 01:47:42 +00:00
moodlerobot e888919b90 Updated the 19 build version to 20080913 2008-09-13 01:45:00 +00:00
moodler 2a4d3c9e22 MDL-16473 Removed stylings from user and group images so theme can do it with CSS 2008-09-12 06:54:03 +00:00
tjhunt 9c6389efc5 MDL-15632 Wrong permission in the admin tree defininition mean that people with moodle/role:manage could not define role, and people with moodle/role:assign could not assign system roles. 2008-09-12 05:18:40 +00:00
moodlerobot 7b814e23aa Updated the 19 build version to 20080912 2008-09-12 02:00:25 +00:00
stronk7 28d6c12579 Prevent get_users_by_capability() to retrn deleted users. MDL-16323 2008-09-11 22:14:10 +00:00
skodak 26c2ccbbe5 MDL-16468 never mail deleted users 2008-09-11 19:53:35 +00:00
urs_hunkler f709ee920d add missing icons 2008-09-11 13:16:07 +00:00
moodlerobot 4f9df5e050 Updated the 19 build version to 20080911 2008-09-11 02:06:20 +00:00
peterbulmer 856bbd151c MDL-16378 Changes to lang strings,
remoteappuser should be output as somthing like "Remote Moodle User" or
"Remote Mahara User", or "Remote <application name goes here> User"
2008-09-10 03:21:04 +00:00
moodlerobot af66ad1fe1 Updated the 19 build version to 20080910 2008-09-10 01:58:24 +00:00
tjhunt d37b5e0f44 XHTML Strict! 2008-09-09 02:49:01 +00:00
moodlerobot a24f50ced3 Updated the 19 build version to 20080909 2008-09-09 01:53:50 +00:00
stronk7 d0fd3458fc Fix regression introduced by MDL-12029. Concepts must not be linked by filters. MDL-16372 2008-09-08 23:04:22 +00:00
piers e1a609c888 MDL-11734 - cmi.comments_from_learner not read - write. revamp the handling of array style elements. Backport to 1.9. 2008-09-08 19:50:24 +00:00
stronk7 e644988f14 XHTML-ize course categories list. MDL-16358 2008-09-08 18:13:57 +00:00
stronk7 290d4edd83 Added missing join condition. Credit goes to Colin Chambers. MDL-16385 2008-09-08 14:25:18 +00:00
moodler 023fc40de4 MDL-9683 Fixed error call for when confirm_sesskey() fails in formslib 2008-09-08 02:41:40 +00:00
moodlerobot 68679f923f Updated the 19 build version to 20080908 2008-09-08 01:49:50 +00:00
piers c1d74923f8 MDL-16299 - Javascript error during scorm player load. SCOID should not be populated - TOC figures this out. Backport to 1.9. 2008-09-08 00:34:12 +00:00
peterbulmer 0e2a066e7b MDL-14488 - start sql query with unique field - credit David Monllaó 2008-09-07 06:03:49 +00:00
peterbulmer d74fddbd58 MDL-16301 address issue. 2008-09-07 05:08:35 +00:00
moodlerobot 98e9f88177 Updated the 19 build version to 20080907 2008-09-07 01:47:10 +00:00
moodlerobot afe78ffd24 Updated the 19 build version to 20080906 2008-09-06 01:43:33 +00:00
wildgirl 3f29c452f9 MDL-16050 wrong help file name, thanks to Marty Gilbert and Daniel Miksik for reporting this issue 2008-09-05 13:51:56 +00:00
scyrma 460add2ed7 MDL-16289: Backport of improvement to error reporting in mnet (patch by Penny Leach). 2008-09-05 07:22:11 +00:00
tjhunt a16f9c67fb MDL-12336 Inconsistent naming of the Front page area of the question bank, and the front page context more generally. 2008-09-05 04:05:16 +00:00
tjhunt 67d8f80127 MDL-12814 typo in CSS class name. 2008-09-05 03:38:17 +00:00
moodlerobot 794d10ebe2 Updated the 19 build version to 20080905 2008-09-05 01:53:06 +00:00
moodlerobot 7bafbd170f Updated the 19 build version to 20080904 2008-09-04 01:47:13 +00:00
pichetp 04ed1cebd7 Improving multichoice display MDL-14763 merging from HEAD 2008-09-03 15:22:46 +00:00
dongsheng 3b38133b31 "MDL-16284, fix mismatch tracking state title" 2008-09-03 02:57:33 +00:00
moodlerobot 9d74541b96 Updated the 19 build version to 20080903 2008-09-03 01:50:26 +00:00
piers d6e017d513 MDL-16299 - Javascript error during scorm player load. Ensure SCOID is always populated. Backport 1.9. 2008-09-03 00:41:14 +00:00
skodak 59499faf67 MDL-14826 reverting commit, MDL-16292 solves this issue 2008-09-02 21:45:50 +00:00
jerome 797ccfe11f MDL-12224: preload ratings for the specific user and only for his discussions 2008-09-02 09:32:49 +00:00
tjhunt 5c6522115b MDL-14160 SQL in get_categories_for_contexts does not work on Oracle. Thanks to Adrian Smith and Francois Marier for the fix. 2008-09-02 06:55:40 +00:00
moodlerobot f31e70f7db Updated the 19 build version to 20080902 2008-09-02 01:50:46 +00:00
moodlerobot a86917dcbf Automatic installer.php lang files by installer_builder (20080902) 2008-09-02 01:41:19 +00:00
skodak 693dbaa59c MDL-16029 Added $extralocations in the function print_error 2008-09-01 15:24:40 +00:00
skodak 1096639958 MDL-16292 print_error not backwards compatible with error(get_string('xx', 'moodle')) 2008-09-01 14:54:09 +00:00
wildgirl 32f4075551 MDL-15879 lang string typo fix (thanks to Susan Mangan) 2008-09-01 14:53:11 +00:00
mudrd8mz fe89f05464 MDL-16259 Display overridden role names in course info pop-up box. 2008-09-01 09:30:07 +00:00
skodak aa45463df1 MDL-15218 reset change password secret if somebody just tries to guess it 2008-09-01 08:15:38 +00:00
skodak 7fecd329e0 MDL-15948 inform that curl is required for recaptcha 2008-09-01 07:17:36 +00:00
tjhunt a7faad2559 MDL-15605 - Fix solution SQL syntax for the "question categories must belong to a context that exists" check. 2008-09-01 05:29:32 +00:00
tjhunt 1bc9815601 MDL-15655 - address_in_subnet does not work on 64 bit architectures. Also, we found some other issues with this funtion while diagnosing the problem. 2008-09-01 04:17:52 +00:00
moodlerobot 646ff46ce1 Updated the 19 build version to 20080901 2008-09-01 01:45:26 +00:00
skodak 30e3ea98d5 MDL-15580 detection of broken groups upgrade in 1.8.x -unfortunately this can not be fixed automatically because the courseid field from groups table is gone; adding missing $result into upgrade blocks 2008-08-31 20:59:14 +00:00
skodak 596a16d82a MDL-16283 fixed notice 2008-08-31 20:44:16 +00:00
moodlerobot 9479d167ac Updated the 19 build version to 20080831 2008-08-31 01:42:54 +00:00
moodlerobot 8fdac6dd60 Updated the 19 build version to 20080830 2008-08-30 01:50:30 +00:00
moodler 3dc83fb06c Latest tags file for 1.9 2008-08-29 05:44:36 +00:00
peterbulmer 77e78e7ea7 MDL-16264 Make mnet courses affect course_list block
If a user has mnet courses, these should affect block display in the same way as local courses do.
2008-08-29 04:23:38 +00:00
piers 3318cc4ecf MDL-14492 - Provide feedback to user about redirect delay in loadsco.php. Add sanity checking for scorm_resize() as it tries to set -ve heights if user specifies a small area. Thanks francois. backport 1.9. 2008-08-29 04:13:35 +00:00
moodlerobot af192f2f3d Updated the 19 build version to 20080829 2008-08-29 01:48:26 +00:00
moodlerobot 86d88be296 Automatic installer.php lang files by installer_builder (20080829) 2008-08-29 01:41:39 +00:00
stronk7 e54f616168 Allowing category themes to be reverted to "none". MDL-16152. Credit goes to Caio SBA. 2008-08-28 23:12:44 +00:00
skodak 7584bb8e26 MDL-16238 improved SQL - see tracker for details 2008-08-28 17:42:01 +00:00
mudrd8mz 1d3ab7bb8b MDL-14826 Added missing string 2008-08-28 16:37:52 +00:00
thepurpleblob ca1a880ffd MDL-16198
Blackboard V6+ can now handle the .dat file directly as an option to the .zip file
Some changes needed to recover the original filename.
2008-08-28 13:43:25 +00:00
thepurpleblob cb285deb66 MDL-16221
Specify both width and height for user image
2008-08-28 12:45:11 +00:00
stronk7 9b1294cad1 Improve get_user_courses_bycap() queries. MDL-16209 2008-08-28 12:37:58 +00:00
thepurpleblob 2f26b249c0 MDL-16252
Fixed some notices with essay questions when there is no feedback
2008-08-28 10:57:50 +00:00
thepurpleblob aeb8bb2802 MDL-16251
Changed tests to empty rather than isset to avoid notices when array is set but empty
2008-08-28 10:34:11 +00:00
thepurpleblob a2055ae57f MDL-16250
Added support for Essay type questions
2008-08-28 10:04:23 +00:00
thepurpleblob 9b1e693fa7 MDL-16221
Fixed missing height/width in CSS
2008-08-28 08:34:07 +00:00
tjhunt 1dcdf87bcc MDL-16202 formslib show/hide advanced button does not work with strict XML headers 2008-08-28 07:52:17 +00:00
skodak b67163420f MDL-15420 fixed wrong show submission to others test 2008-08-28 07:22:04 +00:00
jamiesensei f1a022424d MDL-16242 "'Required' does nothing for select fields in customisable user profiles" added an extra option 'Choose...' which is the default if no other default is specified. If the user leaves the select field set to 'Choose...' then the required rule fails and the form does not submit. 2008-08-28 06:46:43 +00:00
tjhunt 791a2be380 MDL-16243 Implement a health-centre check that the question categories are arranged properly in tree structures. 2008-08-28 05:06:39 +00:00
tjhunt 5fb836fdc0 MDL-16204 - On an old site, there were question categories where category->parent went round in a loop. This crashed the upgrade. Change the upgrade code to make it more robust. 2008-08-28 03:24:04 +00:00
tjhunt 568dfa5f06 MDL-16219 - mod/quiz/reviewquestion.php does not call questiontype::get_html_head_contributions. This was missed when implementing MDL-6368. 2008-08-28 02:15:24 +00:00
moodlerobot 3052f51877 Updated the 19 build version to 20080828 2008-08-28 01:52:30 +00:00
tjhunt f863bed701 MDL-8475 - Better handling of blank answer - further changes to make it even more robust. Also, make the same changes to the shortanswer question type that were already made to the numerical question type. 2008-08-28 01:46:47 +00:00
moodlerobot f1ea9b43b7 Automatic installer.php lang files by installer_builder (20080828) 2008-08-28 01:44:51 +00:00
piers bc6931c744 MDL-4746 - Course 01 of the ADL SCORM 1.2 test suite fails on point 4. only set browsed status if the SCO hasn't set a status. Backport 1.9. 2008-08-27 23:27:07 +00:00
danmarsden f9be7c4386 MDL-16137 - clear scorm directory if it already exists merged from HEAD 2008-08-27 22:39:50 +00:00
danmarsden c42d772ffa MDL-10767 - set values of checkboxes correctly merged from HEAD 2008-08-27 22:02:53 +00:00
thepurpleblob a05709ad59 MDL-16221
The height and width are now included in the user's image.
2008-08-27 10:17:01 +00:00
jerome 9e57da557f MDL-16043: manage case when administrator set enrol_remotecoursefield or enrol_remoteuserfield in UPPERCASE 2008-08-27 06:26:49 +00:00
piers c12b948bf2 MDL-4746 - Course 01 of the ADL SCORM 1.2 test suite fails on point 4. gramatical error - thanks Dan. Backport 1.9. 2008-08-27 04:06:31 +00:00
peterbulmer 7fec1d20eb MDL-15942 - separate data escaped for database entry from unescaped data 2008-08-27 03:33:14 +00:00
piers 65edfe910a MDL-4746 - Course 01 of the ADL SCORM 1.2 test suite fails on point 4. Fix cmi.comments, and mastery_score checking. Backport to 1.9. 2008-08-27 02:50:08 +00:00
dongsheng 669ba2b076 "MDL-13413, chat transcripts donot include instructor when using separate groups" 2008-08-27 02:17:37 +00:00
moodlerobot 3e683cfa5f Updated the 19 build version to 20080827 2008-08-27 01:47:10 +00:00
stronk7 a6a1b60ba7 Prevent SQL error when forcing download. MDL-15921 2008-08-26 23:01:12 +00:00
tjhunt 5877f527ac MDL-16201 - The logic in mod/quiz/view.php for when to display a link to the review page was not consistent with the logic in mod/quiz/review.php for when students are allowed to see the review. 2008-08-26 02:32:23 +00:00
moodlerobot 1f9fc718ac Updated the 19 build version to 20080826 2008-08-26 01:52:57 +00:00
iarenaza b29004e366 MDL-16061 Revert incorrect fix for "Remove 'username' from the $moodleattributes array".
Merged from MOODLE_18_STABLE.

The fix is wrong, as it breaks auth_db_sync_users.php and
auth_ldap_sync_users.php at least. No new users are added to Moodle, as the
username is missing from the new user info record.

The fix needs to go into update_user_record() in lib/moodlelib.php to make it
skip the 'username' key, as we really need get_userinfo() to return the
username as part of the user info array.
2008-08-25 22:40:29 +00:00
moodlerobot 919c6cc713 Updated the 19 build version to 20080825 2008-08-25 01:41:15 +00:00
moodlerobot 2c5ec7b773 Automatic installer.php lang files by installer_builder (20080825) 2008-08-25 01:34:47 +00:00
piers def6969944 MDL-15881 - Probable bug: Not able to update SCORM. Backport 1.9. 2008-08-24 23:03:40 +00:00
piers 7e51170aec MDL-16111 - SCORM grade not updated in Grader Report. Include grading by learning objects if status is complete. Backport to 1.9. 2008-08-24 21:13:02 +00:00
iarenaza 6046523272 MDL-15799 LDAP - user data mapping doesn't work. Merged from MOODLE_18_STABLE
The Right Way(tm) to write a LDAP filter is enclosing it in parentheses (see
RFC 4515/2254).
2008-08-24 20:42:57 +00:00
stronk7 bb61ce2e91 Prevent some notices at install. MDL-16188 ; merged from 18_STABLE 2008-08-24 16:31:33 +00:00
moodlerobot a78e7e7139 Updated the 19 build version to 20080824 2008-08-24 01:40:56 +00:00
moodlerobot 20e025b85b Automatic installer.php lang files by installer_builder (20080824) 2008-08-24 01:33:01 +00:00
moodlerobot e6fefabec5 Updated the 19 build version to 20080823 2008-08-23 01:40:58 +00:00
moodlerobot 4d02c666f2 Automatic installer.php lang files by installer_builder (20080823) 2008-08-23 01:34:27 +00:00
piers 5a3e0c81e7 MDL-16111 - SCORM grade not updated in Grader Report. Make sure that lastattempt does not exceed maxattempts. Backport 1.9. 2008-08-22 03:21:52 +00:00
moodlerobot db62c7ecc6 Updated the 19 build version to 20080822 2008-08-22 01:46:37 +00:00
moodlerobot a81c1d5c0b Automatic installer.php lang files by installer_builder (20080822) 2008-08-22 01:39:35 +00:00
piers cf42577a41 MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool - add reference to SCORM, and SCO identifier. backport 1.9. 2008-08-22 01:38:37 +00:00
skodak e45cc3e023 MDL-15716 Tightened dataroot security checks and and 'loud' administrator warning; backported from HEAD 2008-08-21 15:31:09 +00:00
mudrd8mz 0738e88d48 MDL-14326 Remove all course_modules that remained empty (i.e. with instance==0) after the particular restore process. 2008-08-21 11:26:32 +00:00
piers cd74712f30 MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool. Backport to 1.9. remove add_to_log. 2008-08-21 08:30:58 +00:00
piers c11ccc62f3 MDL-16111 - SCORM grade not updated in Grader Report. Thanks John Macklin. Backport 1.9. 2008-08-21 03:16:11 +00:00
danmarsden 20a2a2c49d MDL-14620 - fix link to repository and tidy up using $CFG vars merged from HEAD 2008-08-21 01:54:10 +00:00
moodlerobot d730018ff2 Updated the 19 build version to 20080821 2008-08-21 01:47:33 +00:00
moodlerobot 7c5bfc373a Automatic installer.php lang files by installer_builder (20080821) 2008-08-21 01:39:55 +00:00
piers 2753d9448f MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool. Backport to 1.9. 2008-08-21 00:39:57 +00:00
piers 881e78daa2 file debug.js.php was added on branch MOODLE_19_STABLE on 2008-08-21 00:39:57 +0000 2008-08-21 00:36:12 +00:00
piers 604c88975c MDL-13431 - SCORM results not transferring to Gradebook. Add logging mechanism so that launched URI can be traced. Backport 1.9. 2008-08-20 23:31:37 +00:00
piers ff915d6056 MDL-15859 [PATCH] Fixes for tests of '' on Oracle. Backport 1.9. 2008-08-20 23:06:37 +00:00
piers 88ba1fda5e MDL-13431 - SCORM results not transferring to Gradebook. Add logging mechanism so that SCORM API interaction with Moodle can be traced. Backport 1.9. 2008-08-20 22:32:19 +00:00
piers 27fb07f87b MDL-13431 - SCORM results not transferring to Gradebook. Use the correct method for getting the course object. Backport 1.9. 2008-08-20 22:29:33 +00:00
danmarsden 0e70c9ea14 MDL-14620 - need to check vars are set before using. - adding check so I can include this form type in SCORM - merged from HEAD 2008-08-20 22:00:10 +00:00
whchuang d76df8e848 Minor formatting changes to make the content more consistent. See MDL-15075 2008-08-20 17:40:47 +00:00
whchuang 8820c44464 Fixed MDL-15075. Some mistakes in the help file for category aggregation. 2008-08-20 17:21:46 +00:00
tjhunt 9aa1607364 MDL-15654 Incorrect escaping of HTML in the history table on the review quiz attempt page. 2008-08-20 09:46:03 +00:00
tjhunt 3ac08fe986 MDL-15605 Convert question bank consistency checks described in MoodleDocs (http://docs.moodle.org/en/Development:Question_bank_consistency_check) to health centre checks. 2008-08-20 08:52:54 +00:00
tjhunt 0af8b572e4 MDL-16141 Need an sql_position function to do POSITION(needle IN haystack) on crappy databases. Backported from HEAD. 2008-08-20 08:51:11 +00:00
peterbulmer 4b39d5ca89 MNET-12558 Additional commenting and variable name change 2008-08-20 06:00:08 +00:00
danmarsden bc7cf284a9 MDL-16113 add warning to Scorm modedit page if slasharg is disabled. merged from HEAD 2008-08-20 02:25:23 +00:00
moodlerobot 3d1dbf4edb Updated the 19 build version to 20080820 2008-08-20 01:50:54 +00:00
skodak 2d843ded37 MDL-15819 bumping version, needed for updated risks of quiz caps 2008-08-19 21:39:05 +00:00
skodak 648c9db090 MDL-15819 bumping main version, needed for updated risks of question caps 2008-08-19 21:37:44 +00:00
tjhunt 40da47484d SCORM module XHTML strict fixes. 2008-08-19 06:59:23 +00:00
tjhunt faa479918c Fix up XHTML strick breakage introduce during the fix for MDL-13478. 2008-08-19 05:17:14 +00:00
tjhunt ab1efe3442 MDL-14643 - Revert the hugely umpopular change from MDL-10841. 2008-08-19 02:34:16 +00:00
moodlerobot 20139dedfd Updated the 19 build version to 20080819 2008-08-19 01:46:02 +00:00
moodlerobot 9e1feba326 Automatic installer.php lang files by installer_builder (20080819) 2008-08-19 01:38:28 +00:00
stronk7 9f00b6e8b4 Avoid "some" ra's duplicates. MDL-14817 2008-08-18 22:37:18 +00:00
skodak 4be2bb4847 MDL-16060 use old style slasharguments file.php link when launching scorm packages; merged from HEAD 2008-08-18 20:57:37 +00:00
skodak e26f73219a MDL-16108 force autocomplete off for unmaskable password fields 2008-08-18 20:38:26 +00:00
skodak 12ffbe6f65 MDL-16108 force autocomplete off for unmaskable password fields; merged from MOODLE_18_STABLE 2008-08-18 20:20:42 +00:00
stronk7 38a1e2bc67 Making some accesslib queries cross-db. Avoid using DISTINCT clauses on TEXT fields. MDL-16034 2008-08-18 18:35:43 +00:00
jerome 3d3bd448b1 MDL-MDL-12333: display custom field in categories box on the signup page 2008-08-18 08:23:03 +00:00
moodlerobot cd80e2619c Updated the 19 build version to 20080818 2008-08-18 01:41:05 +00:00
moodlerobot a136accca4 Automatic installer.php lang files by installer_builder (20080818) 2008-08-18 01:33:40 +00:00
skodak 6faef753b8 MDL-16003 changing to new adminroot style - thanks Tatsuya Shirai 2008-08-17 22:52:52 +00:00
skodak c1726a573b MDL-16024 adding spam risk to database approve capability 2008-08-17 22:47:47 +00:00
skodak 71f94d26fe MDL-15586 fixed undefined $course; backported from HEAD 2008-08-17 22:41:19 +00:00
skodak e80eec503e MDL-16051 fixed confirmed string in user filters 2008-08-17 22:33:04 +00:00
skodak d38c50ff6f MDL-16066 fixed apache log typo - thanks Neil Streeter 2008-08-17 22:22:51 +00:00
skodak 9aff1a51d0 MDL-16085 fixed typo -thanks John Ryan; merged from HEAD 2008-08-17 20:18:52 +00:00
moodlerobot 0ff122d12d Updated the 19 build version to 20080817 2008-08-17 01:37:11 +00:00
moodlerobot 5237fd4012 Updated the 19 build version to 20080816 2008-08-16 01:46:51 +00:00
pichetp 605d0b0c49 better filtering of null answers MDL-8475 merged from HEAD 2008-08-15 11:22:35 +00:00
iarenaza 1e6da87629 MDL-16061 Remove 'username' from the $moodleattributes array.
It doesn't make sense at all (username is not part of the externally mapped
fields) and produces a notice that breaks HTTP headers with debugging enabled.
2008-08-15 11:21:48 +00:00
tjhunt 865d83b3ca DEVELOPER_DEBUG messages to help you diagnose broken prev/next links in XMDBD files. 2008-08-15 11:09:51 +00:00
jamiesensei 64b0c54d0f MDL-16041 "Grade of new tests are zero!" no longer displaying graphs of grades for ungraded quizzes. 2008-08-15 10:28:16 +00:00
tjhunt 37cd57495b MDL-16056 - Aiken format should treat input as plain text, and so escape HTML special characters. 2008-08-15 03:13:39 +00:00
danmarsden 4700ef26f3 MDL-16052 deleting responses using view.php not working. merged from HEAD 2008-08-15 01:49:26 +00:00
moodlerobot 40a134e075 Updated the 19 build version to 20080815 2008-08-15 01:43:58 +00:00
piers c073b133a4 MDL-13904 Scorm structure isn't respected after an update of the package. Incorrectly named table in a delete. backport 1.9. 2008-08-15 01:09:26 +00:00
piers 45477f2cc0 MDL-16055 PHP warning when creating new scorm activity. backport 1.9. 2008-08-15 00:18:11 +00:00
peterbulmer 9bf3e1887d MDL-16021 dont force mnethost restriction forloading user data based on id 2008-08-14 23:45:32 +00:00
jerome 2c352e9940 MDL-12224: complete activity report: fix warning display + display the rating 2008-08-14 13:01:16 +00:00
pichetp 95c8fddc7d better validation of null answers MDL-8475 merged from HEAD 2008-08-14 11:39:03 +00:00
jerome 0f4a1b7db8 MDL-16043: ensures cross-db: add lowercase conversion for every database fieldname 2008-08-14 11:26:47 +00:00
jerome 36cf4a27de MDL-15175: ensures cross-db: add a lowercase conversion for the username 2008-08-14 09:44:13 +00:00
tjhunt 1c45f77669 MDL-14979 - Remove the obsolete quizfile.php and associated code. This has not been used since Moodle 1.5. 2008-08-14 03:48:12 +00:00
moodlerobot f02087ef36 Updated the 19 build version to 20080814 2008-08-14 01:48:43 +00:00
peterbulmer 5edabc2b82 MDL-15933 Require jump destination MNET peer to be non-deleted.
Also require landing source MNET peer to be non-deleted.
2008-08-13 23:31:01 +00:00
piers 4c15e91188 MDL-13904 Scorm structure isn't respected after an update of the package. This is a large change to the handling of SCORM package update - all SCOes are issued with a new id, and all references to the old ones are deleted. The scorm_scoes_track data is preserved by being reattached to the new SCO ids (unless they have been deleted). backport to 1.9. 2008-08-13 22:47:33 +00:00
piers 8b07448215 MDL-11188 SCORM module does not respect "prerequisites" like it used to. MDL-12342 & signs in CDATA sections are imported as &amp;. This is a rewrite of the prerequisite handling. backport to 1.9. 2008-08-13 22:40:24 +00:00
piers b79105c4a2 MDL-14492 Provide feedback to user about redirect delay in loadsco.php. Add lang text for please wait. backport 1.9. 2008-08-13 22:28:03 +00:00
tjhunt 20d50e975c MDL-15819 - Review the RISK_XXX flags on all quiz and question capabilites. 2008-08-13 07:05:58 +00:00
jerome 7a12ac92c0 MDL-15175: fix sync with external Oracle database 2008-08-13 06:31:45 +00:00
tjhunt 9ef749413f Remove broken unit test. 2008-08-13 06:21:49 +00:00
tjhunt 5929f17c0e Correct a URL in a comment. 2008-08-13 05:27:51 +00:00
tjhunt 930fbd3b5d MDL-12797 - Site-wide quiz default time-limit was not working. The default was being used, but the enabled state was not being initialised correctly for the form field. 2008-08-13 03:17:59 +00:00
moodlerobot e697e660da Updated the 19 build version to 20080813 2008-08-13 01:46:09 +00:00
skodak 8f184c6d5b MDL-15994 fix typo in choice/lib.php backported from HEAD 2008-08-12 21:27:01 +00:00
tjhunt 9e724aa8ed MDL-15973 - Errors from manual grading report on Postgres. Actually, this was already fixed in HEAD, so I am just backporting an already-working fix. 2008-08-12 07:27:50 +00:00
tjhunt b0d5723c11 Found while testing MDL-12392 - it should not be considered an error if a quiz does not contain any essay questions. Packporting this return true from HEAD. 2008-08-12 06:07:13 +00:00
tjhunt 1f64775a99 XHTML strrrict! 2008-08-12 04:11:56 +00:00
moodlerobot f512cbdb9c Updated the 19 build version to 20080812 2008-08-12 01:50:12 +00:00
moodlerobot 698c1c93f1 Automatic installer.php lang files by installer_builder (20080812) 2008-08-12 01:43:42 +00:00
danmarsden e5cba21fb3 MDL-14913 check vars b4 using merged from HEAD 2008-08-11 05:10:44 +00:00
danmarsden 6a85d31fab MDL-15328 - hide grade category drop down. - merged from HEAD 2008-08-11 04:49:57 +00:00
danmarsden fec92d9c3e MDL-14655 fix display of Choice when "show results after closed" is selected. merged from HEAD 2008-08-11 04:22:58 +00:00
moodlerobot 3ca11c32d2 Updated the 19 build version to 20080811 2008-08-11 01:19:18 +00:00
moodlerobot 3e81e45b43 Automatic installer.php lang files by installer_builder (20080811) 2008-08-11 01:13:04 +00:00
piers c0b72b725c MDL-14492 Provide feedback to user about redirect delay in loadsco.php. backport to 1.9. 2008-08-10 22:33:49 +00:00
moodlerobot eb8fa0ce5c Updated the 19 build version to 20080810 2008-08-10 01:37:26 +00:00
moodlerobot 0e3da7abb0 Updated the 19 build version to 20080809 2008-08-09 01:40:02 +00:00
moodlerobot b7a957168c Automatic installer.php lang files by installer_builder (20080809) 2008-08-09 01:33:48 +00:00
moodlerobot f306e3fa67 Updated the 19 build version to 20080808 2008-08-08 01:45:30 +00:00
moodlerobot 3ea5e9eb8b Automatic installer.php lang files by installer_builder (20080808) 2008-08-08 01:38:34 +00:00
stronk7 8c93a426ef Complete inline help about smtp hosts. Credit goes to Anthony. MDL-15923 2008-08-07 22:55:12 +00:00
stronk7 ebb5b6b760 Allow font-family "protocol" to avoid kses cleaning it. MDL-15963 2008-08-07 22:36:33 +00:00
danmarsden 42f42ad0bb MDL-15967 - must use full php tags, not shortags - thanks Urs merged from head 2008-08-07 20:47:20 +00:00
stronk7 fc9d285a62 Fixed copy&paste error. Credit goes to Sergio Rabellino.
http://moodle.org/mod/forum/discuss.php?d=102933
2008-08-07 17:09:27 +00:00
dongsheng f20c125374 MDL-11789, apply $CFG->filelifetime in send_file function. 2008-08-07 06:09:18 +00:00
moodlerobot 90ffc0342c Updated the 19 build version to 20080807 2008-08-07 01:49:06 +00:00
moodlerobot 61bad674a3 Automatic installer.php lang files by installer_builder (20080807) 2008-08-07 01:42:01 +00:00
piers d86a0382de MDL-10425 and MDL-12872 Firefox bugs String() handling on replace. enhanced rege xfor CMI data types. MDL-8193 Incorrect handling of quotes in SetValue processing - recoded so that it escapes all values passed from tracks. backport to 1.9. 2008-08-06 23:52:27 +00:00
stronk7 0616b1fba2 Fixing typo causing restore not to work within 19_STABLE branch (BC). MDL-15282 2008-08-06 16:41:48 +00:00
skodak 3b20cc2f8f MDL-15941 block view permissions override regression fixed, merged from HEAD 2008-08-06 05:08:35 +00:00
piers ec88010b2e MDL-15950 MDL-15640 MDL-15943 - SCORM player.php not inserting footer, Showing SCORM participation report. (thanks Urs Hunkler and Mitsuhiro Yoshida). Warning are displayed in a SCORM activity (thanks Dan). Backport to 1.9. 2008-08-06 05:06:00 +00:00
scyrma d024e361f9 MDL-15345: Fix in sql query, for postgres. 2008-08-06 02:35:19 +00:00
moodlerobot 3dc9ef3784 Updated the 19 build version to 20080806 2008-08-06 01:48:44 +00:00
moodlerobot 86031c9964 Automatic installer.php lang files by installer_builder (20080806) 2008-08-06 01:40:23 +00:00
tjhunt 0c5c51bdc5 MDL-15583 - Broken link in Item analysis report. Fix thanks to John T. Macklin in MDL-15940. 2008-08-05 17:45:50 +00:00
thepurpleblob d39d9a4df2 MDL-15949
enrol_logtolocation not defined in config_form()
2008-08-05 14:16:08 +00:00
moodlerobot 7e3bebda6d Updated the 19 build version to 20080805 2008-08-05 01:42:39 +00:00
moodlerobot 056f34bc58 Automatic installer.php lang files by installer_builder (20080805) 2008-08-05 01:35:28 +00:00
stronk7 f98a72984d Make custom checks BC, so any test about future releases doesn't fail
with error it the file and/or function is missing (highly possible). MDL-15939 ; backported from HEAD
2008-08-05 00:23:09 +00:00
stronk7 b0138cb939 Deleting one env test not needed for 2.0 (backporting from HEAD) 2008-08-04 23:01:20 +00:00
stronk7 1b9cd29cbe Backporting latest modifications of environment.xml in HEAD to 19_STABLE. MDL-15349 and sqllite 2.0 2008-08-04 22:42:52 +00:00
stronk7 fe6247bb36 Added missing curlrequired string. MDL-15349 2008-08-04 21:16:27 +00:00
skodak cc22d069c7 MDL-15928 switched to zip PHP extensions in HEAD - adding to env test 2008-08-04 16:46:03 +00:00
thepurpleblob 3da5676e18 MDL-15885
QTI fixes from Niall Barr
2008-08-04 10:07:54 +00:00
moodler 4cc1194951 Bumped to an integer. 2008-08-04 08:57:14 +00:00
moodler 8bea916e87 MDL-15926 JUst show one scale when required 2008-08-04 07:00:08 +00:00
moodlerobot d33a0a8cdd Updated the 19 build version to 20080804 2008-08-04 01:45:04 +00:00
peterbulmer 73c73b1119 MDL-12558 modify emails as they are being sent
replace urls in-place to direct users to their idp first
(1.9 edition - Moodle-Moodle sso only)
2008-08-03 23:28:59 +00:00
piers e0aa018ccf MDL-14457 SCORM module creating extra windows when opening module in a new window. Backport to 1.9 (thanks Jo Matthews). 2008-08-03 22:17:16 +00:00
stronk7 c2c2f12d41 Allow multiple SMTP hosts or host:port to be defined in $CFG->smtphosts. MDL-15923 2008-08-03 21:13:20 +00:00
moodlerobot 602bf00fd1 Updated the 19 build version to 20080803 2008-08-03 01:37:23 +00:00
gbateson cba660bfe6 MDL-15811 fix quotes: width=240" -> width="240" 2008-08-02 21:30:37 +00:00
moodlerobot 766624537d Updated the 19 build version to 20080802 2008-08-02 01:40:50 +00:00
moodlerobot e37d20268d Automatic installer.php lang files by installer_builder (20080802) 2008-08-02 01:34:04 +00:00
skodak 95e1b81938 MDL-15410 Require PHP 5.2.4 instead of 5.2.0 in HEAD because PHP 5.2.0 has many known problems :-( 2008-08-01 10:08:58 +00:00
piers 5b3e0dd963 MDL-14902 Missing column 'whatgrade' in prefix_scorm table. Is a DB patch (thanks Hans de Zwart). backport 1.9. 2008-08-01 04:30:45 +00:00
moodlerobot 0301220044 Updated the 19 build version to 20080801 2008-08-01 01:42:52 +00:00
piers 2e11eb2fed MDL-15899 JavaScript error In IE7 when opening SCORM content in a new window. Fix spaces in popup name for fussy IE. backported to 1.9. 2008-07-31 22:31:04 +00:00
thepurpleblob 5996538474 MDL-15148
In fact, getting IP lookup too from MDL-15008 by Lue Hudson.
2008-07-31 15:00:35 +00:00
thepurpleblob fe4cb39742 MDL-15148
When replacing key pair, lookup wwwroot again (it might have been changed)
2008-07-31 14:53:27 +00:00
mchurch fe67442c84 MDL-15896 - Clean 'page' and 'q' parameters to only allow normal page name characters. 2008-07-31 14:02:34 +00:00
moodler 4fb8cf0b0e MDL-15892 Added some phpdocs to explain the module parameter better 2008-07-31 07:35:59 +00:00
moodler 3fac08373c MDL-15892 Improved get_string - it can now handle paths as the module like 'mod/forum' or 'grade/import/txt' and will look in the right file automatically (eg forum.php and gradeimport_txt.php) 2008-07-31 07:23:35 +00:00
moodlerobot 305d28fc37 Updated the 19 build version to 20080731 2008-07-31 01:51:50 +00:00
skodak 484b866963 MDL-15890 removing public function - breaks PHP4, sorry! 2008-07-30 19:26:17 +00:00
moodlerobot 247b827045 Updated the 19 build version to 20080730 2008-07-30 01:40:59 +00:00
wildgirl c9332cc8ee MDL-11844 lang string small rewording 2008-07-29 14:23:58 +00:00
sam_marshall 5f6512446e MDL-15875: Missing break; in switch 2008-07-29 13:33:05 +00:00
wildgirl db1d22711d MDL-15846 lang string small rewording 2008-07-29 12:43:46 +00:00
moodlerobot 40513431f1 Updated the 19 build version to 20080729 2008-07-29 01:42:48 +00:00
piers 251b51c948 MDL-9378 New visualisation for SCORM - modify CSS class names to make them more specific. sorry to commit so close to review day, just fixing a regression - 1.9. 2008-07-29 01:25:20 +00:00
piers 8334db6c52 MDL-11892 JavaScript error on SCORM tree list - bapckport to 1.9 for AICC. 2008-07-28 22:42:57 +00:00
fmarier 50c995e402 mod/scorm/help: fix typo (extra space before period) 2008-07-28 06:31:46 +00:00
moodler 23ab305b99 MDL-15841 Removed the default safe overrides for new installs (MDL-8521) 2008-07-28 03:11:35 +00:00
moodlerobot d7cff10ece Updated the 19 build version to 20080728 2008-07-28 01:41:39 +00:00
moodlerobot ac273a80fb Automatic installer.php lang files by installer_builder (20080728) 2008-07-28 01:35:39 +00:00
piers 58afb04bc7 MDL-9378 New visualisation for SCORM - back ported to 1.9. 2008-07-28 00:44:49 +00:00
piers 17b03a9310 MDL-11137 Unable to locate API error - add check for empty array from DB interface (ksort complains) - backport to 1.9. 2008-07-27 21:23:26 +00:00
danmarsden be8dce4263 MDL-15747 typo merged from HEAD 2008-07-27 20:22:07 +00:00
moodlerobot d4574cfd9a Updated the 19 build version to 20080727 2008-07-27 01:37:49 +00:00
stronk7 fb7eddbe0e Fix A tag regex searching. MDL-15842 2008-07-26 23:03:24 +00:00
stronk7 710c437386 Fix A tag regex searching. MDL-15842 2008-07-26 22:11:33 +00:00
skodak f6e0e6860f MDL-15846 add option to prevent course welcome emails + support for searching in enrolment page; backported from HEAD 2008-07-26 16:51:11 +00:00
skodak 054fabfbb8 MDL-11844 new option for conditional stripping of tags from activity names; backported from HEAD 2008-07-26 15:17:03 +00:00
skodak a6017978a2 MDL-13353 Course page does not validate when a lable containing <p> tags is hidden 2008-07-26 11:35:23 +00:00
skodak f0217b9883 MDL-5018 added thead and tfoot to allowed tags 2008-07-26 11:27:48 +00:00
moodlerobot 15fe5d855b Updated the 19 build version to 20080726 2008-07-26 01:41:15 +00:00
skodak 25db6e1545 MDL-15823 format_string() improvements 2008-07-25 22:43:08 +00:00
nicolasconnault c43b787bd0 MDL-14383 Updated to YUI 2.5.2 2008-07-25 11:13:15 +00:00
nicolasconnault 564701314a file layout-core.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:09 +0000 2008-07-25 10:50:25 +00:00
nicolasconnault 0c590542b8 file uploader.swf was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:45 +0000 2008-07-25 10:50:24 +00:00
nicolasconnault c225616d65 file charts.swf was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:07 +0000 2008-07-25 10:50:24 +00:00
nicolasconnault 17a80d2794 file profilerviewer-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:35 +0000 2008-07-25 10:50:22 +00:00
nicolasconnault 143e492402 file profilerviewer-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:36 +0000 2008-07-25 10:50:22 +00:00
nicolasconnault 18a086751a file profilerviewer-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:36 +0000 2008-07-25 10:50:22 +00:00
nicolasconnault e27bbbc985 file imagecropper-core.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:08 +0000 2008-07-25 10:50:22 +00:00
nicolasconnault e8ebd7b421 file imagecropper-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:01 +0000 2008-07-25 10:50:21 +00:00
nicolasconnault 129915ba8f file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:01 +0000 2008-07-25 10:50:21 +00:00
nicolasconnault da3972a185 file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:35 +0000 2008-07-25 10:50:21 +00:00
nicolasconnault e1b5751918 file simpleeditor-core.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:06 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault 40b4e7b4bc file selector-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:26 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault 78b6fd22c2 file selector-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:26 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault fc17c54077 file selector-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:26 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault de077f1dd4 file resize-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:45 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault 3425aa1e2c file imagecropper-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:01 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault 7d006e9a5e file imagecropper-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:01 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault 8621ab7126 file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:25 +0000 2008-07-25 10:50:20 +00:00
nicolasconnault da80ed628e file resize-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:44 +0000 2008-07-25 10:50:19 +00:00
nicolasconnault 72771dc3cf file resize-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:44 +0000 2008-07-25 10:50:19 +00:00
nicolasconnault cc3509a6ec file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:44 +0000 2008-07-25 10:50:19 +00:00
nicolasconnault 757ec59ed3 file colorpicker.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:32 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault 03a3755549 file colorpicker-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:32 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault 3e9d9efdad file colorpicker-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:31 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault e9f830c53d file charts-experimental.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:49 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault 5f88d883e9 file charts-experimental-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:49 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault 0e89101111 file charts-experimental-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:49 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault 07bde17a1c file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:49 +0000 2008-07-25 10:50:17 +00:00
nicolasconnault 3caa54fc84 file reset-fonts.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:53 +0000 2008-07-25 10:50:15 +00:00
nicolasconnault e8757d27e7 file calgrad.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:27 +0000 2008-07-25 10:50:15 +00:00
nicolasconnault 44ede51ffc file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:53 +0000 2008-07-25 10:50:15 +00:00
nicolasconnault 6d7cfc2957 file history.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:39 +0000 2008-07-25 10:50:14 +00:00
nicolasconnault bdd4d7abd6 file history-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:39 +0000 2008-07-25 10:50:14 +00:00
nicolasconnault 9dd0c1416e file history-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:39 +0000 2008-07-25 10:50:14 +00:00
nicolasconnault 526db10dcf file uploader-experimental.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:42 +0000 2008-07-25 10:50:13 +00:00
nicolasconnault 8b83d56614 file uploader-experimental-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:43 +0000 2008-07-25 10:50:13 +00:00
nicolasconnault e81145d832 file uploader-experimental-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:43 +0000 2008-07-25 10:50:13 +00:00
nicolasconnault d1362aa48f file imagecropper.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:57 +0000 2008-07-25 10:50:13 +00:00
nicolasconnault 4be67e14c6 file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:43 +0000 2008-07-25 10:50:13 +00:00
nicolasconnault 0530079e3a file imagecropper-skin.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:57 +0000 2008-07-25 10:50:12 +00:00
nicolasconnault 1efa5d19b2 file simpleeditor-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:18 +0000 2008-07-25 10:50:11 +00:00
nicolasconnault acbddb8c0e file simpleeditor-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:17 +0000 2008-07-25 10:50:11 +00:00
nicolasconnault ee92e22009 file simpleeditor-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:17 +0000 2008-07-25 10:50:11 +00:00
nicolasconnault 5d82602a1a file cookie-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:19 +0000 2008-07-25 10:50:08 +00:00
nicolasconnault 17a4761c51 file cookie-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:19 +0000 2008-07-25 10:50:08 +00:00
nicolasconnault e2c4404f70 file cookie-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:19 +0000 2008-07-25 10:50:08 +00:00
nicolasconnault 1de76b3cdf file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:19 +0000 2008-07-25 10:50:08 +00:00
nicolasconnault 3a855b0805 file imageloader.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:34 +0000 2008-07-25 10:50:07 +00:00
nicolasconnault a8bb07dc1a file imageloader-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:34 +0000 2008-07-25 10:50:07 +00:00
nicolasconnault 777f89e896 file imageloader-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:34 +0000 2008-07-25 10:50:07 +00:00
nicolasconnault dec437a979 file profiler-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:40 +0000 2008-07-25 10:50:06 +00:00
nicolasconnault f89e53a5dd file profiler-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:40 +0000 2008-07-25 10:50:06 +00:00
nicolasconnault 468c0855cc file profiler-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:40 +0000 2008-07-25 10:50:06 +00:00
nicolasconnault 19b630187c file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:40 +0000 2008-07-25 10:50:06 +00:00
nicolasconnault c0d325e7a1 file transparent.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:25 +0000 2008-07-25 10:50:03 +00:00
nicolasconnault af4676fb38 file yuiloader-dom-event.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:04 +0000 2008-07-25 10:50:00 +00:00
nicolasconnault cfd196d5ae file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:03 +0000 2008-07-25 10:50:00 +00:00
nicolasconnault 70b194e93c file yuitest_core.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:47 +0000 2008-07-25 10:49:59 +00:00
nicolasconnault 7786b00b22 file yuitest-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:47 +0000 2008-07-25 10:49:59 +00:00
nicolasconnault c88e78bb40 file get.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:55 +0000 2008-07-25 10:49:59 +00:00
nicolasconnault 0d130bb286 file get-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:54 +0000 2008-07-25 10:49:59 +00:00
nicolasconnault 6bfdc81f0e file get-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:55 +0000 2008-07-25 10:49:59 +00:00
nicolasconnault b63e566b45 file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:55 +0000 2008-07-25 10:49:59 +00:00
nicolasconnault 82dccafe5a file yuitest_core-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:46 +0000 2008-07-25 10:49:58 +00:00
nicolasconnault 26c3caf6a3 file yuitest_core-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:47 +0000 2008-07-25 10:49:58 +00:00
nicolasconnault 4d689d16bb file yuitest.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:47 +0000 2008-07-25 10:49:58 +00:00
nicolasconnault f658f56f47 file yuitest-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:48 +0000 2008-07-25 10:49:58 +00:00
nicolasconnault 31fdf7577a file treeview-menu.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:38 +0000 2008-07-25 10:49:58 +00:00
nicolasconnault c85e20f0ba file sprite-menu.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:38 +0000 2008-07-25 10:49:58 +00:00
nicolasconnault f312612a38 file menuitem_submenuindicator_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:41 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault b53abb6ecc file menuitem_submenuindicator.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:42 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault 122d408f7b file menuitem_checkbox_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:42 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault 002d676529 file menuitem_checkbox.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:42 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault 55bc41f9a2 file menubaritem_submenuindicator_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:41 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault bd697aba1d file menubaritem_submenuindicator.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:42 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault 5a42d736b7 file layout_sprite.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:05 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault 8509497ed8 file layout.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:05 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault 9594faa9c6 file layout-skin.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:14:05 +0000 2008-07-25 10:49:57 +00:00
nicolasconnault a00891dd9b file button.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:53 +0000 2008-07-25 10:49:56 +00:00
nicolasconnault 772b2bd4b1 file button-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:53 +0000 2008-07-25 10:49:56 +00:00
nicolasconnault dbd92929dd file button-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:54 +0000 2008-07-25 10:49:56 +00:00
nicolasconnault 659bbcfec4 file layout-beta.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:52 +0000 2008-07-25 10:49:55 +00:00
nicolasconnault 0720542e52 file layout-beta-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:52 +0000 2008-07-25 10:49:55 +00:00
nicolasconnault 69744ce1e3 file layout-beta-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:51 +0000 2008-07-25 10:49:55 +00:00
nicolasconnault a8a400a4e3 file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:52 +0000 2008-07-25 10:49:55 +00:00
nicolasconnault a802fb0865 file wait.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:57 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault a51609599b file resize-core.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:52 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault d642645b37 file profilerviewer.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:58 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault 6e0a143abd file layout_sprite.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:56 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault c2a4193bd8 file header_background.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:58 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault 8cea7b6440 file desc.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:57 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault f098c2e1cd file asc.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:58 +0000 2008-07-25 10:49:54 +00:00
nicolasconnault 8b82876aa7 file resize.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:56 +0000 2008-07-25 10:49:53 +00:00
nicolasconnault fa13546769 file resize-skin.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:56 +0000 2008-07-25 10:49:53 +00:00
nicolasconnault cb0d52c9c9 file menuitem_submenuindicator_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:30 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 7230a16b43 file menuitem_submenuindicator.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:31 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 8f56f260fc file menuitem_checkbox_selected.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:29 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 2f2205fdc6 file menuitem_checkbox.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:30 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 0b47114700 file menubaritem_submenuindicator_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:29 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 69822d5b63 file menubaritem_submenuindicator.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:28 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 347dae0027 file menu_up_arrow.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:31 +0000 2008-07-25 10:49:49 +00:00
nicolasconnault 1b91f2ab8b file menuitem_submenuindicator_selected.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:31 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 8e2ea1ba39 file menuitem_checkbox_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:29 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault a9b8a21de5 file menubaritem_submenuindicator_selected.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:31 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault ad6e03efb0 file menu_up_arrow_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:30 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 2b39f6e384 file menu_down_arrow_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:28 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 4ca80babe5 file menu_down_arrow.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:29 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 65ac424b84 file json.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:18 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 1cb6492da5 file json-min.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:18 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 98273acc63 file json-debug.js was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:19 +0000 2008-07-25 10:49:48 +00:00
nicolasconnault 8e4865cf94 file menuitem_submenuindicator_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:20 +0000 2008-07-25 10:49:47 +00:00
nicolasconnault 1a0c5f3b0d file menuitem_checkbox_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:23 +0000 2008-07-25 10:49:47 +00:00
nicolasconnault 2065c05b07 file README was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:18 +0000 2008-07-25 10:49:47 +00:00
nicolasconnault 371944075f file transparent.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:20 +0000 2008-07-25 10:49:46 +00:00
nicolasconnault e97f0e5420 file profilerviewer.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:21 +0000 2008-07-25 10:49:46 +00:00
nicolasconnault 208b652cd3 file menubaritem_submenuindicator_disabled.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:20 +0000 2008-07-25 10:49:46 +00:00
nicolasconnault 4a8d746b4f file imagecropper.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:22 +0000 2008-07-25 10:49:46 +00:00
nicolasconnault 4ad6881a2d file simpleeditor.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:21 +0000 2008-07-25 10:49:45 +00:00
nicolasconnault 5d6a449f7e file resize.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:21 +0000 2008-07-25 10:49:45 +00:00
nicolasconnault 2d7434c3bc file menuitem_submenuindicator.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:22 +0000 2008-07-25 10:49:45 +00:00
nicolasconnault 054de985c5 file wait.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:22 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 48002b23c2 file menuitem_checkbox.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:22 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 7a0dc51192 file menubaritem_submenuindicator.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:23 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 31741dbe6d file layout_sprite.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:24 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 604cef521b file layout.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:23 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 8026517377 file header_background.png was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:23 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 9b1905cc2b file desc.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:22 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 9fd99f387a file asc.gif was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:20 +0000 2008-07-25 10:49:44 +00:00
nicolasconnault 5adafb4e17 file simpleeditor.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:35 +0000 2008-07-25 10:49:43 +00:00
nicolasconnault 706bffc940 file simpleeditor-skin.css was added on branch MOODLE_19_STABLE on 2008-07-25 11:13:35 +0000 2008-07-25 10:49:43 +00:00
piers 8fdfb20a90 MDL-11137 Unable to locate API error - remove comment code with bad characters. backport to 1.9. 2008-07-25 02:32:38 +00:00
piers bf3fc937f6 MDL-11137 Unable to locate API error - force a sort order on the cmi elements, and ensure correct type comparison when determining whether we have seen this objective id before. affects aicc, 1.2 and 1.3. propagate to 1.9. 2008-07-25 01:48:36 +00:00
moodlerobot 9408154669 Updated the 19 build version to 20080725 2008-07-25 01:44:17 +00:00
skodak ea62f50ea7 MDL-15821 do not show profile link in admin block if using guest account 2008-07-24 23:14:09 +00:00
skodak 6e47562d93 MDL-15820 fixed some install noise on dev sites 2008-07-24 22:23:51 +00:00
skodak 3e79b6e37a MDL-11421 context levels fixed in capability definitions, sorting of caps by name, plug-ins may report used core caps, fixed some risks 2008-07-24 21:58:05 +00:00
nicolasconnault 1b5b25b498 MDL-14247 Applying Katja's fix. Thanks! 2008-07-24 14:03:17 +00:00
arborrow e403b1fd34 fix trivial typo 2008-07-24 12:32:26 +00:00
skodak d99319f400 MDL-15809 fixed js errors on group members page 2008-07-24 11:39:05 +00:00
skodak 709c9900b5 MDL-15804 yet more space for editor area 2008-07-24 11:11:58 +00:00
skodak b54847edc3 MDL-15804 smaller online assignment text box size 2008-07-24 06:01:55 +00:00
piers 61e8fd6d8a MDL-9077 switch from client to server side validation for reference field as client side not supported for this type (file upload name) - propogate to 1.9. 2008-07-24 01:40:35 +00:00
moodlerobot 3e9d48cb8c Updated the 19 build version to 20080724 2008-07-24 01:40:01 +00:00
piers 340d23ab2f MDL-7323 AICC Import does not handle Core_Vendor + remove tabs and ambiguous else - propogated to 1.9. 2008-07-24 01:16:12 +00:00
stronk7 47ec4f9c6f Course page blocks are lost when restoring 1.3 and 1.4 backups. MDL-15803 2008-07-23 22:46:10 +00:00
skodak bc8b3aa84d MDL-8521 new feature - safe overrides, see tracker for details 2008-07-23 16:09:13 +00:00
thepurpleblob e6ace9b182 MDL-13925
Was not handling adding subcategories properly. Thanks to Dennis Protzek for the patch.
2008-07-23 14:33:38 +00:00
thepurpleblob f0c952dd41 MDL-14566
Misused get_role_users() was not returning users assigned in parent categories
2008-07-23 13:16:31 +00:00
tjhunt b2ece40a6b MDL-15792 - Images in question don't display. This is a regression from MDL-14279. Fix thanks to Yolanda Ord?ez Rufat. 2008-07-23 10:32:33 +00:00
nicolasconnault d0c5b9f724 MDL-15682 Fixed 2008-07-23 05:21:21 +00:00
dongsheng 4cac26a67d MDL-15565, fix bug of maintenance mode alert reminder 2008-07-23 03:16:00 +00:00
moodlerobot e7202030ef Updated the 19 build version to 20080723 2008-07-23 01:40:44 +00:00
sam_marshall 0e8a3a618b MDL-15773 - 'Pass by reference' errors in update from 1.9.1+ 2008-07-22 14:06:48 +00:00
moodlerobot a8dc4f71d6 Updated the 19 build version to 20080722 2008-07-22 01:48:09 +00:00
moodlerobot 3d4a59a201 Automatic installer.php lang files by installer_builder (20080722) 2008-07-22 01:42:27 +00:00
mudrd8mz 553e7a6faf MDL-15738 Always use <textarea> in language translation form, even for short strings 2008-07-21 15:21:51 +00:00
sam_marshall f9e7707b90 MDL-15731 Removed default grouping for modules which do not support grouping 2008-07-21 11:46:00 +00:00
dongsheng e68f5a9bf6 MDL-15317, when forum is invisible, only users with 'mod/forum:managesubscriptions' capability can subscrib forum. 2008-07-21 09:18:12 +00:00
moodlerobot 497fe2b602 Updated the 19 build version to 20080721 2008-07-21 01:35:26 +00:00
moodlerobot 181bad6feb Automatic installer.php lang files by installer_builder (20080721) 2008-07-21 01:29:50 +00:00
moodlerobot 3e6232e1c0 Added autogenerated bn_utf8 installer file. 2008-07-20 21:23:09 +00:00
moodlerobot 9e9e8a3d7a file installer.php was added on branch MOODLE_19_STABLE on 2008-07-20 21:23:08 +0000 2008-07-20 21:20:08 +00:00
jamiesensei 65143620aa MDL-15198 "non-standard sql in reportlib.php" using CASE statement to wrap logic in fields list 2008-07-20 13:01:45 +00:00
moodlerobot cac921308c Updated the 19 build version to 20080720 2008-07-20 01:37:18 +00:00
moodlerobot 1261492cfc Updated the 19 build version to 20080719 2008-07-19 01:36:31 +00:00
moodlerobot f8a3490beb Automatic installer.php lang files by installer_builder (20080719) 2008-07-19 01:31:01 +00:00
nicolasconnault c288ec21b2 MDL-14909 Preventing the border from being assigned to label list elements. 2008-07-18 14:19:55 +00:00
nicolasconnault 5bab878c29 MDL-12198 Fixing the ajax reordering problem with a new method. 2008-07-18 14:00:56 +00:00
ericmerrill 66a84e93f5 MDL-15697 Added a check form rule limiting post subject and forum name to 255 characters, as limited by the DB 2008-07-18 13:18:28 +00:00
moodler 349a7e7522 MDL-15702 More efficient SQL for advanced searching 2008-07-18 07:49:27 +00:00
scyrma a6a816fb4c MDL-4346: limiting the 'defer' clause to one call / fix the missing openpopup() bug in IE. 2008-07-18 07:14:12 +00:00
moodler ef30cf850a MDL-6850 Removed apparent-size from du 2008-07-18 06:41:13 +00:00
piers db376fdb42 MDL-11892 Propogate Fixes for 'calls to expand javascript' to SCORM 1.2, and 1.3 code. 2008-07-18 06:27:12 +00:00
moodler e8aa537761 MDL-15701 Don't show deleted hosts in block 2008-07-18 04:02:32 +00:00
moodler 8239c00c74 MDL-15700 Tidied up the maintenance mode display to users 2008-07-18 02:59:45 +00:00
moodlerobot 82d8384cdd Updated the 19 build version to 20080718 2008-07-18 01:36:19 +00:00
tjhunt 9b3e993a98 MDL-15693 - print_question_icon does not cope with missing question types 2008-07-17 12:49:22 +00:00
tjhunt a1f418fb08 MDL-15692 - Quiz attempt paging bar screws up in IE7 when you zoom the page. Normal Moodle paging bar doesn't, so I've changed the HTML the quiz generates to be closer the the output of weblib. Fortunately, this is irrelevant in 2.0. 2008-07-17 12:39:43 +00:00
scyrma 7536d5b28c MDL-15676: restrict block/blog_tags to showing blog tags. 2008-07-17 04:22:11 +00:00
moodler c4c2438e8b Bump post 1.9.2 release 2008-07-17 03:25:33 +00:00
dongsheng 3afb22f274 MDL-15683, get query string instead of calling me(). 2008-07-17 03:12:23 +00:00
moodlerobot 88f8f8f327 Updated the 19 build version to 20080717 2008-07-17 01:40:57 +00:00
jmg324 5d10a560d7 MDL-7971 check in get_categories if user can see hidden categories uses specific capability not course:create 2008-07-16 15:12:12 +00:00
moodlerobot f7bbe3d2d0 Updated the 19 build version to 20080716 2008-07-16 01:40:35 +00:00
scyrma 273d765e8d MDL-15661: typo in function name - wrong call meant tag type was set incorrectly 2008-07-16 01:20:48 +00:00
tjhunt cdd3f7f3ea MDL-14413 - Invalid function name - is_image_by_extentsion in QTI export 2008-07-15 09:18:38 +00:00
moodler de1b29bc55 MDL-14299 - small fix to credit line 2008-07-15 04:28:39 +00:00
ikawhero 94f5f73216 MDL-14299 New checkbox profile field type.
Credit to Brian King.
2008-07-15 04:06:05 +00:00
ikawhero 63982e9727 Change language string file. 2008-07-15 04:01:20 +00:00
ikawhero 6a983a636f MDL-14299 New checkbox profile field type.
Credit to Brian King.
2008-07-15 03:24:20 +00:00
moodlerobot 5cb634a5fa Updated the 19 build version to 20080715 2008-07-15 01:41:06 +00:00
fmarier 409b091091 MDL-15614 Add 3 missing PHP error codes to get_file_upload_error()
The get_file_upload_error() function was missing the following error codes:

    UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder.',
    UPLOAD_ERR_CANT_WRITE => 'Failed to write file to disk.',
    UPLOAD_ERR_EXTENSION => 'File upload stopped by extension.',

(see http://www.php.net/manual/en/features.file-upload.errors.php)
2008-07-14 02:37:24 +00:00
dongsheng 5f16beaa9b MDL-15565, add maintenance mode alert reminders in title and navbar. 2008-07-14 02:29:26 +00:00
moodlerobot 47c35d0488 Updated the 19 build version to 20080714 2008-07-14 01:38:06 +00:00
gbateson c6eff884e7 improvements to generation of html from xml:
JCloze: set textbox size allowing for minimum gap size setting and longest answer;
JMatch: allow for duplicates and distractors in RHS items;
JQuiz: set textbox size allowing for longest answer, and use textarea if answer longer than 29 chars;
2008-07-13 12:20:30 +00:00
moodlerobot 8cfec7806c Updated the 19 build version to 20080713 2008-07-13 01:36:04 +00:00
gbateson 406a9d91d8 fixed a typo in get_baseurl function: get_file_url($this->filedir.'/'); should be get_file_url($this->filedir).'/'; i.e. finial slash should be *outside* the last bracket 2008-07-12 22:55:39 +00:00
moodlerobot 50d48da89d Updated the 19 build version to 20080712 2008-07-12 01:40:43 +00:00
skodak de62b323d9 MDL-13811 email change conf on by default 2008-07-11 07:49:54 +00:00
moodler e5ab89286b Bumping for release 2008-07-11 06:03:45 +00:00
dongsheng ea17cce0ae MDL-14932, improve accessibility in role assigning and group assigning pages. 2008-07-11 04:33:29 +00:00
moodler 04cb203237 MDL-15610 Fixed very old log display bug for labels (well spotted Gary!) 2008-07-11 02:54:54 +00:00
scyrma 4c87067821 MDL-14279: Fixes for regressions created by the get_file_url massive change 2008-07-11 02:28:31 +00:00
moodlerobot 4035e4dfcf Updated the 19 build version to 20080711 2008-07-11 01:39:46 +00:00
scyrma 4770b4b6b3 MDL-14279: use get_file_url instead of checking $CFG->slashargument manually 2008-07-10 09:48:43 +00:00
dongsheng 6023d353c4 "MDL-15592, change js function name toggle() to menu_toggle(), to be friendly with prototype.js" 2008-07-10 09:34:46 +00:00
moodler fa2b5a6add MDL-15601 Basic checking to avoid some notices 2008-07-10 08:50:00 +00:00
skodak 07dffe499d MDL-10586 fixed coding style 2008-07-10 08:36:02 +00:00
moodler 69f67b2af4 MDL-13811: Small fix to make this work even when email is disabled for that user 2008-07-10 08:05:52 +00:00
scyrma 0e27230f3b MDL-14999 & MDL-10657: Fix for a few problems in HTMLArea. (Patch by Nicklas Lindgren) 2008-07-10 04:11:34 +00:00
scyrma 0a3a5cdad5 MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida) 2008-07-10 03:36:13 +00:00
dongsheng fcd05dab8e MDL-15563, use require instead of require_once, see tracker. 2008-07-10 01:50:32 +00:00
moodlerobot 1840030d48 Updated the 19 build version to 20080710 2008-07-10 01:39:42 +00:00
skodak e690e668ba MDL-15469 adding fclose before write to already open file 2008-07-09 10:32:37 +00:00
dongsheng 8cfc7e4ed4 MDL-15563, fix undefined variable in this page, and debugging information. 2008-07-09 09:31:40 +00:00
scyrma f505e072dd MDL-15403: Patch sent by Peter Bulmer, said to have been written by Donal McMullan. Prevents a remotely-triggered mass-unenrolments of users in a
(mnet-enabled) course.
2008-07-09 09:02:33 +00:00
moodlerobot 037b616369 Updated the 19 build version to 20080709 2008-07-09 01:40:26 +00:00
tjhunt 26f4fa7e15 MDL-11905 - Users with the capability to export questions may not have the capability to access backupdata. Therefore we need to change where question export files are stored. I know this is after the 1.9.2 code freeze, but I discussed this fix with Petr, and he reviewed it last night and we decided it was better to commit it before the 1.9.2 release. 2008-07-08 11:16:21 +00:00
thepurpleblob 9cc3a2e567 MDL-15304
Default name 'label' is looked up from language pack.
2008-07-08 09:38:27 +00:00
thepurpleblob dcb15c8dbc MDL-15304
Remove the item number from the created label name. It doesn't work for new labels.
2008-07-08 08:44:38 +00:00
moodlerobot 222b1a0040 Updated the 19 build version to 20080708 2008-07-08 01:43:17 +00:00
moodlerobot 21f7d612de Automatic installer.php lang files by installer_builder (20080708) 2008-07-08 01:35:27 +00:00
skodak 741cd9b3c1 MDL-13383 fixed restore form 2008-07-07 22:34:21 +00:00
skodak c029120bd6 MDL-15561 unsubscribe all option implemented; backported from HEAD 2008-07-07 21:51:40 +00:00
skodak 78a57b624b file unsubscribeall.php was added on branch MOODLE_19_STABLE on 2008-07-07 21:51:40 +0000 2008-07-07 21:51:01 +00:00
skodak 7713cdb03c MDL-15413 warn admins if display_errors enabled; backported from HEAD 2008-07-07 14:35:29 +00:00
thepurpleblob 4edbf22f28 MDL-15473
Fixed typo causing the image location to be ignored if the base_64 image is not included.
2008-07-07 11:51:57 +00:00
scyrma c2efdd7624 MDL-14237: Removing all remaining tag-related uses of html_entity_decode 2008-07-07 07:40:35 +00:00
scyrma 347579d364 MDL-14237: Removing calls to html_entity_decode, along with some syntax cleanup 2008-07-07 07:17:49 +00:00
scyrma 1690ed662c MDL-14772: Prevent official tags from being deleted when tag_instance table is empty. (Patch by Hynek Černoch) 2008-07-07 06:35:13 +00:00
scyrma adb9ea5757 MDL-12649: Prevent editing a blog from changing the display sort (based on creation date) (Patch by Dan Poltawski) 2008-07-07 03:19:09 +00:00
moodlerobot 06128605e7 Updated the 19 build version to 20080707 2008-07-07 01:36:47 +00:00
skodak 3cc961d47a MDL-13901 guest can not be selected in "Default role for all users" in 1.9.x 2008-07-06 23:53:33 +00:00
skodak 48f3e237f5 MDL-9983 role_unassign should not touch group members table directly - we need events 2008-07-06 22:54:05 +00:00
skodak 9952398b7f MDL-9983 role assignment related triggers 2008-07-06 19:26:21 +00:00
skodak 58286f7b5a MDL-15553 events_trigger() perf improvement 2008-07-06 18:56:50 +00:00
skodak 2959f8b18e MDL-9983, MDL-13998, MDL-15552 core events related cleanup and potential sql injection problem fixed; please note the changes are not backwards compatible, 3rd party code will need to be updated - sorry for the trouble 2008-07-06 17:55:54 +00:00
moodlerobot 5d1bd2051d Updated the 19 build version to 20080706 2008-07-06 01:34:43 +00:00
skodak 73db4aa6f3 MDL-13811 reworked unsetting of preferences and minor tweaks; backported from HEAD 2008-07-05 22:46:58 +00:00
skodak 9a6741db31 MDL-12505 do not leak separate groups info in advanced search user selection and other fixes 2008-07-05 20:57:09 +00:00
skodak 73532d6b11 MDL-15548 fixed regression, thanks Gary! 2008-07-05 17:24:48 +00:00
skodak 7cdd22b190 MDL-14035 fixed user images on user report 2008-07-05 16:13:35 +00:00
skodak 733818ca2e MDL-11905 send temp file support 2008-07-05 15:34:28 +00:00
skodak 3e779c59c6 MDL-15516 prvent access to deleted profiles and other user areas; backported from HEAD 2008-07-05 14:53:31 +00:00
nicolasconnault 7e408daaba MDL-13811 Fixing missing fullname variable for lang string. 2008-07-05 14:41:25 +00:00
nicolasconnault 84e9598a9f MDL-13811 Adding resetting of user preferences when change is successful. 2008-07-05 14:27:25 +00:00
skodak 7b22b8b89b MDL-13776 assignment attachment access now verified in module context 2008-07-05 14:17:29 +00:00
nicolasconnault e7f720c2c7 MDL-13811 Completed the required changes. Also added a "Cancel email change" link. 2008-07-05 14:06:58 +00:00
skodak 2b032990bf MDL-15420 fixed commented out continue which was causing leaks of info about hidden activities ;-) 2008-07-05 13:19:32 +00:00
skodak 2270fd6b61 MDL-14261 fixed access control issues for backup and unittest plugins 2008-07-05 13:05:24 +00:00
mudrd8mz 5100c95157 MDL-15077 Fixed link to admin section 2008-07-05 11:13:25 +00:00
skodak 67f6450846 MDL-15304 fixed empty label names coming from restore 2008-07-05 09:36:36 +00:00
moodlerobot 013a649ba8 Updated the 19 build version to 20080705 2008-07-05 01:42:38 +00:00
moodlerobot 0086b749dc Automatic installer.php lang files by installer_builder (20080705) 2008-07-05 01:36:03 +00:00
skodak 7eda97d239 MDL-15544 Disable email signup in new installation - add danger warning; backported from HEAD 2008-07-04 23:54:22 +00:00
skodak 0a062fdff5 MDL-14840 verbose scales in grade import; backported from HEAD 2008-07-04 20:48:18 +00:00
ethem a3c161ff00 http://moodle.org/mod/forum/discuss.php?d=100629 2008-07-04 17:07:00 +00:00
jamiesensei dcb16152f3 MDL-15530 "The Group menu in Quiz Module no longer works as before: all students are displayed regardless of what group is chosen" 'all attempts' mode for report is now disabled when a group is selected. 2008-07-04 09:48:01 +00:00
moodlerobot 022ebfc304 Updated the 19 build version to 20080704 2008-07-04 01:40:31 +00:00
moodlerobot ba91f79934 Automatic installer.php lang files by installer_builder (20080704) 2008-07-04 01:34:01 +00:00
skodak a5aea142e0 MDL-15304, MDL-15526 fixing regression 2008-07-03 23:00:33 +00:00
andreabix adefec37f7 Fixed MDL-13832 2008-07-03 22:05:59 +00:00
stronk7 de0a3bc5f1 Bump to clean empty role names. MDL-15284 2008-07-03 17:01:42 +00:00
stronk7 811e2ef0ee Clean empty role_names. MDL-15284 2008-07-03 17:00:54 +00:00
thepurpleblob 4f45ed6e32 MDL-13007
Corrected help for category selection. I hope this is what the tick boxes now do :-)
2008-07-03 15:12:44 +00:00
thepurpleblob 410f2eca60 MDL-13010
Now correctly checks for category context id and does not fail if it isn't there.
2008-07-03 14:47:09 +00:00
skodak dd11d7bdd3 MDL-15021 Deleted not fully setup separate admin settings; merged from MOODLE_18_STABLE but with better delete 2008-07-03 14:08:43 +00:00
stronk7 d889ca7bbc Only create role_name aliases if the original course (backup file) contains them. MDL-15284 2008-07-03 12:58:18 +00:00
skodak 524a75e438 MDL-11145 include orphaned mnet ids from user table into mnetid selector 2008-07-03 09:26:03 +00:00
jerome d38b5a753c MDL-14233 remove some var_dump() 2008-07-03 07:36:34 +00:00
jerome 465356acf0 MDL-14233 Make bulk user picture upload handle subdirectories in zip files (with patch) 2008-07-03 07:16:09 +00:00
jerome ff8e77b72a MDL-14635 fix user profil help icons 2008-07-03 04:08:33 +00:00
jerome d6b8aff273 MDL-14635 fix for user profil help icons 2008-07-03 04:08:06 +00:00
moodlerobot c0b030d581 Updated the 19 build version to 20080703 2008-07-03 01:40:04 +00:00
skodak 5efde2dafa MDL-15389 better explanation of spam dangers in user profiles - thanks Tim 2008-07-02 22:32:00 +00:00
skodak 37b48d3202 MDL-15390 improved subscribe me option when posting to forum - see tracker for more info 2008-07-02 21:58:35 +00:00
thepurpleblob cd50a71370 MDL-15505
Add debugging call if mnet authentication is not enabled.
2008-07-02 14:17:31 +00:00
robertall 74b4814e9c [MDL-15426] Distinguish latlong value being zero from no value 2008-07-02 12:42:15 +00:00
tjhunt 79cc2bf137 MDL-15494 - No allowance for the possibility that something might go wrong when processing the response to a question. Backported from HEAD. 2008-07-02 09:14:56 +00:00
dongsheng 8ca48dc533 "MDL-12843, add proper html id, thanks ken" 2008-07-02 07:32:35 +00:00
dongsheng 8b2a28041d "MDL-15424, close table tags manually before calling redirect" 2008-07-02 07:08:22 +00:00
dongsheng 359c7bbfa8 "MDL-15500, change helpbutton debug level to developer" 2008-07-02 06:38:09 +00:00
dongsheng 71f16fd1b3 "MDL-15501, typo, sorry" 2008-07-02 05:12:27 +00:00
dongsheng d64cb8b0c9 "MDL-15501, add appropriate div and h2 tags to the header div, merged from MOODLE_18_STABLE" 2008-07-02 05:02:00 +00:00
dongsheng f6ee689f33 "MDL-15469, limit email notification" 2008-07-02 04:46:04 +00:00
moodlerobot e40545b0d6 Updated the 19 build version to 20080702 2008-07-02 01:41:41 +00:00
skodak b3b6a4fff7 MDL-10633 fixed regression in last commit 2008-07-01 22:58:37 +00:00
skodak 0457fe8334 MDL-15387 fixing regression spotted by John Beedell 2008-07-01 22:25:26 +00:00
jamiesensei 696d84554d MDL-15490 "Create a new Quiz: warning message in Result tab" problem was when there were no students in a course - fixed. 2008-07-01 11:39:09 +00:00
gbateson 680c8b87e9 MDL-15184: fix sql injection vulnerability 2008-07-01 10:36:53 +00:00
moodlerobot d0356e72c3 Updated the 19 build version to 20080701 2008-07-01 01:35:58 +00:00
moodlerobot 11fc24fa4b Automatic installer.php lang files by installer_builder (20080701) 2008-07-01 01:30:08 +00:00
thepurpleblob 0f3cf24fa5 MDL-15476
Can now override the public key lifetime by specificying value
for $CFG->mnetkeylifetime in config.php
2008-06-30 15:00:25 +00:00
thepurpleblob d0de789783 MDL-15476
Can now override the public key lifetime by specificying value
for $CFG->mnetkeylifetime in config.php
2008-06-30 14:54:16 +00:00
thepurpleblob 08e6717022 MDL-14793
Added some debugging messages, if anything fails.
2008-06-30 14:14:31 +00:00
jamiesensei 78eabcc29d MDL-15198 "non-standard sql in reportlib.php" fixed this with new sql that does not require a limit clause. 2008-06-30 11:52:47 +00:00
ikawhero ccfbebff25 MDL-13000 - adding a missing call to update_capabilities() to process
local/db/access.php on an upgrade
2008-06-30 06:01:13 +00:00
scyrma ed77e5710f MDL-15392: preventing duplicate #id in blog entries list 2008-06-30 01:53:16 +00:00
moodlerobot af293d28c8 Updated the 19 build version to 20080630 2008-06-30 01:40:16 +00:00
moodlerobot ae022026b7 Automatic installer.php lang files by installer_builder (20080630) 2008-06-30 01:34:45 +00:00
moodlerobot 67f92d179d Updated the 19 build version to 20080629 2008-06-29 01:32:56 +00:00
stronk7 6daf124fcb Fix CEIL() uses with helper function. MDL-15336 2008-06-28 18:31:01 +00:00
stronk7 45516d902c Added sql_ceil() helper function. MDL-15336 2008-06-28 18:15:38 +00:00
moodlerobot 05ac554f60 Updated the 19 build version to 20080628 2008-06-28 01:35:52 +00:00
thepurpleblob b44c55c2bf MDL-15447
Admin search option only shown if user has moodle/site:config capability
2008-06-27 13:10:06 +00:00
scyrma e586bc17f1 MDL-15392: fix output sanitization and put permalink back, in a xhtml-strict compliant way. 2008-06-27 04:00:18 +00:00
moodler 80957b76a8 MDL-15413 Added some code to prevent direct calls on this script 2008-06-27 03:34:27 +00:00
dongsheng 81f64bba7f "MDL-10633, fix dobule quote in calendar, merged from MOODLE_18_STABLE" 2008-06-27 03:10:49 +00:00
moodlerobot fa2ff551e6 Updated the 19 build version to 20080627 2008-06-27 01:37:48 +00:00
tjhunt 3ba1f9c1cb MDL-15139 - Cannot create Random Short Answer questions becuase the validation code is buggy. Fix thanks to Paul-Andre Chasse. 2008-06-26 13:13:08 +00:00
dongsheng 3b65b56480 "MDL-15424, fix html tag" 2008-06-26 08:58:28 +00:00
robertall 97e32066cd [MDL-15423] Remove useless latlong formatting operations. 2008-06-26 08:04:04 +00:00
robertall 737f2c15b2 [MDL-14440] Show latlong field at list and single view in a prettier way. 2008-06-26 06:09:47 +00:00
moodlerobot 727bf3d324 Updated the 19 build version to 20080626 2008-06-26 01:43:33 +00:00
moodlerobot 3834d4ac9f Automatic installer.php lang files by installer_builder (20080626) 2008-06-26 01:37:08 +00:00
mudrd8mz 1e509794de MDL-15387 Always call add_to_log() even in case blocks are showing 2008-06-25 15:31:48 +00:00
robertall 7a8039c2e2 [MDL-15298] Avoid printing a warning if debugging is enabled. Backported from HEAD. 2008-06-25 10:22:34 +00:00
moodler 0867c861f4 Added a test to avoid potential notices for missing objects 2008-06-25 08:44:07 +00:00
skodak d3e345456a MDL-15372 fixed comment typo; backported from HEAD 2008-06-25 07:37:13 +00:00
Francois Marier 8c5891ba01 Fix drift between CVS and git 2008-06-25 03:01:49 +00:00
jerome 291f748a70 MDL-14635 remove tags from glossary block help 2008-06-25 03:01:49 +00:00
dongsheng 062b6df0ee "MDL-8642, see tracker, merged from MOODLE_18_STABLE" 2008-06-25 02:16:59 +00:00
moodlerobot 071e1ef4b0 Updated the 19 build version to 20080625 2008-06-25 01:40:28 +00:00
moodlerobot 066eecd756 Automatic installer.php lang files by installer_builder (20080625) 2008-06-25 01:34:06 +00:00
skodak 5e8fe2da7a MDL-15398 reverting previous incorrect patch 2008-06-24 22:09:46 +00:00
skodak 93b4063955 MDL-15298 fixed unlink with @ - silences debug warning 2008-06-24 21:52:54 +00:00
wildgirl a0f562e410 lang string typo fixes 2008-06-24 13:51:51 +00:00
jamiesensei ac625ae922 MDL-15309 "Switch role to student, take quiz, can't delete attempt" switching default of overview report to show all attempts whether or not the attempt is for a currently enrolled student. 2008-06-24 12:31:28 +00:00
jamiesensei f32aa45ef4 MDL-15378 "Quizz: sql error if not student in the group" now have extra logic to not display the table if there are no students at all or in current group - still displaying form and graph were appropriate. 2008-06-24 12:18:16 +00:00
moodlerobot d7a0b8fa3b Updated the 19 build version to 20080624 2008-06-24 01:39:30 +00:00
moodlerobot 78fa24340f Automatic installer.php lang files by installer_builder (20080624) 2008-06-24 01:33:46 +00:00
tjhunt 5cbc380ed5 MDL-15372 - Links in course summary and section summaries not recoded on restore. Petr thinks it is a bad idea to recode links in course summaries, becuase he thinks there should not be links there at all, but I disagree, and as long as links are there, and we have the code to stop them breaking on backup and restore, we should fix the bug. 2008-06-23 17:02:11 +00:00
tjhunt 00e807e8f5 MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. 2008-06-23 14:34:54 +00:00
tjhunt 5c6262b8cc MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. 2008-06-23 14:28:51 +00:00
dongsheng f8e68679d9 "MDL-15344, add lang string" 2008-06-23 06:05:09 +00:00
dongsheng 82f826bd09 "MDL-15311, remove extra enter" 2008-06-23 05:43:50 +00:00
scyrma 1938e7f893 MDL-15345: prevent problem while running tag_compute_correlations under pgsql. 2008-06-23 04:30:04 +00:00
moodlerobot 76fa355d68 Updated the 19 build version to 20080623 2008-06-23 01:36:50 +00:00
moodlerobot 5ffed7dfa5 Automatic installer.php lang files by installer_builder (20080623) 2008-06-23 01:31:06 +00:00
stronk7 0fea8c79f7 Fixed statistics generation under Oracle. MSSQL pending. MDL-13861 2008-06-22 23:37:12 +00:00
jamiesensei 29e3105632 Fixing typo introduced in 1.282.2.14 version of this file. 2008-06-22 13:01:39 +00:00
moodlerobot 85d6a36efa Updated the 19 build version to 20080622 2008-06-22 01:37:48 +00:00
moodlerobot 11742d0e26 Updated the 19 build version to 20080621 2008-06-21 01:38:47 +00:00
moodlerobot 9ec6d22190 Automatic installer.php lang files by installer_builder (20080621) 2008-06-21 01:33:30 +00:00
gbateson b797f83e4f add hidden "summarysource" field when updating HotPot. This fixes "undefined property" error from mod/hotpot/lib.php 2008-06-20 22:55:11 +00:00
nicolasconnault cb41c95ace CONTRIB-490 Adding support for generation of test calculated question type (thanks Pierre Pichet) 2008-06-20 19:11:34 +00:00
tjhunt 9af3558449 MDL-15315 - Error in Item analysis report for short aswer questions that use wildcards 2008-06-20 17:22:55 +00:00
tjhunt f4b0102d11 MDL-15332 - Item analysis links to the question edit form even for users without an appropriate capability. 2008-06-20 16:30:33 +00:00
tjhunt 2e0012e470 MDL-15330 - Truefalse help file not found 2008-06-20 15:24:14 +00:00
moodlerobot 51a934026a Updated the 19 build version to 20080620 2008-06-20 01:45:30 +00:00
tjhunt f446123b6a MDL-15321 - Add a class to the last column and row of the table in print_table to help theming 2008-06-19 18:38:36 +00:00
tjhunt b323b23ca0 MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected. 2008-06-19 17:58:00 +00:00
jamiesensei 1c215c8bce MDL-15165 "Essay quiz Manual grading "these are no attempts to show" when there are actually attempts" - not resolved. But while reviewing the query I found a LIMIT clause in sql that I've replace with params to the get_records_sql function. Also made the logic in attempt_sql method more robust. 2008-06-19 15:19:17 +00:00
tjhunt e6afe4a18a MDL-15318 - url is a reserved word in JavaScript in IE, so the Gen Calendar URL button does not work there 2008-06-19 14:24:11 +00:00
jamiesensei e05eb943d0 MDL-15264 "Bar graph image missed when group with no attempts selected" added a query to check for sure that there are some grades there to display in the graph. Also now displaying grades for all groups a user has permission to view - but only if that is up to 4 groups and only if there are less than 500 grades total. 2008-06-19 12:31:28 +00:00
gbateson f5018bc548 improved setting of LHS and RHS items in JMatch 2008-06-19 11:41:49 +00:00
gbateson 7ed61cd749 allow <img> and other tags in LHS of JMatch in "v6" output format 2008-06-19 05:57:44 +00:00
fmarier f42d997d98 auth/ldap: fix PHP warnings and remove bad "Choose one" id 2008-06-19 02:27:33 +00:00
pichetp 6616311474 closing properly questions <label> i.e. adding </label> line 459-61 when some errors 2008-06-19 01:46:16 +00:00
moodlerobot 8a575a7c64 Updated the 19 build version to 20080619 2008-06-19 01:43:41 +00:00
robertall 720c7c0624 [MDL-15308] Automatically download exported preset. 2008-06-18 17:42:43 +00:00
thepurpleblob 5967922779 MDL-15304
Handle empty names for labels (if only HTML tags in label text)
2008-06-18 15:26:34 +00:00
robertall 5d7e3a41b2 [MDL-15300] Remove temporary files created while exporting a preset as ZIP file. 2008-06-18 14:42:20 +00:00
tjhunt aa0716e1ea MDL-15290 - Missing question types not handled properly on backup. 2008-06-18 14:29:40 +00:00
robertall 72c5387098 [MDL-15298] Don't create preset ZIP always in the same directory, as the same file name. 2008-06-18 11:39:43 +00:00
jerome 1335a32f75 MDL-15152 reverse MDL-14439 fix for dropdown menu for Opera+Linux 2008-06-18 05:40:19 +00:00
dongsheng 55737c854a "MDL-8642, setting of auto scrolling" 2008-06-18 03:57:50 +00:00
dongsheng 654b0cab44 "MDL-12304, fix double text" 2008-06-18 03:13:40 +00:00
moodlerobot 315e4bce26 Updated the 19 build version to 20080618 2008-06-18 01:41:05 +00:00
jerome 323f59a18f MDL-11461 all ressource types are now displayed in the ressource help popup 2008-06-17 01:47:57 +00:00
moodlerobot 28439653a2 Updated the 19 build version to 20080617 2008-06-17 01:40:34 +00:00
pichetp b50f8fc81f code cleaning 2008-06-17 01:11:09 +00:00
robertall e869c370bb [MDL-15258] Clean up data_presets_export() function. 2008-06-16 18:32:44 +00:00
sam_marshall d517630b63 MDL-15263 Fixed numeric entities remaining after html_to_text 2008-06-16 14:01:52 +00:00
robertall 12ab8a517b [MDL-15258] Move data_presets_export() function out from common module specific library. 2008-06-16 13:46:43 +00:00
pichetp 220058da84 MDL-14625 more tolerant to missing subquestions merged from HEAD 2008-06-16 13:07:05 +00:00
dongsheng 2c33f28f02 "MDL-15251, see tracker" 2008-06-16 12:24:23 +00:00
thepurpleblob 86f9dc29ac MDL-15257
Fix notice caused by (possibly) uninitialised variable.
2008-06-16 10:04:59 +00:00
nicolasconnault d2c33621f1 CONTRIB-475 Added CLI and web authentication, plus fixed a few little bugs. 2008-06-16 09:04:31 +00:00
dongsheng 33484c1b9f "MDL-15251, see tracker" 2008-06-16 09:04:15 +00:00
pichetp 890a48fabe MDL-15123 Using true value limits to grade responses, merged from head 2008-06-16 03:16:49 +00:00
pichetp 0e2dbbf7ee MDL-15123 Using true value limits to grade responses, merged from head 2008-06-16 03:09:48 +00:00
dongsheng 9052f663a8 "MDL-15251, fix country field in user/view.php" 2008-06-16 02:13:30 +00:00
moodlerobot 55d75bf44f Updated the 19 build version to 20080616 2008-06-16 01:41:51 +00:00
moodlerobot b10bddb693 Automatic installer.php lang files by installer_builder (20080616) 2008-06-16 01:35:42 +00:00
cataluke c918a27394 MDL-15156 add in missing upgrade_main_savepoint() 2008-06-16 00:20:33 +00:00
robertall 895dc1bb7d [MDL-15069] Change filename of exported preset to ensure downloading the latest version. 2008-06-15 15:17:30 +00:00
moodlerobot 33e0218f5f Updated the 19 build version to 20080615 2008-06-15 01:39:12 +00:00
moodlerobot 7197151005 Updated the 19 build version to 20080614 2008-06-14 01:52:22 +00:00
jamiesensei 1be3ce4510 MDL-15224 "Overview results in quiz module export to excel and txt fail" Fixed. 2008-06-13 12:46:54 +00:00
moodlerobot 44e9435e23 Updated the 19 build version to 20080613 2008-06-13 02:03:44 +00:00
stronk7 989807c327 Timezone info updated to tzdata2008c 2008-06-12 16:00:30 +00:00
robertall 258730666e [MDL-8407] Make the default role required to export database records weaker (use the 1.9 mod/data capability "viewalluserpresets"). 2008-06-12 13:49:40 +00:00
jmg324 7b8c3081a0 MDL-15223 need to default backup_blogs for backup_course_silently not to have PHP notice errors 2008-06-12 11:06:57 +00:00
thepurpleblob 9075e36022 MDL-15221
The name of the introformat database field was incorrect and the
format was not saved.
2008-06-12 09:35:28 +00:00
nicolasconnault 933f6db4b9 CONTRIB-490 Added support for scripted generation of questions. Calculated type not yet supported (datasets too complicated ;) 2008-06-12 04:48:20 +00:00
moodlerobot 2bf5901494 Updated the 19 build version to 20080612 2008-06-12 02:02:14 +00:00
moodlerobot 99f23c0304 Automatic installer.php lang files by installer_builder (20080612) 2008-06-12 01:55:16 +00:00
cataluke 7aa74e036b MDL-15156 fix conflict in schema for MNET PREFIX_mnet_enrol_course table 2008-06-12 01:30:26 +00:00
nicolasconnault e724b50ea0 MDL-15206 Fixed. My fault... 2008-06-11 08:46:50 +00:00
jmg324 ea39a99894 MDL-15183 defaulting a couple of variables in the graph class rather than every graph object needing to do it. 2008-06-11 08:22:35 +00:00
dongsheng 4440b029bb "MDL-12304, fix double text" 2008-06-11 06:05:09 +00:00
moodlerobot 9f69bbaec3 Updated the 19 build version to 20080611 2008-06-11 02:01:58 +00:00
nicolasconnault 73b73c9819 CONTRIB-490 Added generation code for generator tool. 2008-06-10 20:52:46 +00:00
jamiesensei f5d47e36f1 MDL-14821 "Quiz: report overview page is not XHTML compliant" wrapped hidden form params in div with style 'display:none'. 2008-06-10 07:45:22 +00:00
moodlerobot d41e6bdc07 Updated the 19 build version to 20080610 2008-06-10 02:00:10 +00:00
moodlerobot 2b63b81174 Automatic installer.php lang files by installer_builder (20080610) 2008-06-10 01:53:39 +00:00
jmg324 cd61bc6fb4 MDL-15183 reverting previous change 2008-06-09 10:05:50 +00:00
fmarier 7b30c23b87 filelib: Add .ics files to the mimetypes array.
Required so that .ics files can be attached to e-mails using the email_to_user
function. The facetoface module is doing this.

(from Nigel McNie <nigel@catalyst.net.nz>)
2008-06-09 05:33:52 +00:00
moodlerobot 8ba8fe0841 Updated the 19 build version to 20080609 2008-06-09 01:58:53 +00:00
dongsheng 8bf931fc5b "MDL-15138, fix breadcrumb nav" 2008-06-08 18:29:51 +00:00
iarenaza ad1f69b66b MDL-12783 IMS idon't unenroll students who were enrolled by other plug-ins
Credit goes to Scott Krajewski for the bug report and patch!

Merged from MOODLE_18_STABLE
2008-06-08 15:29:58 +00:00
moodlerobot df1c48b47f Updated the 19 build version to 20080608 2008-06-08 01:59:59 +00:00
iarenaza cf5d095f47 MDL-15182 Fix LDAP enrolment course auto-creation at user login
Merged from MOODLE_18_STABLE
2008-06-07 21:19:45 +00:00
jamiesensei 012de02b64 MDL-14821 "Quiz: report overview page is not XHTML compliant" gave the fieldsets in the form different names to avoid html id attribute conflict.
Backported from HEAD
2008-06-07 12:58:34 +00:00
moodlerobot ddad729c6e Updated the 19 build version to 20080607 2008-06-07 01:56:26 +00:00
gbateson 4200f652ad fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments) 2008-06-07 01:42:32 +00:00
jmg324 8a7f4c11f9 MDL-7968 reports section of admin tree controled by reports capability not site config 2008-06-06 15:35:20 +00:00
jamiesensei a92741f2d2 MDL-15092 "Quiz overview report won't display if there are more than 29 questions" Small fixes in logic to do with sorting.
* Don't need extra joins for sorting if we are downloading as downloads are not sorted.
* Fix bug for sorting when detailed marks are not shown.
2008-06-06 12:24:17 +00:00
jamiesensei 6713e60db7 MDL-15150 "Quiz Report broken in course without students" added warning message if there are no students in course yet. 2008-06-06 11:08:58 +00:00
jmg324 a94592e608 MDL-12302 stopping filter_save_ignore_tags ignoring empty tags 2008-06-06 09:15:35 +00:00
jmg324 73f6e22ab9 init_y_axis parameter not set up correctly 2008-06-06 08:48:43 +00:00
moodlerobot 2bca713636 Updated the 19 build version to 20080606 2008-06-06 01:58:11 +00:00
mchurch f8dc3566d0 MDL-11892 Fixed calls to expand javascript to correctly use quoted strings in all necessary places. 2008-06-05 20:58:26 +00:00
jamiesensei 5b598e9e5d MDL-14223 "Add a column for the user's idnumber, controllable by a site-wide setting" adding idnumber to the list of columns that is 'suppressed' ie that is only printed once when the same data is repeated in consecutive rows. 2008-06-05 11:12:58 +00:00
jamiesensei 5bc700de54 MDL-15092 "Quiz overview report won't display if there are more than 29 questions" fixed this by going back to the old way of fetching data for display in the table. However still use table JOINs when user wants to sort by question grade. The user can sort by a maximum of two columns at once so the JOINs will not exceed the limit. 2008-06-05 06:12:26 +00:00
dongsheng e53a39773d "MDL-14932, move the course section" 2008-06-05 06:08:18 +00:00
dongsheng 7980e37b36 "MDL-14932, see tracker" 2008-06-05 06:02:56 +00:00
moodlerobot 4e8d585b85 Updated the 19 build version to 20080605 2008-06-05 02:01:12 +00:00
moodlerobot 3e980075e4 Updated the 19 build version to 20080604 2008-06-04 02:01:48 +00:00
moodlerobot 8c5171c03c Updated the 19 build version to 20080603 2008-06-03 01:59:50 +00:00
iarenaza 77d3068b70 MDL-15039 Apostrophes in idnumber prevent users from being unenrolled via LDAP
If any member of a course has an ID number containing an apostrophe (eg.
CN=Paddy O'Brien,OU=Students,DC=etc...), no other members will ever be
unenrolled via LDAP.

Thanks to Michael Woods for the bug report and proposed solution.

Merged from MOODLE_18_STABLE.
2008-06-02 22:35:23 +00:00
moodlerobot 3449d068e6 Updated the 19 build version to 20080602 2008-06-02 02:03:56 +00:00
skodak 5e61503fb3 MDL-15080 char to int cast problem in get_recent_enrolments(); backported from HEAD 2008-06-01 13:21:17 +00:00
skodak 669f7e7bc3 MDL-15079 fixed js quoting 2008-06-01 13:15:46 +00:00
skodak ac024610d8 MDL-15078 fixed role name displaying when adding group members 2008-06-01 13:14:23 +00:00
mudrd8mz ba309412ce The very last save button is tabindexed, too. Forgot to include it in the last commit. 2008-06-01 11:16:53 +00:00
mudrd8mz 92cfecea74 Save buttons are tabindexed as well. You don't need to touch the mouse at all ;-) 2008-06-01 08:38:58 +00:00
moodlerobot 6fcd60f62f Updated the 19 build version to 20080601 2008-06-01 01:58:42 +00:00
robertall 16b448da57 [MDL-8407] Don't offer the semicolon in the CSV delimiter selection menu. 2008-05-31 15:03:34 +00:00
iarenaza 8278b5164b MDL-4248 Fix error when updating user profiles and any of these fields is empty
According to http://es2.php.net/manual/en/function.ldap-modify.php#43216 we
need to specify an array() value to delete an attribute's value, instead of an
empty string.

Merged from MOODLE_18_STABLE
2008-05-31 14:55:56 +00:00
iarenaza 9fa80523a8 MDL-4207 Don't overwrite modified user profile values with empty LDAP values when 'unlocked if empty' is set
If user profile values are locked to LDAP, then LDAP should provide those
values.

But the purpose of the setting 'unlocked if empty' is to allow the user to fill
in a value for the selected field _if LDAP is giving nothing_ for this field.
Thus it makaes sense to let this value stand in until LDAP is giving a value
for this field.

Merged from MOODLE_18_STABLE
2008-05-31 13:26:01 +00:00
robertall 7960121a2c [MDL-14334] Export fields in preset.xml in the order as shown in the Fields tab. 2008-05-31 09:48:35 +00:00
moodlerobot 8b0d2ceeb0 Updated the 19 build version to 20080531 2008-05-31 02:02:25 +00:00
robertall 2852740b2e [MDL-8407] Last obligate commit to support exporting records of a database activity as a CSV, XLS, or ODS file. 2008-05-31 00:24:23 +00:00
robertall 7ce1f36198 [MDL-8407] Add two new files that contain the core CSV/XLS/ODS export code. 2008-05-30 22:17:31 +00:00
robertall d7652a4e1f [MDL-8407] Replace four language strings that will be used by 'mod/data/export_form.php' to be committed later. 2008-05-30 20:57:22 +00:00
robertall 2b9028dcd3 [MDL-14771] Replace direct use of function number_format() by format_float(). Some whitespace cleaned up has been made, too. 2008-05-30 16:10:42 +00:00
jamiesensei b536544e34 MDL-15047 "Quiz overview report download is broken - patch" fixed. 2008-05-30 12:22:20 +00:00
robertall 8da9517d60 [MDL-8407] Replace one language string that will be used by 'mod/data/export_form.php' to be committed later. 2008-05-30 10:19:11 +00:00
moodler 1fb0590508 MDL-15053 Fix RTL CSS typo (forum indenting and nav menu now work correctly) 2008-05-30 03:21:45 +00:00
moodlerobot 966230a681 Updated the 19 build version to 20080530 2008-05-30 02:03:37 +00:00
robertall 22cceb0cc9 [MDL-8407] Add new function text_export_supported() or export_text_value() to those "mod/data/field/*/field.class.php" files which need them. The existing code formatting has been cleaned up, too. 2008-05-30 01:34:41 +00:00
robertall 775a5f4020 [MDL-14771] Backend code to allow a "number" field to be displayed with a specified number of decimal digits. 2008-05-29 19:12:37 +00:00
mudrd8mz f685affe23 MDL-15036 Did not work with PostgreSQL 2008-05-29 17:25:30 +00:00
jamiesensei 49814438b9 MDL-15011 "grading report : allow user to select to grade next 10 ungraded attempts" added a new link and options to the grading report page to display only the next 10 ungraded attempts to grade. Also some fixes for faulty sql for ungraded option which was not respecting the users groups selection.
Merged from HEAD
2008-05-29 14:31:30 +00:00
dongsheng 2e49d3ab21 "MDL-15037, remove "none" in html head" 2008-05-29 03:21:11 +00:00
danmarsden eb6fad813f MDL-14550 really inefficient db calls - saves almost 3x number of users in site for backup queries. merged from head. 2008-05-29 02:02:39 +00:00
moodlerobot b7e1a3cc1b Updated the 19 build version to 20080529 2008-05-29 02:02:03 +00:00
mchurch 02d72f6b8b MDL-15035 - Changed error message to more meaningful one. 2008-05-28 14:52:15 +00:00
robertall 6f45a07d85 [MDL-14442] Resolve reopened bug for importing database records as CSV by applying "MDL-14442-clean_param.patch" (see tracker). Don't use PARAM_NOTAGS anymore. 2008-05-28 13:08:11 +00:00
robertall 849f63482c [MDL-8407] Finish preparation of language strings required to allow exporting records of a database avtivity. 2008-05-28 12:04:38 +00:00
robertall 994f8253f0 [MDL-8407] [MDL-14129] First step of patch to allow exporting records of a database avtivity. Three new error messages added in Moodle 2.0 style, to be used by 'mod/data/export.php' to be commited later. They are already present in HEAD. 2008-05-28 11:21:38 +00:00
scyrma 50789c3cbc MDL-15032: add quotes to make it possible to correctly send files with names containing spaces 2008-05-28 07:43:41 +00:00
dongsheng ee557b6f4d "MDL-15031, fix order of the user fields, see tracker" 2008-05-28 07:39:52 +00:00
scyrma c9e47cd096 MDL-13792: fixing problem in the previous patch, where filename contain spaces 2008-05-28 05:15:39 +00:00
moodler bd454a0c43 Latest tags file for 1.9, reduced in size 2008-05-28 03:20:03 +00:00
jerome a3612de1c2 MDL-14698 Improve language in actions list on course participants page 2008-05-28 03:10:45 +00:00
jerome a32a358768 MDL-14765 Assignments email teachers on any submission (only if Alert teacher = Yes AND Send for making = No) 2008-05-28 02:05:25 +00:00
moodlerobot 93b9727962 Updated the 19 build version to 20080528 2008-05-28 02:01:18 +00:00
dongsheng 1a8eaca65b "MDL-14932, accessibility imporvement, see tracker" 2008-05-28 01:45:16 +00:00
dongsheng 55d89d4337 "MDL-12405, add webpage to user fields" 2008-05-28 01:36:21 +00:00
tjhunt 50f45baff1 MDL-14764 - Imported multichoice questions may have a blank answernumbering value, which results in an "ERR" prefix to all answers' text. Thanks to Nate H for the fix. 2008-05-27 13:42:28 +00:00
tjhunt 32101da4c8 MDL-14593 - delete icons in the question bank do not work. This was a regression caused by part of the fix for MDL-13982. I hvae reverted that bit for now, pending a better solution. 2008-05-27 10:35:14 +00:00
sam_marshall e7c3b7e811 MDL-15015: Choice limited answers don't work with group mode 2008-05-27 10:16:01 +00:00
robertall e31e99f8f1 [MDL-14788] Don't store empty number fields as 0 2008-05-27 07:38:42 +00:00
moodlerobot b574ec6ff1 Updated the 19 build version to 20080527 2008-05-27 02:03:43 +00:00
jamiesensei e86d81b3ca MDL-15002 "grading report : notice from quiz_num_attempt_summary about how many total attempts there are on the quiz and how many in this group would make UI clearer" added call to function and fixed centering of notice on overview and grading report by adding a clear:left to stop the centering being affected by the groups menu. 2008-05-26 14:24:51 +00:00
jamiesensei cec3911dd4 MDL-12824 "Essay type of quiz questions needs to color mark which students have been graded and which have NOT"
Fixing notices introduced by the changes for this bug in grading report when no question is selected.
2008-05-26 13:23:14 +00:00
jamiesensei 9607206c71 MDL-12824 "Essay type of quiz questions needs to color mark which students have been graded and which have NOT"
As well as highlighting graded questions with a new CSS class highlightgraded which is a yellow bg in the standard theme, have also added the option to grade all ungraded attempts for a question.
2008-05-26 12:06:19 +00:00
jamiesensei 4c3332efff MDL-15000 "Moodle url method remove_params doesn't actually remove anything" Fixed. 2008-05-26 11:47:00 +00:00
jamiesensei 89bc941b70 MDL-14988 "tables have been hardcoded with a prefix of "mdl" - causing an error." Ooops! 2008-05-26 09:01:30 +00:00
moodlerobot 5265400d88 Updated the 19 build version to 20080526 2008-05-26 02:06:59 +00:00
iarenaza c875af622e MDL-14987 Default attribute for Active Directory password expiry is missing
Backported from HEAD
2008-05-25 21:55:50 +00:00
skodak 416f2dab44 MDL-14980 missing strsurveysaved when saving; backported from HEAD 2008-05-25 14:25:06 +00:00
jamiesensei 7e8b311075 MDL-5241 "When manually grading, identity questions by their number within the quiz as well as by question name" Ooops. Accidentally introduced a bug during refactoring and reworking of UI code. I added gradeall links to the table whether or not there were attempts to grade, have fixed this now. 2008-05-25 11:46:12 +00:00
jamiesensei 3a83ce8b5d MDL-5241 "When manually grading, identity questions by their number within the quiz as well as by question name"
Also added a drop down box to select question to mark instead of the viewquestions table. The drop down box is available at the top of every page, but only if there is more than one manually gradeable question in the quiz. If there is only one question it is automatically selected for marking.

Also added a new constant QUESTION_EVENTS_GRADED during a general refactoring of UI code in grading report and some improvements to efficiency of SQL in report.
2008-05-25 11:35:29 +00:00
moodlerobot 8c6725490f Updated the 19 build version to 20080525 2008-05-25 01:57:58 +00:00
pichetp 9f13517f8f Merge from head MDL-14054 Display of correct answers in the popup window
already use for feedback and MDL-14625 Make multianswer questions more tolerant if one of the subquestions
is missing
2008-05-24 22:33:05 +00:00
robertall 0654809d51 [MDL-14816] Escape special regex characters before applying perl compatible regex substitution of field names for database activity's advanced search 2008-05-24 11:02:17 +00:00
moodlerobot acf4b962b6 Updated the 19 build version to 20080524 2008-05-24 01:59:12 +00:00
jamiesensei 3014691278 MDL-12547 "allow manual quiz grading to sort by groups" added code to select which group to grade. 2008-05-23 13:00:47 +00:00
sam_marshall 1256ee3ec5 MDL-14965: Pass-by-reference call broke forum on php5 2008-05-23 11:02:27 +00:00
sam_marshall 2a212d94a0 MDL-14965: Pass-by-reference call broke install on php5 2008-05-23 10:36:11 +00:00
sam_marshall 38147894da MDL-14965: Pass-by-reference call broke install on php5 2008-05-23 10:28:23 +00:00
dongsheng 9ff5163d78 "MDL-14706, improve the progress bar" 2008-05-23 03:55:56 +00:00
moodlerobot e6fcaefe5b Updated the 19 build version to 20080523 2008-05-23 02:02:23 +00:00
moodlerobot f68d73ac89 Automatic installer.php lang files by installer_builder (20080523) 2008-05-23 01:54:58 +00:00
whchuang beadb11ec7 Fixed typo in the help text. Changed 'the' to then and removed the extra period in bulleted list 2008-05-22 16:25:33 +00:00
wildgirl 51a21e077f MDL-14951 help file typo fix 2008-05-22 12:41:44 +00:00
thepurpleblob fd17bd94da MDL-14945
MDL-14946
Now checks properly for mod/choice:deleteresponses and mod/choice:downloadresponses
2008-05-22 10:12:13 +00:00
jamiesensei 57fb427c9b MDL-14943 "moodle_url : need way to add extra params when outputting params as hidden fields for forms" added new optional param to method hidden_params_out 2008-05-22 09:18:03 +00:00
jerome fdab35a403 MDL-11748 add "protection" to avoid Notices in the A-Z name selector 2008-05-22 02:33:56 +00:00
jerome a1a7533fbc MDL-14819 changed main table size 2008-05-22 02:25:18 +00:00
moodlerobot 30a709620f Automatic installer.php lang files by installer_builder (20080522) 2008-05-22 01:55:30 +00:00
mchurch 9d3df57259 MDL-13860 - Fixed mistyped function call to 'scorm_seq_overall'. This was preventing some SCORM navigation from continuing in our tests - but only if debugging was turned off! 2008-05-21 16:27:42 +00:00
thepurpleblob 43aff3e874 MDL-14916:
Tidy up notices
2008-05-21 12:46:00 +00:00
thepurpleblob 902fa69779 MDL-14936
Course managers admin screen shows roles in "correct" order.
2008-05-21 12:22:21 +00:00
thepurpleblob 0c4c41bd80 MDL-14832
Don't show a user name more than once. Only show them in the
most 'senior' role.
2008-05-21 12:02:08 +00:00
tjhunt b44bd7a1f2 Inconsistency between quiz attempt->id and attempt.uniqueid 2008-05-21 11:10:04 +00:00
jerome fabd02b53f MDL-14709 fix call view.pgp => view.php 2008-05-21 04:01:09 +00:00
moodlerobot 7673817cca Updated the 19 build version to 20080521 2008-05-21 02:10:13 +00:00
tjhunt ae5d6704dc MDL-14928 - Adding random questions from a category with an apostrophe in the name does not work. Stupid bloody addslashes. Roll on dmllib 2.0. 2008-05-20 17:09:37 +00:00
moodlerobot 0751b52c22 Updated the 19 build version to 20080520 2008-05-20 01:57:37 +00:00
mudrd8mz f3ab121919 MDL-13997 Links from "missing" to "compare" mode are being created using ID instead of A NAME now. Do not highlight strings translated in _local only. 2008-05-19 21:43:14 +00:00
skodak 014734bcb0 MDL-14894 html purifier updated 2008-05-19 06:23:20 +00:00
moodlerobot 2afa9de179 Updated the 19 build version to 20080519 2008-05-19 02:00:05 +00:00
stronk7 d2fc0bff85 Deleting one print_object() that shouldn't be there. 2008-05-18 23:34:50 +00:00
iarenaza 600dea12d3 MDL-14883 Password expiration check during login doesn't work after NTLM integration
As part of the NTLM integration work, we moved some login code from
login/index.php to lib/moodlelib.php (function complete_user_login()). This
broke the password expiration check code, as we moved the $userauth variable to
complete_user_login(), and we also need it in login/index.php later.

Add the missing variable and related code to get a suitable password change url.
Also remove the now inexistant $focus variable from the call to print_header().
2008-05-18 21:26:57 +00:00
moodlerobot b8ab4168cd Updated the 19 build version to 20080518 2008-05-18 01:52:58 +00:00
moodlerobot 89e162bcf9 Updated the 19 build version to 20080517 2008-05-17 01:58:46 +00:00
moodlerobot d9ab71f1b0 Automatic installer.php lang files by installer_builder (20080517) 2008-05-17 01:51:35 +00:00
jamiesensei 34ccb459a6 MDL-14844 "Quiz Report: Bar Graph doesn't displayed maximum grade" Reverting accidentally committed changes to this file which where committed as part of the fix for MDL-14844 2008-05-16 14:44:05 +00:00
jamiesensei fdc1036f0e MDL-14844 "Quiz Report: Bar Graph doesn't displayed maximum grade" Now using php ceil function to round up $bands as in some cases it could be a non integer. 2008-05-16 14:39:02 +00:00
moodler 3883481bfd MDL-14865 DOn't pass CFG to get_string 2008-05-16 07:10:36 +00:00
dongsheng b0e592a9c6 "MDL-14703, remove obsolete options" 2008-05-16 02:19:14 +00:00
dongsheng ca5d438280 "MDL-14668, fix course full in activity reports (upgrade course module version)" 2008-05-16 02:07:57 +00:00
moodlerobot 8785a88758 Updated the 19 build version to 20080516 2008-05-16 02:03:32 +00:00
stronk7 a326872b88 prevent NULL contents before field change (old servers can have this wrongly defined). MDL-14859 2008-05-15 17:02:05 +00:00
stronk7 2ecc706b25 Delete the check_defaults test from 19_STABLE. MDL-14854 2008-05-15 16:20:55 +00:00
stronk7 e0f1b13481 Deleting the check_defaults test from 19_STABLE. MDL-14854 2008-05-15 16:19:06 +00:00
tjhunt 5bd56c517c MDL-14750 - followup - make the code robust in the case their are broken questions in the DB. 2008-05-15 16:05:49 +00:00
tjhunt b209022e74 MDL-14835 - Grade not checked against valid range when manua grading 2008-05-15 16:02:15 +00:00
tjhunt d577bb8622 MDL-14857 - Clean up summary table generation code at the top of the quiz review page - This is basically a merge of improvements we made at the OU. 2008-05-15 15:32:44 +00:00
thepurpleblob 5e7fc13080 Whoops. missed a string.
+fixed a couple of grammatical oddities I noticed.
2008-05-15 15:27:21 +00:00
thepurpleblob 4f6fdcecd8 Whoops. missed a string. 2008-05-15 15:22:56 +00:00
thepurpleblob 48fadcf73b MDL-14854
Add facility to XMLDB editor to check for inconsistent field defaults.
2008-05-15 14:51:54 +00:00
thepurpleblob a0382cfbee file check_defaults.class.php was added on branch MOODLE_19_STABLE on 2008-05-15 14:51:54 +0000 2008-05-15 14:50:10 +00:00
thepurpleblob b9c474a9b3 MDL-14854
Add facility to XMLDB editor to check for inconsistent field defaults.
2008-05-15 14:44:37 +00:00
jamiesensei 01676c49a3 MDL-14852 "improve sql in overview report for fetching question grades" moved all querying for question grades into main attempts sql query. AND MDL-14200 "Add group and course averages" some fixes for functionality to display question grades averages. Grade averages are not displayed when grading method is set to Average - as this cannot be done in sql and would be expensive to do in memory. 2008-05-15 13:55:49 +00:00
jamiesensei 05289910b7 MDL-14200 "Add group and course averages" fix for bug introduced in this patch. We are now using a seperate sql command to get the feedback text as we need to get it for the average rows too. Since it is not part of the sql to fetch attempt data we can't sort on Feedback anymore so removed the option from the table. Sorting by feedbacktext is not really useful anyway, users are more likely to want to sort by grade. 2008-05-15 12:52:56 +00:00
jamiesensei 5746826364 MDL-14200 "Add group and course averages" added extra rows to the end of the table in quiz overview report also MDL-14187 "Improve tablelib - improve api and add functionality to download table contents in a variety of formats - XLS, ODS and CSV" implemented the first of my proposals for improving tablelib. Added a extra method to use keyed arrays to add a row to a table. Seems obvious that this is an improvement to tablelib and it is an addition to the API so won't affect existing code. 2008-05-15 12:25:04 +00:00
jamiesensei 316d595389 MDL-14844 "Quiz Report: Bar Graph doesn't displayed maximum grade" added perfect grade to last 'band' on graph. 2008-05-15 10:40:58 +00:00
sam_marshall fc1d395b8a MDL-14838: Corrected javadoc package names in wiki 2008-05-15 10:08:05 +00:00
moodler 879b1c04e6 POst 1.9.1 bump 2008-05-15 08:11:19 +00:00
moodler 2d92fd5eed Latest tags for 1.9.1 2008-05-15 06:43:37 +00:00
moodler f12a2ccee5 Bumping to 1.9.1 2008-05-15 06:35:11 +00:00
moodlerobot a803edf7db Updated the 19 build version to 20080515 2008-05-15 01:58:26 +00:00
robertall d80e3a0b10 MDL-14442: apply addslashes() before importing values, to allow quotes in field's values 2008-05-14 17:07:22 +00:00
stronk7 1eae64185c XHTML minor fix. MDL-14836 2008-05-14 16:42:31 +00:00
jamiesensei ac2ce35b6c MDL-14201 "Summary graph" - small improvement to robustness for sql. 2008-05-14 11:15:14 +00:00
jamiesensei 4e27090284 MDL-14822 "Quiz Report: the quiz report do not find the first attempt" needed to include quiz id in WHERE conditions. 2008-05-14 09:12:57 +00:00
dongsheng fc3992e57e "MDL-14820, escape filename, merged from mOODLE_18_STABLE" 2008-05-14 05:21:57 +00:00
dongsheng 81f7813e8b "MDL-14442, replace error() with print_error" 2008-05-14 02:47:35 +00:00
moodlerobot 941369258b Updated the 19 build version to 20080514 2008-05-14 02:03:38 +00:00
skodak c72350373c MDL-14378 When deleting course category deal with everything that depends on its context 2008-05-13 22:03:40 +00:00
skodak ade1ee0deb MDL-14378 When deleting course category deal with everything that depends on its context 2008-05-13 21:51:46 +00:00
robertall cd91db1630 MDL-14442: added error checking to update_record() and insert_record() calls 2008-05-13 15:28:37 +00:00
jamiesensei 872c8cc93f MDL-14201 Summary graph in Overview Report - needed a little more spacing between bars of graph in some cases. 2008-05-13 15:03:29 +00:00
moodler 725f4c704c Fixed RTL problem for this theme (Heading on wrong side) 2008-05-13 08:04:40 +00:00
nicolasconnault 6ec1f89e73 Updating the translate_list for YUI components. 2008-05-13 07:24:54 +00:00
moodler 498f8e8f82 MDL-14738 Roles section on course settings is now "Role renaming", with help. 2008-05-13 06:16:12 +00:00
moodler ea22498866 MDL-14811 Fixed the popup window name for HTML editor help 2008-05-13 05:35:15 +00:00
jerome 8d1c6cd682 MDL-14609 change the wording "Click here to read the Site Policy Agreement" to "Link to Site Policy Agreement" 2008-05-13 02:41:25 +00:00
moodlerobot 4f75b1b68a Updated the 19 build version to 20080513 2008-05-13 02:06:03 +00:00
stronk7 7114adb590 Avoid $_REQUEST["id"] usage. MDL-14806 2008-05-13 01:46:37 +00:00
danmarsden e41839dc50 MDL-12037 - backup does not report errors correctly in backup_module() merged from HEAD 2008-05-13 00:45:15 +00:00
stronk7 9eff824be8 Role custom names (aliases) are now preserved during backup/restore. MDL-14783 2008-05-12 23:05:33 +00:00
stronk7 58e42445d2 Restoring from courses having custom role name doesn't cause duplicate roles. MDL-14808 2008-05-12 22:53:29 +00:00
skodak 536c4f8875 MDL-14692 groupings restore logic switched - credit goes to Vitor Rocio 2008-05-12 19:56:13 +00:00
robertall 5690a10e32 MDL-14442: Import all records of a database activity that has been exported as CSV 2008-05-12 19:55:20 +00:00
skodak abe8f35a49 MDL-14692 groupings restore logic switched - credit goes to Vitor Rocio 2008-05-12 19:53:27 +00:00
stronk7 354176b5fe user preferences are not restored if user exists. MDL-12594 2008-05-12 18:00:40 +00:00
tjhunt 1fca73d04c MDL-14804 - question_list_instances is broken - It does not include the each modules lib file before doing function_exists($module->name.'_question_list_instances'). 2008-05-12 17:29:47 +00:00
tjhunt 07a7a711fa MDL-10899 - followup - need to move random questions too. 2008-05-12 15:59:03 +00:00
tjhunt 26337523fa New convinience function in accesslib: get_parent_contextid. Also, the start of some unit tests for accesslib, but only this trivial funciton, and the get_parent_contexts function it is based on. Still, it is a start. 2008-05-12 15:28:31 +00:00
skodak 21dcd628bc MDL-11719 increased size of idnumber in user table - needed for some enrolment plugins 2008-05-12 14:40:29 +00:00
skodak ed31529ce5 MDL-11719 increased size of idnumber in user table - needed for some enrolment plugins 2008-05-12 14:34:31 +00:00
skodak d3613a1235 MDL-14183 guest type role not allowed in defaultuserroleid anymore, because it was causing trouble in many places; admins must choose another role if guest role detected in this setting 2008-05-12 14:03:18 +00:00
tjhunt 247fa07654 MDL-14797 - Error when moving a course to an empty category on Postgres 2008-05-12 10:44:38 +00:00
jerome 72cecd3b85 MDL-14656 Make welcome.html XHTML compliant 2008-05-12 05:17:46 +00:00
moodlerobot 81af00fbb9 Updated the 19 build version to 20080512 2008-05-12 01:58:00 +00:00
moodlerobot f74c520b87 Automatic installer.php lang files by installer_builder (20080512) 2008-05-12 01:50:55 +00:00
stronk7 a4810441af Prevent excess of unenolments by enrol_database_sync.php. MDL-8550 2008-05-11 23:48:16 +00:00
stronk7 9c13746dab Prevent some notices and process if $CFG->emoticons is not set or empty. MDL-12414 2008-05-11 23:32:34 +00:00
moodlerobot d5d17ef33a Updated the 19 build version to 20080511 2008-05-11 01:52:51 +00:00
stronk7 1c8ec13811 Blogs preference for scheduled backup. I had this here since ages! 2008-05-10 22:05:29 +00:00
moodlerobot 0492535297 New uz installer lang 2008-05-10 02:59:26 +00:00
moodlerobot e476dc67ea file installer.php was added on branch MOODLE_19_STABLE on 2008-05-10 02:59:26 +0000 2008-05-10 02:57:14 +00:00
moodlerobot f9edb1e4e4 Updated the 19 build version to 20080510 2008-05-10 01:58:52 +00:00
diml 6a06def8a1 fixes MDL-14770, $course_id error 2008-05-09 21:50:20 +00:00
tjhunt 48b65cc309 Following the fixes for MDL-14750 and MDL-10899, do a database upgrade that fixes any bogus values in the parent or category columns of multianswer questions' subquestions. 2008-05-09 15:50:45 +00:00
tjhunt ae8701d94d MDL-14750 - Multianswer questions get broken by backup and restore becuase question->parent is not recoded properly in the database. This commit also fixes a regression introduced by the fix for MDL-5482. 2008-05-09 15:10:42 +00:00
tjhunt c31957babf MDL-10899 - There is some data associated with some questons that needs to be udpated when moving questions between categories. This commit deals with subquestions, and lays the foundation for fixing the other problem - datasets - which is files as bug 14767. 2008-05-09 15:05:38 +00:00
tjhunt b0efb18b72 Problem when editing calculated questions when installed on Postgres. 2008-05-09 15:02:25 +00:00
jamiesensei 18d7110673 Oops accidentally reverted this patch. Here it is again. "MDL-14223 "Add a column for the user's idnumber, controllable by a site-wide setting" and MDL-14224 "Add a site-wide setting to hide the user profile image from quiz reports"
The quiz overview report now respect the settings for the gradebook - whether to display idnumbers and user pictures.

Also refactored the code to build table / download content a little to reduce code duplication."
2008-05-09 13:50:24 +00:00
jamiesensei 3114a292df Merging some small differences between HEAD and the 1.9 stable branch. 2008-05-09 13:15:12 +00:00
tjhunt 86462cee30 MDL-14762 - find and update links to files in answer->feedback when moving questions between contexts. 2008-05-09 13:13:45 +00:00
jamiesensei 88a78fa926 MDL-14223 "Add a column for the user's idnumber, controllable by a site-wide setting" and MDL-14224 "Add a site-wide setting to hide the user profile image from quiz reports"
The quiz overview report now respect the settings for the gradebook - whether to display idnumbers and user pictures.

Also refactored the code to build table / download content a little to reduce code duplication.
2008-05-09 13:00:06 +00:00
jamiesensei 6c90434d03 MDL-14637 "allow activity modules to add sub menus of settings pages to admin menu" and MDL-14565 "allow quiz reports to add configuration settings to the admin tree" added a mechanism to admin/settings/plugins.php to allow modules to include a file settingstree.php instead of settings.php which will allow for more flexibility of what a module can add to the admin settings menu. 2008-05-09 06:06:29 +00:00
moodlerobot 49e6e996df Updated the 19 build version to 20080509 2008-05-09 02:00:18 +00:00
moodlerobot 7ca75c035a Automatic installer.php lang files by installer_builder (20080509) 2008-05-09 01:53:42 +00:00
danmarsden a05c7db850 MDL-14736 this doesn't need to be an error call, as the backup should still succeed - changing to use notify() instead. 2008-05-08 22:57:42 +00:00
jamiesensei bef711f560 For the overview report : MDL-14199 "Option to only show / export final grade" small improvement to UI. Include highlighted message in the form about what the current grading method is. Some changes to lang strings for overview report settings form to indicate that options affect downloaded data as well as data shown on the screen. 2008-05-08 10:10:29 +00:00
jamiesensei 50c68d01cc For the overview report : MDL-14199 "Option to only show / export final grade" small improvement to UI. Include highlighted message in the form about what the current grading method is. 2008-05-08 09:51:26 +00:00
jamiesensei 18129bbfee MDL-14198 "Make it clear which student attempt gives the final grade, if the scoring method is first, last or highest score" adding a message about the highlighting above the table. 2008-05-08 09:31:05 +00:00
jamiesensei 1a827abb0c For the overview report : MDL-14199 "Option to only show / export final grade" and MDL-14198 "Make it clear which student attempt gives the final grade, if the scoring method is first, last or highest score" Oops. Seemed to have missed out part of the patch when merging into 1.9 from HEAD. 2008-05-08 08:56:23 +00:00
jerome a85c4eefaf MDL-12300 message window does show date now 2008-05-08 03:40:47 +00:00
jerome 1d8c89c4ad MDL-14716 Install script: icon image are now displayed on the Server Checks page 2008-05-08 03:04:25 +00:00
jerome e7ee1905ff MDL-14697 Participants page OK button hidden if javascript is enabled 2008-05-08 02:42:53 +00:00
jerome 6feba15b31 MDL-12648 Undefined property: stdClass::$wwwroot on popup screen during installation 2008-05-08 02:34:38 +00:00
jerome adb2905dcc MDL-14656 Make install.php XHTML compliant 2008-05-08 02:02:36 +00:00
moodlerobot 597748ddd8 Updated the 19 build version to 20080508 2008-05-08 01:59:01 +00:00
moodlerobot 0df80ebf9c Automatic installer.php lang files by installer_builder (20080508) 2008-05-08 01:51:43 +00:00
stronk7 a8293dd818 Reverting to previous revision. MDL-14668 2008-05-07 18:27:09 +00:00
jamiesensei f39ebcea89 MDL-14734 "improve interface for deleting attempts"
* The control for deleting attempts is a drop down box with onchange javascript to submit the form, you cannot see the label to say what the drop down box does. Better to use a button. The button label is visible so you can see what it does.
* Checkboxes should be displayed when there is no attempt to delete.
* The whole column for checkboxes should be removed when no attempts are displayed ie. when showing students with no attempts.

merged from HEAD
2008-05-07 16:11:17 +00:00
jamiesensei b44c702d45 MDL-14201 "Summary graph" included a summary graph at the bottom of overview report page. Shows the distribution of grades achieved by students. If a group is selected the grades from the group are compared with the grades for all participants. 2008-05-07 14:40:57 +00:00
jamiesensei e0fb4a8743 file overviewgraph.php was added on branch MOODLE_19_STABLE on 2008-05-07 14:40:57 +0000 2008-05-07 14:38:18 +00:00
jamiesensei 839d72b06c For the overview report : MDL-14199 "Option to only show / export final grade" fixing a notice warning from the form definition
Merged from HEAD
2008-05-07 14:02:31 +00:00
tjhunt ae0561140c MDL-14727 - Do a database update to fix random questions with the wrong parent (there may be some of these floating around in people's databases becuase of MDL-5482.)
This is a backport from HEAD. Note that I have intentionally not changed version.php. There is not a spare number, and 1.9.1 is due to be released soon. It is OK for this to wait until then.
2008-05-07 13:35:53 +00:00
tjhunt bbf8fb528f MDL-14726 - rcache bit wrong in set_field 2008-05-07 13:04:39 +00:00
tjhunt d1c840e99c MDL-5482 - Backup and restore problems for match, random and truefalse question types.
All the credit goes to Paulo Matos who carefully worked out and tested this fix, and updated the patch several times over more than a year while I very slowly got around to reviewing it and checking it in.
2008-05-07 12:31:37 +00:00
skodak c8b8b71645 MDL-14724 Students cannot see discussions in forums made by teachers if timedposts enabled 2008-05-07 11:30:59 +00:00
fmarier 57d6548065 Printing ADODB error to the web server error log (MDL-14628) 2008-05-07 04:37:39 +00:00
dongsheng f1bd861709 "MDL-14668, fix course full name in activity reports, see tracker" 2008-05-07 02:58:44 +00:00
moodlerobot 84a36391d5 Updated the 19 build version to 20080507 2008-05-07 01:54:37 +00:00
jamiesensei 6131f70069 For the overview report : MDL-14199 "Option to only show / export final grade" and MDL-14198 "Make it clear which student attempt gives the final grade, if the scoring method is first, last or highest score" 2008-05-06 18:06:33 +00:00
tjhunt 7706180dbd MDL-14681 - Fix package name of question/update.php. 2008-05-06 07:34:38 +00:00
scyrma df7ef3a1a4 MDL-14654: False is a problem, zero is fine. 2008-05-06 04:59:17 +00:00
moodlerobot 0d9a6ca147 Updated the 19 build version to 20080506 2008-05-06 01:58:11 +00:00
jamiesensei beb6d00f46 For overview report - MDL-14185 "Switch to using formslib and improve the interface" and MDL-14186 "Switch to using moodle_url and eliminate the use of $SESSION global" 2008-05-05 13:18:14 +00:00
jamiesensei 9df9473d98 file overviewsettings_form.php was added on branch MOODLE_19_STABLE on 2008-05-05 13:18:14 +0000 2008-05-05 13:12:11 +00:00
thepurpleblob ae875f50eb MDL-14624:
Reverting fix. This needs proxy to have exceptions for local subnets available.
Will work on this in HEAD only
2008-05-05 08:19:50 +00:00
scyrma bdde7324d7 esthetic typo fix 2008-05-05 07:13:22 +00:00
moodlerobot 851942fb7f Updated the 19 build version to 20080505 2008-05-05 01:53:05 +00:00
stronk7 f3f11963d8 Fixing query to be cross-db. Credit goes to David Mudrak. MDL-14583 2008-05-05 00:20:32 +00:00
stronk7 187b3f885d Glossary concepts must support multilang filter (all filters, in fact).
And accesible alt texts for action buttons too. MDL-14687
2008-05-05 00:08:32 +00:00
diml bb6c0ef2cf syntax fix for MSL-14678 2008-05-04 10:48:26 +00:00
moodlerobot 284115288b Updated the 19 build version to 20080504 2008-05-04 02:03:27 +00:00
moodlerobot f50c83ff30 Automatic installer.php lang files by installer_builder (20080504) 2008-05-04 01:58:25 +00:00
moodlerobot 722e45997d New lang supported by installer: cy_utf8 2008-05-04 00:47:53 +00:00
moodlerobot 8acf33144a file installer.php was added on branch MOODLE_19_STABLE on 2008-05-04 00:47:53 +0000 2008-05-04 00:42:16 +00:00
jamiesensei 720c94fa06 MDL-14677 "should rescale the grades displayed for each question in the detailed marks view of the overview report so that all grades add up to the sum total grade" used quiz_rescale_grades function to rescale the grade properly before displaying it. Also this patch includes some general clean up and refactoring of overview report. 2008-05-03 13:43:44 +00:00
moodlerobot 877129cd0d Updated the 19 build version to 20080503 2008-05-03 01:52:19 +00:00
moodlerobot b0e8fede48 Automatic installer.php lang files by installer_builder (20080503) 2008-05-03 01:46:16 +00:00
jamiesensei aa45776dd7 MDL-14663 "link_to_popup_window displays 'Click here....' as the link text if you pass in 0 as the link text."
Also fixing the problem in link_to_popup_window function. Test for null instead of empty.
2008-05-02 16:14:11 +00:00
jamiesensei c912dab6da MDL-14666 "overview report is very inefficient when view detailed marks is selected. There are several sql queries per row." Made a new query outside the loop for adding rows. 2008-05-02 15:25:19 +00:00
jamiesensei ada7af846f MDL-14664 "sorting by question mark when viewing detailled mark in overview quiz report not working" Found that the problem ocurred when attempt.id != attempt.uniqueid as the sql was using the wrong field to join the question records.
Merged from HEAD
2008-05-02 14:23:02 +00:00
jamiesensei 833b1e0045 MDL-14663 "link_to_popup_window displays 'Click here....' as the link text if you pass in 0 as the link text."
Solved this by formatting the grade using number_format to display the grade with a number of decimal places. So for 0 we display something like 0.00 and this displays OK in link_to_popup_window.

Merged from HEAD
2008-05-02 13:29:25 +00:00
poltawski ff0b80cc36 MDL-13716 - When storing progress of scorm activity a 404 is
encountered and js failure on split. Cast to string to avoid this.

thanks to Peter Chamberlin of LJCreate
2008-05-02 10:42:53 +00:00
scyrma 22d205da7a MDL-11342: Urlencode the filepath in directory resource (merge from 1.8) 2008-05-02 08:17:27 +00:00
jerome d492819687 MDL-11382 added a link 'Profil' to the administration block 2008-05-02 05:59:16 +00:00
jerome 97aaaec647 MDL-12864 fix bad XHTML in the messaging popup 2008-05-02 05:17:16 +00:00
jerome 5e6d7b8d6b MDL-12864 fix bad XHTML in the messaging popup 2008-05-02 05:09:41 +00:00
dongsheng 443a1fee8e "MDL-14460, fix all the other get_context_instance,(use sed replace them), see tracker" 2008-05-02 04:07:27 +00:00
scyrma 303e816601 MDL-8592: Get spellchecking to work over https 2008-05-02 03:31:49 +00:00
jerome 9fc2409875 MDL-14439 IE and Opera fire the onchange when ever you move into a dropdwown list with the keyboard - this changes fix the problem. 2008-05-02 02:20:36 +00:00
jerome cbcf18e5b8 MDL-14439 Added javascript file dropdwon.js - fix IE/Opera behavior. They do not fire dropdwon menu onChange automatically anymore. 2008-05-02 02:10:29 +00:00
moodlerobot 931e9d3ec4 Updated the 19 build version to 20080502 2008-05-02 01:53:58 +00:00
scyrma 94b9899627 MDL-13424: Tags are automatically cleaned on cron run. 2008-05-02 01:12:49 +00:00
skodak 66c3b5f155 MDL-14647 fix legacy add_teacher() when approving new course; backported from HEAD 2008-05-01 22:15:44 +00:00
skodak ba3381be5d MDL-14451 removing old upgrade code from HEAD and marking upgrade line in 19 stable 2008-05-01 20:37:22 +00:00
thepurpleblob 71588440e9 Whoops... left some testing code in. 2008-05-01 12:20:39 +00:00
thepurpleblob 0393331c13 MDL-14406
Ensure 'length' field for description type questions is 0 and that
default for all questions is 0
2008-05-01 12:08:04 +00:00
dongsheng 5f3d54fc4e "MDL-7362, allow_call_time_pass_reference setting may cause bug, see tracker" 2008-05-01 08:31:20 +00:00
scyrma 7c68f9da21 MDL-3381: keeping environment.xml in sync (from 1.8) 2008-05-01 08:10:08 +00:00
jamiesensei 1ab2605768 MDL-13678 "Change default number of rows per page on quiz reports" Made a new constant to say how many attempts / questions to list per page by default. 2008-05-01 07:40:54 +00:00
jamiesensei 521601d0ce file reportlib.php was added on branch MOODLE_19_STABLE on 2008-05-01 07:40:55 +0000 2008-05-01 07:08:29 +00:00
dongsheng d4680e253a "MDL-10944, fix undefined property in chatd.php" 2008-05-01 06:53:41 +00:00
scyrma 320e91e2f8 MDL-13424 Fixes suggested by Eloy, in tag_cleanup. 2008-05-01 06:15:09 +00:00
dongsheng 0148e8be18 "MDL-14460, fix all get_context_instance" 2008-05-01 06:02:27 +00:00
scyrma b2057b4917 code beautification 2008-05-01 05:48:42 +00:00
moodler 87dc962b44 MDL-14630 Fixed the exclusion of mentees block from the "my" page 2008-05-01 05:37:56 +00:00
scyrma 20875a12e0 MDL-14590 - Spellchecker now working in the messaging system too 2008-05-01 05:16:26 +00:00
moodlerobot f8ef9c04db Updated the 19 build version to 20080501 2008-05-01 01:58:09 +00:00
moodlerobot ea9b4c707e Automatic installer.php lang files by installer_builder (20080501) 2008-05-01 01:51:55 +00:00
thepurpleblob 9c3c1ab56d MDL-14406
MNET can now establish a peer through a proxy
2008-04-30 14:34:23 +00:00
skodak 2c9a36d79c MDL-14621 indicate missing modules on modules admin page; backported from HEAD 2008-04-30 13:08:46 +00:00
skodak 967e19d6a0 MDL-14621 fix warning when module code missing and editing course; backported from HEAD 2008-04-30 12:40:25 +00:00
skodak 4a440d90b6 MDL-14621 modinfo ignores missing modules now properly; backported from HEAD 2008-04-30 12:34:33 +00:00
skodak fcfd2e8a45 MDL-14621 fixed warning when module code missing; backported from HEAD 2008-04-30 12:25:52 +00:00
poltawski 86ad0ba459 MDL-12614 - Bad regular expression matching was causing syntactically
invalid js when returning to previously attempted SCORM package.

Credit to Peter Chamberlin of ljcreate.com
2008-04-30 11:57:33 +00:00
scyrma 3ceeb19d3c MDL-14569 - Don't count related tags for the tag cloud formatting and count display 2008-04-30 08:50:58 +00:00
jamiesensei 0dd41b1891 MDL-7772 "Quiz results overview: not all combinations of Show attempts with ... & Groups settings work properly"
This patch is based on Ann Adamcik's latest code, thanks Ann. Made a couple of small changes. This is equivalent to the two patches in HEAD for the same bug.
2008-04-30 08:21:01 +00:00
scyrma 5111517c8a MDL-13424 and MDL-14544: New function tag_cleanup removes unused un-official tags, or unlinked tags. Not yet called automatically. 2008-04-30 07:34:28 +00:00
scyrma 876e35b24c Fix tag documentation and add a missing 'return true'. 2008-04-30 06:35:57 +00:00
dongsheng 79fb7ea7d3 "MDL-14460,fix get_context_instance" 2008-04-30 04:45:22 +00:00
dongsheng a5d3cae9d3 "MDL-14538, remove duplicated settings, see tracker" 2008-04-30 03:53:49 +00:00
dongsheng 4955e30c0b "MDL-14465, add a setfocus() function, see tracker, thanks, Ralf" 2008-04-30 03:43:40 +00:00
moodlerobot d75724cb1a Updated the 19 build version to 20080430 2008-04-30 01:55:05 +00:00
moodlerobot aa51ed515c Automatic installer.php lang files by installer_builder (20080430) 2008-04-30 01:48:33 +00:00
dongsheng d3397f0604 "MDL-14262, fix optional_param, and fix link in restorelib.php" 2008-04-30 01:45:45 +00:00
dongsheng 3f5636b56e "MDL-14262, fix wrong logged link, see tracker, merged from MOODLE_18_STABLE" 2008-04-30 01:13:40 +00:00
moodler ed13c57b3b Latest tags file 2008-04-29 06:51:25 +00:00
moodler 94ad221b27 MDL-13261 get_context_users_bycap and get_context_users_byrole were draft and should never have been included in accesslib in 1.9 STABLE. To avoid confusion I've removed these functions. They weren't being used by any core code ... I only hope no-one out there is using them for Moodle 1.9 modules. :-( :-( 2008-04-29 06:48:56 +00:00
scyrma 785c3ff9ac MDL-13985 - Fix previous fix to display a warning when whitespace is used in popup window name 2008-04-29 05:07:57 +00:00
scyrma d8e091627c MDL-13985 - Prevent popup windows from having a space in their name. 2008-04-29 04:04:32 +00:00
scyrma 4d6e43a1dd MDL-14588 - Prevent error message when calling function with null variable 2008-04-29 03:28:25 +00:00
scyrma fcbf9d8a95 Converted file to utf-8 2008-04-29 02:57:24 +00:00
jerome 2467402841 MDL-13815 - Course summary text is optional and empty by default now 2008-04-29 02:20:58 +00:00
moodlerobot 3c724071a5 Updated the 19 build version to 20080429 2008-04-29 01:56:19 +00:00
moodlerobot 6ad59438e1 Automatic installer.php lang files by installer_builder (20080429) 2008-04-29 01:49:53 +00:00
dongsheng cc5d09ac00 MDL-14303, add missing cmidnumber parameter. see tracker 2008-04-29 01:38:21 +00:00
stronk7 d10e856d88 Fixed old-glorious typo in wiki backup. MDL-10811 ; merged from 18_STABLE 2008-04-28 23:08:57 +00:00
poltawski 77666b4acf MDL-12614 - Bad regular expression matching was causing syntactically
invalid js when returning to previously attempted SCORM package.

Credit to Peter Chamberlin of ljcreate.com
2008-04-28 16:51:41 +00:00
diml 0df6befcd9 Contributes to MDL12324 - fixes search failure when using extended chars (non ascii) in query strings 2008-04-28 16:28:06 +00:00
scyrma 42f6931f27 MDL-14569 - Remove linked tags when deleting users. 2008-04-28 08:33:48 +00:00
scyrma f8b1eb504e MDL-14150 - Make tag:edit and tag:manage more distinct - related tags and description are now editing, renaming is managing. 2008-04-28 08:22:36 +00:00
moodlerobot 879761a29f Updated the 19 build version to 20080428 2008-04-28 01:53:12 +00:00
skodak 737498e986 MDL-14564 pg null trouble fixed by David Mudrak; merged from MOODLE_19_STABLE 2008-04-27 22:40:21 +00:00
dongsheng 9bdb39c797 MDL-14262, fix incorrect link, see tracker 2008-04-27 17:01:06 +00:00
stronk7 862d935434 glossary->id for block is now properly recoded by restore. MDL-4934 ; merged from 18_STABLE 2008-04-27 01:55:49 +00:00
moodlerobot 8ab602a484 Updated the 19 build version to 20080427 2008-04-27 01:48:54 +00:00
stronk7 39ce906768 Prevent admin tree to be showed for non-admins in 'my' page. MDL-14225 2008-04-27 00:30:17 +00:00
stronk7 6b1688b15e Implemented more accurate way to retrieve trigger names. MDL-14567 2008-04-26 22:45:04 +00:00
skodak ee90562005 MDL-14055 auth sync constants, needed for sync cleanup - backporting from HEAD 2008-04-26 13:47:30 +00:00
dongsheng e8da9c41f0 MDL-14460, fix get_context_instance, see tracker 2008-04-26 11:07:15 +00:00
moodlerobot a3af58c6f1 Updated the 19 build version to 20080426 2008-04-26 01:54:38 +00:00
stronk7 5eeebe5b48 New setting in require_login() to avoid certain scripts (file.php)
to mess $SESSION->wantsurl. MDL-14495
2008-04-25 18:52:47 +00:00
skodak 2439bedff8 MDL-14484 rerun asearchtemplate upgrade - there were reported problems on some sites 2008-04-25 15:18:54 +00:00
skodak 06f5909a8d MDL-14557 PostgreSQL+empty integer problem: user/editadvanced_form.php - credit goes to David Mudrak; merged from MOODLE_18_STABLE 2008-04-25 14:43:42 +00:00
skodak ae4e154ed9 MDL-14556 reset coursepage state after switchrole 2008-04-25 14:09:07 +00:00
skodak 8e6f40259c MDL-14475 initialised $hideshow 2008-04-25 14:01:23 +00:00
skodak 475419e555 MDL-14543 fixed broken deleting from auth sync 2008-04-25 13:20:28 +00:00
skodak 6547c735ca removing bogus //1 2008-04-25 12:24:52 +00:00
skodak d1e867d052 MDL-13401 fixed REQUEST_URI test 2008-04-25 12:23:21 +00:00
skodak daa4c6c53a MDL-14473 added missing $files param 2008-04-25 12:20:02 +00:00
moodlerobot 7632e30c4f Updated the 19 build version to 20080425 2008-04-25 01:58:27 +00:00
moodlerobot 400781874e Automatic installer.php lang files by installer_builder (20080425) 2008-04-25 01:50:32 +00:00
stronk7 be50571e93 Fixed typo causing restore to existing courses not to work. MDL-14549 2008-04-24 21:47:40 +00:00
stronk7 d25fdffd6e Prevent wrong data->notifications to be stored. Default to 0 if empty. MDL-14540 2008-04-24 17:10:03 +00:00
stronk7 6768c07ed1 Fix tag links in tag clouds. MDL-14547 2008-04-24 16:44:43 +00:00
dongsheng 4d4dc7bf1d MDL-14460, fix get_context_instance 2008-04-24 08:35:47 +00:00
scyrma 5159864bc6 MDL-3381 - Remove all remaining core calls to ctype_* functions in 1.9, and make ctype required for 2.0. 2008-04-24 03:01:30 +00:00
moodlerobot 3a13bda089 Updated the 19 build version to 20080424 2008-04-24 01:58:22 +00:00
sam_marshall e246e032da MDL-14497 Fixed several minor bugs in navmenu() 2008-04-23 17:07:44 +00:00
tjhunt fb0454d62c Eliminate direct references to $_REQUEST and $_POST in the quiz code.
Also, when you edit the quiz, and therefore any preview attempts are deleted automatically, make sure the attempts are deleted properly by calling quiz_delete_attempt on each one, rathern than leaving orphaned junk in the database.
2008-04-23 14:49:24 +00:00
tjhunt 49676c0186 Improve PHPdocs on a function. 2008-04-23 14:30:47 +00:00
tjhunt 029f59fbd1 MDL-13982 - Performance problem when deleting questions from large question banks. Thanks to Michael Spall for this fix. Merged from MOODLE_18_STABLE.
At the same time, remove direct references to $_REQUEST and $_POST in this code.
2008-04-23 13:45:40 +00:00
tjhunt da7f4c196a Tidy up whitespace. 2008-04-23 10:54:57 +00:00
thepurpleblob a2e867b092 MDL-14461:
The user must be (effectively) be logged in to use this function.
Adding the logged in check means they will be asked if they are not (like
everywhere else)
2008-04-23 08:45:29 +00:00
dongsheng 82b04884f3 MDL-14460, fix get_context_instance, see tracker 2008-04-23 08:11:31 +00:00
moodler 117e675602 MDL-14483 Use the recipient language to send email 2008-04-23 02:24:15 +00:00
dongsheng 055f9be516 MDL-14053, include custom profile fields when export user info, see tracker 2008-04-23 02:03:59 +00:00
moodlerobot 6877f88f86 Updated the 19 build version to 20080423 2008-04-23 01:58:40 +00:00
tjhunt 1dfa763a2f MDL-14352 - General feedback for descriptions not showing up on the review page, as it should. 2008-04-22 16:16:58 +00:00
tjhunt 54ee7246cc MDL-14363 - Fix a broken redirect from mod/quiz/ attempt.php to edit.php when the quiz has not questions.
Also, when the quiz has no questions, disable the Info, Reports and Preview tabs, which, in this case, just redirect back to the Edit tab anyway.

Finally, change a redirect in quiz view.php, which used a relative URL, to a full url starting $CFG->wwwroot.
2008-04-22 15:19:45 +00:00
tjhunt 89f9450834 MDL-14467 - qtype_multichoice help file in the wrong place. 2008-04-22 14:34:18 +00:00
tjhunt afe83312b2 MDL-14407 - supplimental - Deal with another way the category id can be in the URL after it is deleted. 2008-04-22 14:06:57 +00:00
skodak a2067bf38d MDL-14424 approve icon now bigger + css class added 2008-04-22 13:34:40 +00:00
skodak 0d4542e24b MDL-8188 fixed missing global $CFG 2008-04-22 13:03:37 +00:00
skodak a5c9d2e444 MDL-14137 adding minor fix for quotes in fieldname 2008-04-22 07:30:52 +00:00
dongsheng 8ea4e65638 MDL-14460, fix get_context_instance, see tracker 2008-04-22 06:16:17 +00:00
dongsheng a6bc0fd2b6 MDL-14460, fix get_context_instance, see tracker 2008-04-22 06:08:47 +00:00
moodler 98d2cd7f7a MDL-8566 My addition, I fixed the navigation on the Permalink pages to show more information
was:   Site > Blogs

now:   Site > User > Blogs > Full blog title
2008-04-22 05:55:34 +00:00
dongsheng 3ff91874a8 MDL-8566, replace permlink with permalink 2008-04-22 05:16:10 +00:00
dongsheng 84fe017f67 MDL-8566, add lang string to MOODLE_19_STABLE, see tracker 2008-04-22 04:34:24 +00:00
moodlerobot 18877525ef Updated the 19 build version to 20080422 2008-04-22 02:01:40 +00:00
stronk7 94fc397cbb Fixed typo, grrr. 2008-04-21 18:09:15 +00:00
stronk7 1b8a70860d Replace custom casting code by proper sql_cast_char2int() core function. MDL-12893 2008-04-21 18:06:59 +00:00
skodak 4aeccc8bf8 MDL-14458 - optgroups Fields and Other in search menu; removed unused search code, html labels, added option to sort by time modified 2008-04-21 14:15:30 +00:00
skodak 12999c3311 MDL-13025 added data intro text formatting without cleaning - manage activity cap already marked with XSS risk 2008-04-21 13:25:04 +00:00
pichetp ebd585bb42 MDL-14435 Removing capitals merging from head 2008-04-21 02:50:43 +00:00
moodlerobot 0ef7420b0e Updated the 19 build version to 20080421 2008-04-21 01:50:39 +00:00
stronk7 fe9384833b Replace low level $db->Concat() calls to Moodle sql_concat() cross-db alternative. MDL-13823 2008-04-20 22:13:44 +00:00
stronk7 5d75612163 Modify sql_concat() to support all elements being numeric. MDL-13823 2008-04-20 21:18:34 +00:00
skodak 1a19384b18 MDL-8474 stats upgrade now uses editing teachers only 2008-04-20 19:54:28 +00:00
skodak a0b8e7637d MDL-14446 fixed inverted read flag in threaded view 2008-04-20 19:37:28 +00:00
skodak a7285f63b4 MDL-14336 defaultsort now stored as field name in preset.xml 2008-04-20 19:21:13 +00:00
skodak 3d3f891d44 MDL-12861 overriding of database settings now optional when using presets 2008-04-20 10:08:04 +00:00
skodak bccb50caab MDL-13188 asearchtemplate.htlm in presets implemented 2008-04-20 09:28:53 +00:00
stronk7 18fe8f7b9c Restore of blogs in SITE page added. MDL-9089 2008-04-20 01:58:40 +00:00
moodlerobot a9c5278c27 Updated the 19 build version to 20080420 2008-04-20 01:48:11 +00:00
stronk7 8312d945fb Added string to restore blogs. MDL-9089 2008-04-20 01:15:54 +00:00
stronk7 aa80e16b12 Adding some missing course info when backuping blogs. MDL-9089 2008-04-19 22:40:30 +00:00
skodak 38ffb6c139 MDL-14417 fixed sql for menu adv search - multimenu already fixed today 2008-04-19 21:20:56 +00:00
skodak 91cf92265e MDL-14018 fixed ##more## icon regression, thanks Robert Allerstorfer for all the testing! 2008-04-19 21:00:26 +00:00
skodak 8713ac5fd3 MDL-14424 - approval icon is bigger again, it is possible to sort by Approved status now 2008-04-19 20:46:56 +00:00
skodak 9e5ef14437 MDL-14018 fixed ugly query - thanks Eloy 2008-04-19 18:02:39 +00:00
skodak cd42b2be8d MDL-14018 fixed regression, proper LIKE meta quoting, fix displaying when options changed 2008-04-19 16:46:50 +00:00
skodak 631c9f5c49 MDL-9907 xhtml strict 2008-04-19 16:43:21 +00:00
skodak 6ba41390ef MDL-12089 several search related problems fixed in data module 2008-04-19 15:31:16 +00:00
moodler 8118207b6f MDL-12742 Deleted language files from the block, copied english one to correct location in core lang pack. 2008-04-19 13:25:39 +00:00
skodak f021a9119f MDL-13936 forum reply refactoring and bugfixing - the forum_user_can_post() did not have discussion parameter which was a problem because the login depends on discussion group - there was a hack in discussion.php and view.php working around this, but it was not present in cron; sorry for the change of API, but it was required 2008-04-19 10:47:42 +00:00
skodak 857ec70622 MDL-14428 fixed tag cron warning 2008-04-19 09:51:53 +00:00
moodlerobot 52bb51f204 Updated the 19 build version to 20080419 2008-04-19 01:50:22 +00:00
skodak f542e41fdd MDL-13936 improved new lang string 2008-04-18 20:18:18 +00:00
skodak 6fd207292f MDL-13936 indicate that user needs group membership to add new discussion, but only if having the capability to add new discussion - previously the message was incorrectly shown even when not having the cap in separate mode, visible mode needs this message too after previous commit; new lang string added in case user selects all participants in group selector and does not have accessallgroups - the existing group membership string could not be reused 2008-04-18 19:28:49 +00:00
skodak f7e75ede04 MDL-13936 users without accessallgroups can post start discussions only in own groups if groupmode enabled in forum (either separate or visible), this was the way it worked in Moodle <1.8 2008-04-18 18:51:01 +00:00
stronk7 5d64f72c23 MDL-14072 - Prevent NULLs, empties and numbers to be processed by:
- backup_encode_absolute_links() at backup
- restore_decode_absolute_links() at restore
2008-04-18 16:55:29 +00:00
skodak 0e36e50b0b MDL-12895 frontpage participants page improvements 2008-04-18 08:28:58 +00:00
scyrma 0eca93e5be MDL-14104: generate_password() now respects password policy 2008-04-18 07:55:38 +00:00
skodak 9b231c86ec MDL-11511 adding accidentaly removed replacement during last revert 2008-04-18 07:43:18 +00:00
moodler 6c089f4a28 MDL-11323
Cleaned up the display of role aliases by extending get_assignable_roles
and get_overrideable_roles to use role_fix_names better.

The lists of assignable and overrideable are now correctly derived from the
actual context (eg activity or module) while the aliases are derived from course
that is the parent.

Some other cleanups along the way.
2008-04-18 06:18:25 +00:00
moodler fe01ad8ec0 MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students (Merged from 1.7) 2008-04-18 03:31:54 +00:00
dongsheng f6f3408324 MDL-12992, keep roles tabs consistent, see tracker 2008-04-18 03:10:31 +00:00
dongsheng d72e36cce7 MDL-14137, use addslash in get_settings() and remove the second parameter of htmlspecialchars() 2008-04-18 02:11:42 +00:00
moodlerobot bcdc90679d Updated the 19 build version to 20080418 2008-04-18 01:54:30 +00:00
diml ff3af6786d Fixes MDL-14377 UTF8 misconversions in search results 2008-04-17 20:49:18 +00:00
diml 504c188064 Fixes MDL-14325 2008-04-17 20:48:16 +00:00
skodak 6c9af98401 MDL-14052 fixed course display in upcoming events block - credit goes to Greg Rodenhiser 2008-04-17 19:19:11 +00:00
diml 183eb24d8d Fixes all registered unstabilities in MDL-14325, MDL-14328 and closes those buglines.
default values for global search parameters,
command quoting issues status choosed untill better resolution,
typo error in error message
2008-04-17 19:19:04 +00:00
tjhunt be80fc7e66 MDL-14407
1. After deleting a question category, it redirects you back to a question bank URL. In some circumstances, this URL will contain a cat=nnn parameter of the category you have just deleted, which naturally leads to an error. This parameter needs to be removed.

2. When there are questions in the category that need to be moved, the category id we are moving to is not exploded on ','.
2008-04-17 15:59:47 +00:00
wildgirl bff131f52e MDL-14040 help file typo fixes reported by Ray Lawrence 2008-04-17 14:59:30 +00:00
wildgirl 00c573bbce MDL-14040 help file typo fixes reported by Ray Lawrence 2008-04-17 14:49:28 +00:00
wildgirl 257ae54b65 help file typo re-fix, thanks to Ralf Hilgenstock to pointing out the mistake 2008-04-17 13:30:54 +00:00
tjhunt bd5ec8cef4 MDL-8682 - yet another followup. The javascript still was not quite right. you cannot rely on the case of element.nodeName. 2008-04-17 13:07:34 +00:00
wildgirl 8f476f51bf help file typo fix 2008-04-17 13:07:28 +00:00
wildgirl 281295d2b9 MDL-14388 help file rewording 2008-04-17 12:20:44 +00:00
dongsheng 1987fb0808 MDL-14320, remove useless icon in edit entry page 2008-04-17 09:41:56 +00:00
moodler 0a8b14d0d7 MDL-14399 Applied RTL patches from Hebrew team without modification. They look OK to me and won't affect LTR as far as I can tell. 2008-04-17 08:28:24 +00:00
dongsheng fc0a3140db MDL-11511, use a new version to avoid potential problems. 2008-04-17 08:09:35 +00:00
scyrma f0a6326181 MDL-12860 - do input sanitization early, so as to not mess up display later 2008-04-17 08:01:40 +00:00
dongsheng 2004936d44 MDL-11511, revert changes, see tracker 2008-04-17 07:51:39 +00:00
dongsheng 850d5da191 MDL-11511, revert changes, see tracker 2008-04-17 07:38:26 +00:00
dongsheng 4b6c7b206b MDL-11511, revert the changes, see tracker 2008-04-17 07:34:57 +00:00
moodler 08b8a69610 MDL-12279 RTL fix for category number alignment 2008-04-17 07:18:27 +00:00
dongsheng 69ef0b666c MDL-11511, make logic more clear 2008-04-17 05:57:37 +00:00
dongsheng d77d361e3d MDL-11511, two new caps are introduced, see tracker 2008-04-17 05:39:47 +00:00
dongsheng c4abdd2816 MDL-14137, donot filter single and double quote anymore, see tracker 2008-04-17 02:58:03 +00:00
dongsheng 96a8c8e639 MDL-8188, add approve.gif to chameleon theme 2008-04-17 02:26:41 +00:00
moodlerobot 9e7f36a948 Updated the 19 build version to 20080417 2008-04-17 01:52:25 +00:00
moodlerobot 527f62f6af Automatic installer.php lang files by installer_builder (20080417) 2008-04-17 01:45:47 +00:00
skodak 35ef2c8919 MDL-9907 searching ilike pg compatibility fix 2008-04-16 18:56:31 +00:00
tjhunt e24aa3d6ba MDL-14392 - Notice from description question types when you don't have edit permission 2008-04-16 16:56:34 +00:00
skodak afece01121 MDL-14018 fixed searching when date order selected 2008-04-16 15:08:33 +00:00
skodak 38d6fc273a MDL-14018 fixed searching when date order selected 2008-04-16 15:07:12 +00:00
skodak f271e4112e MDL-14390 fixed saving of multiselect field type 2008-04-16 14:50:58 +00:00
tjhunt b63b26f1aa MDL-14391 - Timestart shown twice in quiz overview report, instead of timefinish 2008-04-16 14:39:39 +00:00
skodak ae65fba742 MDL-14389 fixed adv search flag storage 2008-04-16 14:08:34 +00:00
skodak 33096a7bb9 MDL-9907 searching/sorting by author name fixed when paging, MDL-14389 more transition fixes 2008-04-16 13:52:32 +00:00
skodak 05cdffa828 MDL-9907 searching/sorting by author name fixed when paging, MDL-14389 more transition fixes 2008-04-16 13:52:32 +00:00
skodak 49a60852e8 MDL-14389 fixed transition from advanced to simple view if multiple fields used 2008-04-16 13:31:00 +00:00
skodak 309b6caaa5 MDL-14018 advanced search for multiselect menu improved 2008-04-16 13:19:46 +00:00
skodak bf44458bd2 MDL-14388 shuffling the field/butting lists a bit 2008-04-16 12:29:21 +00:00
skodak 14e404f960 MDL-9758 backported timeadded and timemodified + improved lang strings 2008-04-16 12:03:28 +00:00
skodak 24ca59f03e MDL-9907 searching/sorting by author name 2008-04-16 11:44:52 +00:00
dongsheng 7c589aa751 MDL-8566, add permlink, see tracker 2008-04-16 09:04:45 +00:00
dongsheng 2904df1380 MDL-14249, to keep ods lib exactly the same with excellib, some dummy function added 2008-04-16 07:05:06 +00:00
scyrma 56f2d43291 MDL-3381 - changing call to ctype_space to remove dependency on ctype 2008-04-16 03:35:37 +00:00
dongsheng c4fcff1d13 MDL-14317, fix parameter type, see tracker, thanks Stephen 2008-04-16 03:23:09 +00:00
dongsheng 8c8660ae5c MDL-14320, improve coding style, thanks Petr 2008-04-16 02:43:04 +00:00
dongsheng 612bbdefad MDL-14367, change alt text, see tracker 2008-04-16 02:35:54 +00:00
dongsheng 4c404aa348 MDL14312, remove align attribute in table tag 2008-04-16 02:29:55 +00:00
moodlerobot eefe474a0d Updated the 19 build version to 20080416 2008-04-16 01:50:00 +00:00
skodak 075d93f958 MDL-14113 fixed forum_count_user_posts() regressions - thanks Dan! 2008-04-15 21:56:14 +00:00
stronk7 e8ee249670 Finally fixed version of lastaccess hadling.
Moved from add_to_log() to require_login(). MDL-14272
2008-04-15 21:42:50 +00:00
stronk7 afd99f1f07 Correct usage of debugging. MDL-11893 2008-04-15 21:31:10 +00:00
stronk7 7d23ab127f Fixing logic + minor formatting of email. MDL-11893 2008-04-15 20:01:27 +00:00
dongsheng 2df5a942f3 MDL-14311, fix minor html errors 2008-04-15 05:53:51 +00:00
dongsheng 6fdfabaf42 MDL-11893, append failed SQL to email, see tracker 2008-04-15 05:36:25 +00:00
dongsheng 2dd4271bcb MDL-14310, fix minor bug in html, see tracker 2008-04-15 04:21:14 +00:00
dongsheng d64cc008d2 MDL-8188, fix approve.gif icon 2008-04-15 03:53:06 +00:00
dongsheng 6fa83c2add MDL-8188, moved from mod/glossary/check.gif 2008-04-15 03:43:50 +00:00
dongsheng 97da7bed2a MDL-8188, move check.gif to pix/i/approve.gif, see tracker 2008-04-15 03:42:36 +00:00
moodler 364a7f4f98 MDL-4485 Made sure views of the online assignment are logged like the others 2008-04-15 03:40:09 +00:00
dongsheng 03506f373f file approve.gif was added on branch MOODLE_19_STABLE on 2008-04-15 03:43:50 +0000 2008-04-15 03:33:05 +00:00
dongsheng a3691d7ef1 MDL-14314, use css style to close auto-wrap 2008-04-15 03:12:30 +00:00
dongsheng 3be617a985 MDL-14320, remove icon when no file in entry, Thanks Robert 2008-04-15 02:37:29 +00:00
moodlerobot f0c8025bbc Updated the 19 build version to 20080415 2008-04-15 01:58:16 +00:00
stronk7 e5c375e29c Cleanup of phpdoc + some clarifications when specifying colors. MDL-14354 2008-04-14 22:40:55 +00:00
skodak 9032900612 MDL-13936 fixed group handling when adding new discussions 2008-04-14 19:04:00 +00:00
skodak a745c8abee MDL-14113 when adding/editing posts the target group is now visible + fixed permission check when replying (removed obsolete mygroup function) 2008-04-14 18:33:46 +00:00
skodak db4095092f MDL-14113 digest finished message now in system lang + eliminated one has_capability call 2008-04-14 17:11:24 +00:00
skodak 1de384c32d MDL-13004 post ratings in user profile page 2008-04-14 12:03:58 +00:00
skodak 15bf342ec7 MDL-14113 fixed replies regression 2008-04-14 11:32:09 +00:00
skodak db65c8ca8f MDL-14270 separate groups mode and single discussion forums == normal students can not reply 2008-04-14 09:38:04 +00:00
skodak e21607e203 MDL-14270 workaround for FF alignment issue 2008-04-14 09:30:46 +00:00
skodak aeb85c2797 MDL-14270 mode selector alignment for single discussion forums 2008-04-14 09:22:59 +00:00
skodak 354c67d262 MDL-14270 fixed regressions - fatal error in forum code 2008-04-14 08:59:50 +00:00
skodak 10f40eec25 MDL-14349 adv forum search accessibility 2008-04-14 08:50:58 +00:00
skodak 14b2880f3b MDL-12505 general advanced search cleanup + added capability test to recent activity 2008-04-14 08:04:49 +00:00
skodak be22faa965 MDL-14113 fixed notices when tracking disabled 2008-04-14 07:31:24 +00:00
moodlerobot 16f75b4eba Updated the 19 build version to 20080414 2008-04-14 01:56:13 +00:00
moodlerobot 44ad54efea Automatic installer.php lang files by installer_builder (20080414) 2008-04-14 01:50:02 +00:00
stronk7 0cb6604857 Restore to the frontpage should work now (interface). MDL-12760 2008-04-13 23:53:38 +00:00
stronk7 ac1358665d Minor fixes in the restore form when restoring from within SITEID. 2008-04-13 23:26:55 +00:00
skodak add8d12caa MDL-14346 database preset throws Fatal error 2008-04-13 23:00:38 +00:00
skodak ee57cdb57d MDL-14345 undefined contexts and sesskey in new preset_class.php 2008-04-13 22:57:09 +00:00
skodak 1bdbe3964e MDL-14342 fixed wrong quotes 2008-04-13 22:17:08 +00:00
skodak abbf392ed1 MDL-14343 fixed groups_get_user_groups() when groupings disabled 2008-04-13 21:58:31 +00:00
skodak 474ade7a7d MDL-14113 patch for multiple issues - see tracker for subtasks 2008-04-13 19:10:35 +00:00
stronk7 21de682b37 Fixed missing string on restore. MDL-14330 2008-04-13 02:03:21 +00:00
moodlerobot 9df9cacc9c Updated the 19 build version to 20080413 2008-04-13 01:50:39 +00:00
stronk7 d81585ed6a Blogs added to scheduled backup. MDL-9089 2008-04-13 01:34:06 +00:00
stronk7 67a8c620b6 Blogs backup added. MDL-9089 2008-04-13 01:25:55 +00:00
stronk7 e06a19af92 Preparing for blogs backup. New string. MDL-9089 2008-04-13 01:19:05 +00:00
stronk7 34a00a23d5 Preparing for blogs backup. Helper function. MDL-9089 2008-04-13 01:16:16 +00:00
moodlerobot 3ede3c4be6 Updated the 19 build version to 20080412 2008-04-12 01:49:01 +00:00
moodlerobot dfcb02766e Automatic installer.php lang files by installer_builder (20080412) 2008-04-12 01:42:43 +00:00
diml 93bff91055 fixes reported quote issue on $file in shel exec commands (MDL14325) 2008-04-11 23:21:35 +00:00
dongsheng 58ab8bffd3 MDL-14249, add more needed functions to excellib.php 2008-04-11 07:38:54 +00:00
scyrma 7cad8ab660 MDL-9410 - In user profile display, add http:// to web links if it's not already there 2008-04-11 06:57:26 +00:00
dongsheng 37fb4b6c7f MDL-10735, fix worksheet name, thanks our patch Mitsuhiro Yoshida 2008-04-11 05:45:59 +00:00
dongsheng b9d7e5f583 MDL-12662, fix undefined index(IIS) 2008-04-11 05:24:26 +00:00
gbateson 5a761ab83a do not show hidden HotPots on mod/hotpot.index.php 2008-04-11 05:09:01 +00:00
dongsheng 450f580012 MDL-9534, fix xmlize() call 2008-04-11 03:59:14 +00:00
moodlerobot 26687962c2 Updated the 19 build version to 20080411 2008-04-11 01:55:11 +00:00
stronk7 f4cb414111 Check for 60s interval from PHP. Save 3 queries per request. MDL-14272 2008-04-10 20:57:10 +00:00
sam_marshall 0bd80872c5 doc comment change: improved comment on download_file_content to clarify $headers 2008-04-10 12:08:28 +00:00
skodak 7152a7833f MDL-14301 wrong label - credit goes to Daniele Cordella; merged from MOODLE_19_STABLE 2008-04-10 09:07:42 +00:00
skodak 403b1e85d8 MDL-14300 unclosed input - credit goes to Daniele Cordella 2008-04-10 09:04:38 +00:00
moodler 3a23d626f3 MDL-14293 Fixed uninitialised $status variable 2008-04-10 03:33:47 +00:00
moodlerobot 08225e2a51 Updated the 19 build version to 20080410 2008-04-10 01:52:40 +00:00
dongsheng 6b533b4584 MDL-14137, replace htmlentities with htmlspecialchars 2008-04-09 06:07:06 +00:00
dongsheng d17e23ee7a MDL-12611, realign the help icon 2008-04-09 03:43:05 +00:00
dongsheng 2293c3cd02 MDL-12611, realign the metacourse help and cost help icon 2008-04-09 03:32:14 +00:00
dongsheng 9011bb8224 MDL-14128, cannot use a full string in the param. 2008-04-09 03:03:49 +00:00
dongsheng 1bed04c61b MDL-14091, fix myMoodle courses list sort order, Thanks Iñaki 2008-04-09 02:43:51 +00:00
moodlerobot 6bd99cf609 Updated the 19 build version to 20080409 2008-04-09 01:53:55 +00:00
stronk7 5c978acd07 Unset rcahe on UPDATE statements not using dmllib.php. MDL-14257 2008-04-08 23:12:08 +00:00
diml 6aba72e06f fixes slash issues that avoid finding relative pathes to converters 2008-04-08 22:01:09 +00:00
dongsheng 29a2749da5 MDL-12531, make the new member value available to all the affected plugins, thanks, Robert 2008-04-08 05:40:15 +00:00
dongsheng 96eb0bd743 MDL-14079, improve UI consistency 2008-04-08 03:47:59 +00:00
dongsheng cbb5738c23 MDL-12611, fix the alignment of help icons. 2008-04-08 03:28:21 +00:00
scyrma 061a4b01be 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. (1.9 - original
patch)
2008-04-08 03:02:49 +00:00
moodlerobot 3d229827b8 Updated the 19 build version to 20080408 2008-04-08 01:57:47 +00:00
moodlerobot ceb2d03736 Automatic installer.php lang files by installer_builder (20080408) 2008-04-08 01:50:55 +00:00
dongsheng 93e32c5f7f MDL-14085, roll back some error() call 2008-04-08 01:45:25 +00:00
stronk7 1a13367f78 Respect inherited default enrol method when deciding to display the course cost. MDL-14096 2008-04-07 23:42:54 +00:00
diml d3d9d95f42 sync with HEAD/1.8 compatible 2008-04-07 21:45:07 +00:00
diml ee95c70444 sync with HEAD/1.8 compatible 2008-04-07 21:34:17 +00:00
diml ab42d25ac1 updating Zend engine to 1.5.0 2008-04-07 21:32:52 +00:00
diml 3ae9e88793 global sync to HEAD for passing fixes 2008-04-07 21:28:10 +00:00
diml c5244b4f3e file Wildcard.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:53 +0000 2008-04-07 20:45:44 +00:00
diml 7ba9cd4a78 file Range.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:53 +0000 2008-04-07 20:45:43 +00:00
diml be69717a20 file Insignificant.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:53 +0000 2008-04-07 20:45:43 +00:00
diml e66bb1797e file Fuzzy.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:53 +0000 2008-04-07 20:45:43 +00:00
diml 4a8da19c12 file LowerCaseUtf8.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:53 +0000 2008-04-07 20:44:21 +00:00
diml fa34b952f9 file CaseInsensitive.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:53 +0000 2008-04-07 20:43:30 +00:00
diml ef04e681c9 file LockManager.php was added on branch MOODLE_19_STABLE on 2008-04-07 21:32:52 +0000 2008-04-07 20:38:19 +00:00
skodak c6569182cc MDL-14240 reverting previous commit 2008-04-07 12:15:20 +00:00
moodlerobot e04de8e20b Updated the 19 build version to 20080407 2008-04-07 01:53:08 +00:00
mudrd8mz 5b28f2b17f MDL-13997 Correct linking between missing mode and compare mode. Backported from HEAD. 2008-04-06 19:41:59 +00:00
joseph_rezeau c07d5ff235 emoved mistakenly committed clozejr format 2008-04-06 17:46:55 +00:00
joseph_rezeau 62382645cb closejr small hack to "pseudo-export" the questions inside a category into a new, unique cloze/multianswer question - by Joseph R?zeau 2008-04-06 17:14:27 +00:00
stronk7 3a6a84b79b Enforce DOT as decimal separator for Oracle. MDL-11629 2008-04-06 15:30:17 +00:00
moodlerobot 8cfb08638b Updated the 19 build version to 20080406 2008-04-06 01:47:38 +00:00
moodlerobot bc65820fd0 Updated the 19 build version to 20080405 2008-04-05 01:33:13 +00:00
stronk7 f45a63ee62 Documenting local hack about MDL-14215 2008-04-04 22:33:39 +00:00
stronk7 7e56570572 Fixed bug preventing correct detection of enums under mysqli. MDL-14215 2008-04-04 19:53:25 +00:00
stronk7 136c064f3a Fix wrong conversion from '0' to '' in oracle_diry_hack. MDL-14182 2008-04-04 11:19:36 +00:00
dongsheng 8ccbb75512 MDL-14079, add "Hidden" string after the hidden teacher, thanks Mathieu 2008-04-04 06:40:34 +00:00
dongsheng f9c06a4b94 MDL-14177, remove the useless h1 tags 2008-04-04 06:23:21 +00:00
dongsheng 78bc1f9ce6 MDL-10662, I found these bugs when I was working on MDL-14068 2008-04-04 04:32:59 +00:00
moodlerobot 022de3941f Updated the 19 build version to 20080404 2008-04-04 01:32:47 +00:00
moodlerobot 5133ebb08c Automatic installer.php lang files by installer_builder (20080404) 2008-04-04 01:26:29 +00:00
stronk7 c98670a5e3 Fixed DST calculation when requesting explicit (parameter) timezones. MDL-14093 2008-04-03 18:01:39 +00:00
moodlerobot bd0dc7fe3d Updated the 19 build version to 20080403 2008-04-03 01:26:04 +00:00
stronk7 df681accd9 MDL-13900 - If the course or the parent category are hidden and the user hasn't the 'course:viewhiddencourses' capability, prevent access 2008-04-03 00:57:31 +00:00
thepurpleblob 282cd5aec2 Replaced some nasty 'magic numbers' with defines. 2008-04-02 13:57:56 +00:00
nicolasconnault fbf5f5c483 MDL-14026 Backported the changes to the grade help files in HEAD 2008-04-02 06:54:03 +00:00
skodak 808bdc658a fixed typo 2008-04-02 06:50:20 +00:00
skodak 832a20fc17 cvs commmit notification test - fixed tabs 2008-04-02 06:42:58 +00:00
nicolasconnault 78c05837f4 MDL-14081 Adding the fullname value to test grade_outcomes 2008-04-02 06:36:36 +00:00
skodak 9e41616dab MDL-14034 List of participants in SITE course failing... - fixed last access - credit goes to Eloy 2008-04-02 06:33:30 +00:00
dongsheng dbb82a47ca MDL-14128, remove all uses of error(get_string()) 2008-04-02 06:09:56 +00:00
moodlerobot 003f4c662a Updated the 19 build version to 20080402 2008-04-02 03:41:38 +00:00
stronk7 c4e8b525de Force download checkbox is not initialized properly, credit goes to skodak. MDL-14010 2008-04-01 22:16:50 +00:00
skodak 95245d35a6 MDL-14126 fixed undefined message 2008-04-01 19:47:47 +00:00
dongsheng 73c7b457a9 MDL-14126, cron shouldn't print html tags 2008-04-01 16:03:46 +00:00
skodak e43ed443fe MDL-10660 reverting previous changes - see tracker 2008-04-01 08:47:04 +00:00
dongsheng 5957e19ae3 MDL-14085, Make print_error() autonomous 2008-04-01 06:15:54 +00:00
dongsheng 56fcf4b1b2 MDL-14111, multilang htmlblock title 2008-04-01 06:00:09 +00:00
dongsheng ad1db4c380 MDL-14111, change it back. 2008-04-01 05:30:18 +00:00
dongsheng 38b8f21410 MDL-14085, Move error() to deprecatelib.php 2008-04-01 04:07:01 +00:00
moodlerobot 525afa8223 Updated the 19 build version to 20080401 2008-04-01 03:36:11 +00:00
dongsheng 1ac8d21f76 MDL-14111, Multilang html-block title, thanks Gordon Bateson 2008-04-01 01:34:35 +00:00
stronk7 e76ddb2da6 Prevent cloning of non-object. Delegate to parent method as fallback. MDL-14120 2008-03-31 22:50:35 +00:00
tjhunt d3bba8da1b MDL-8682 - the last commit caused a regression that stopped it working.
!something==somethingelse

is not the same as

something!==somethingelse

in javascript, it seems.
2008-03-31 15:07:16 +00:00
nicolasconnault 08cebb831a MDL-14073 New param for download_file_content: skipcertcheck. ssl now used in recaptchalib. Merging from HEAD 2008-03-31 12:17:59 +00:00
scyrma ec8f711d06 MDL-14103 - remove the call to s() - the string has to already be in html format. 2008-03-31 06:52:16 +00:00
nicolasconnault dddf8e46ef MDL-13397 Fixed the language string. Merging from HEAD 2008-03-31 06:16:09 +00:00
moodlerobot 7b05b2702e Updated the 19 build version to 20080331 2008-03-31 03:38:22 +00:00
skodak 40b3f45dec MDL-8270 ignore blocks that can not be instantiated 2008-03-30 14:35:12 +00:00
moodlerobot 0651a3115b Updated the 19 build version to 20080330 2008-03-30 03:37:10 +00:00
stronk7 1f579d5052 Not visible courses don't cause unenrolment under LDAP anymore. Credit goes to Iñaki Arenaza. MDL-14097 2008-03-30 00:44:23 +00:00
moodlerobot 4048d5cf73 Updated the 19 build version to 20080329 2008-03-29 03:30:40 +00:00
moodler 7942f4377a MDL-14086 Hide navigation tabs when being forced to complete profile 2008-03-28 06:32:13 +00:00
moodlerobot 515ae2a180 Updated the 19 build version to 20080328 2008-03-28 03:38:17 +00:00
nicolasconnault 60ddeb3f09 MDL-14065 Fixed gradebook unit tests, including a bug fix in grade_item class.
Commented out buggy backuplib tests, and replaced E_ALL with DEBUG_DEVELOPER in dmllib tests

Backporting from HEAD
2008-03-27 17:13:00 +00:00
skodak afe0df456f MDL-14077 Mails form messages not RFC2822 conform 2008-03-27 17:08:51 +00:00
skodak cb5f71b27f MDL-14074 removed obsoleted $CFG->enablerecordcache = true; backported from HEAD 2008-03-27 08:48:34 +00:00
skodak 07c2d960d0 MDL-14074 removed obsoleted $CFG->enablerecordcache = true 2008-03-27 08:35:34 +00:00
gbateson f44721b9f7 fix typo: switch (HOTPOT_DISPLAYNEXT_QUIZ)
should be: switch ($hotpot->displaynext)
2008-03-27 08:16:44 +00:00
gbateson 37b267d4ec fix hotpot version number so hotpot_update_grades is correctly triggered. New version is 2007101511 2008-03-27 07:23:31 +00:00
gbateson e55ee4ba01 force hotpot grades (pre Moodle 1.9 on 27th Mar 2008) to be updated:
(1) call "hotpot_updated_grades()" from db/upgrade.php
    (2) fix typo in "hotpot_updated_grades()" - "s.id' should be "h.id"
    (3) micro-increment version number to trigger the update
2008-03-27 03:41:43 +00:00
moodlerobot cde5a89a74 Updated the 19 build version to 20080327 2008-03-27 03:37:22 +00:00
stronk7 d86eb86faa Change tooltip text by Helen's suggestion. MDL-13940 2008-03-26 23:49:54 +00:00
thepurpleblob 24037e0f07 Fixed typo in debug message, causing notice 2008-03-26 15:11:19 +00:00
sam_marshall f1d31dfee3 MDL-14051 Changed timeout behaviour for download_file_content so curl has a read timeout 2008-03-26 12:59:51 +00:00
skodak 2feaf50aa1 MDL-14060 fixed cm caching in forum cron 2008-03-26 09:16:06 +00:00
moodlerobot f0cf5bc1d3 Updated the 19 build version to 20080326 2008-03-26 03:41:59 +00:00
moodlerobot 27e661082b Automatic installer.php lang files by installer_builder (20080326) 2008-03-26 03:28:14 +00:00
scyrma d6be0ca412 MDL-14057 - Change position of the continue button. 2008-03-26 03:00:42 +00:00
dongsheng a057fabf60 MDL-13151, add a new language string: phone2, thanks for your idea, James 2008-03-26 02:46:48 +00:00
dongsheng e4d75c6f2e MDL-12531 add institution to lockable fileds, thanks for your patch, Lgor Plisco 2008-03-26 02:26:25 +00:00
dongsheng c9f43908a4 MDL-10660, check whether memcache has been installed. 2008-03-26 02:18:53 +00:00
skodak 9e13cb7144 MDL-13360 fixed regression - notifications going more than once a day 2008-03-25 23:03:24 +00:00
jmg324 402b744fd6 added new gradebook preference for backup silently function to avoid notice errors later in backup process. 2008-03-25 15:40:27 +00:00
poltawski ffa16956e6 MDL-14050 - count(FALSE) == 1 . This was causing fatal errors when scorm_scoes were
empty.
2008-03-25 14:36:34 +00:00
scyrma 4aee1d4ecb small code cleanup 2008-03-25 09:35:56 +00:00
moodlerobot 6a6723a267 Updated the 19 build version to 20080325 2008-03-25 03:37:11 +00:00
moodlerobot 44c109eb7e Automatic installer.php lang files by installer_builder (20080325) 2008-03-25 03:25:12 +00:00
scyrma 830abccdda MDL-14041 - Hide 'manage tags' when access is not permitted 2008-03-25 01:44:54 +00:00
dongsheng bc673426bd MDL-10606 Corrected course search box id 2008-03-25 01:23:16 +00:00
stronk7 09d10cdc1a Fix visualization under FF. MDL-14039 2008-03-24 23:05:13 +00:00
stronk7 6b98139026 New string for hidden roles eye in participants page. MDL-13940 2008-03-24 22:07:15 +00:00
stronk7 be24cfe9c2 If the user has hidden role assignments, the icon should be the closed eye. MDL-13935 2008-03-24 22:04:37 +00:00
skodak 6f5d60121b MDL-14023 frontpage edit summary centering issue 2008-03-24 20:23:57 +00:00
skodak 0ea152345f MDL-14032 rewritten forum_tp_clean_read_records() - it should not run out of memory anymore + other minor memory savings 2008-03-24 19:50:26 +00:00
stronk7 1ebff51139 Restore escaped from latest tag-lib refactoring. MDL-14038 2008-03-24 16:37:46 +00:00
stronk7 8809f87505 Adding help file for forcedownload option. MDL-14010 2008-03-24 10:32:49 +00:00
stronk7 afe91850a8 Added missing string for forcedowload option. MDL-14010 2008-03-24 10:29:32 +00:00
moodlerobot a393ece095 Updated the 19 build version to 20080324 2008-03-24 03:32:53 +00:00
stronk7 612b2f8c2c Make list of participants to work on SITE course. Fix for MDL-14034 2008-03-24 01:27:50 +00:00
skodak 7912ecb1b1 MDL-14029 html2text throws tons of notices is style or script tags found 2008-03-23 16:51:05 +00:00
skodak bc0dc73d24 MDL-14027 cron sometimes hangs in rss_client block 2008-03-23 16:23:48 +00:00
skodak 2dc6c4abe2 MDL-8270 full block backup/restore - based on patches by Mark Nielsen and code in HEAD by Tim Hunt 2008-03-23 15:56:03 +00:00
skodak a18258a969 MDL-8270 full block backup/restore - based on patches by Mark Nielsen and code in HEAD by Tim Hunt 2008-03-23 15:50:08 +00:00
moodlerobot 90165e2d01 Updated the 19 build version to 20080323 2008-03-23 03:30:16 +00:00
stronk7 af0322b9b3 Update timezone rules to tzdata2008a. MDL-14024 2008-03-22 23:36:14 +00:00
skodak 4c86245c5e MDL-14008 various SUM aggregation bugfixes 2008-03-22 21:25:39 +00:00
skodak b8ad30bec7 MDL-14008 various SUM aggregation bugfixes 2008-03-22 21:19:08 +00:00
skodak c78e0578f7 MDL-14021 replaced sloppy JOIN ON TRUE with CROSS JOINs - ora or ms does not like it 2008-03-22 20:21:25 +00:00
moodlerobot 1de8fe9ea6 Updated the 19 build version to 20080322 2008-03-22 03:30:43 +00:00
ethem aebf995894 get_recordset() for performance 2008-03-21 12:08:28 +00:00
moodlerobot 440f829392 Updated the 19 build version to 20080321 2008-03-21 03:29:08 +00:00
skodak fd25cefe34 MDLSITE-320 some debug code for digest times in forum cron 2008-03-20 22:31:06 +00:00
skodak 5452f37f23 MDL-2674 minor lang improvement 2008-03-20 21:16:32 +00:00
wildgirl 34aa9e6818 MDL-2674 PHP code removed from help file, small rewording 2008-03-20 21:07:50 +00:00
wildgirl 0f3cf17a4b MDL-2674 PHP code removed from help file 2008-03-20 20:48:20 +00:00
skodak fe3987a324 MDL-13619 legacy restore revisited -fixed sortorder 2008-03-20 20:07:35 +00:00
skodak 40af907f97 MDL-13393 detect broken cm instances when doing backup - prevents trouble during restore 2008-03-20 19:39:08 +00:00
diml 30ab1999fb shooting out debug code see MDL-13993 2008-03-20 19:31:42 +00:00
skodak d3d7ba8f7a MDL-13619 legacy restore revisited 2008-03-20 19:15:38 +00:00
poltawski e4c6b6b470 MDL-13994 - lang typo, thanks to Charles Kelly 2008-03-20 12:19:26 +00:00
ikawhero 16aa360aac Fixed typo that was affecting the reordering of custom profile fields.
MDL-13909.
2008-03-20 09:14:47 +00:00
dongsheng cd3a029451 MDL-12263, under certain conditions, $catctxids is NULL, so an if statement should be here. 2008-03-20 07:16:33 +00:00
scyrma 6d8c1e5e58 MDL-13985 - removed call to get_string, translation of this string made no sense and broke badly. 2008-03-20 07:04:02 +00:00
nicolasconnault 1ca801982a MDL-13880 Overridden and excluded grades are now coloured with alternate row colours that override the default alternate row colours (gray). I also fixed the long-standing notice about aggregationposition. See attached patch. Merging from HEAD 2008-03-20 06:26:20 +00:00
moodlerobot 3f86d1c681 Updated the 19 build version to 20080320 2008-03-20 03:36:24 +00:00
scyrma f52c805656 MDL-13959 - Fix from Eloy - this makes the timezone-related functions accept an optional parameter different from the current user timezone. 2008-03-20 02:59:50 +00:00
skodak 2934dce435 MDL-13899 force resending of all assignment grades into gradebook so that the submitted and graded dates get updated 2008-03-19 23:18:59 +00:00
skodak 9bb38ad7d2 MDL-13990 ignore bogus dirs in moodledata/user during upgrade 2008-03-19 23:07:53 +00:00
skodak 567c3be0a2 MDL-13986 "User view" Activity report links are invalid - patch by Matthew Davidson 2008-03-19 22:46:48 +00:00
skodak 945fec4e6d MDL-13899 improved submission and grading date hack 2008-03-19 22:38:09 +00:00
skodak 5db52de0fa MDL-13899 assignments should be now sending proper submissions and grading dates into gradebook 2008-03-19 22:33:18 +00:00
nicolasconnault 28df24fc95 MDL-13880 Overridden and excluded grades are now coloured with alternate row colours that override the default alternate row colours (gray). I also fixed the long-standing notice about aggregationposition. See attached patch. Backporting from HEAD 2008-03-19 16:16:20 +00:00
tjhunt 50522dae6e MDL-13978 - Notice when adding a new quiz 2008-03-19 12:21:54 +00:00
skodak 0e432a1d81 MDL-13811 p() can not be used to print html text, it does plaintext only or form values & button names 2008-03-19 10:46:32 +00:00
scyrma f9bc559511 MDL-13934 - Commit patch by Eloy - prevent display of moodle docs link on redirect pages 2008-03-19 08:18:48 +00:00
scyrma ab14532e7f MDL-12093 - remove added classes - they don't help the issue and clutter the code 2008-03-19 08:15:40 +00:00
scyrma 79d3cc8589 MDL-13434 Addslashes removed, is added whenever necessary in tag/lib.php. 2008-03-19 08:11:02 +00:00
scyrma 5198be103b MDL-12235 deprecated document_file function. Not found anywhere in core. 2008-03-19 07:56:56 +00:00
moodler b6f293036f MDL-13810 Fixed check for join 2008-03-19 07:48:45 +00:00
moodlerobot da336c9649 Updated the 19 build version to 20080319 2008-03-19 03:36:36 +00:00
skodak c014235e75 MDL-13899 feedback itself is a type of grading - date graded is now affected by feedback too 2008-03-18 23:20:13 +00:00
skodak 6ace2cf04c MDL-13899 feedback itself is a type of grading - date graded is now affected by feedback too 2008-03-18 22:54:14 +00:00
skodak 688b962ee4 MDL-13610 made assignment submissions table 100% wide 2008-03-18 17:18:01 +00:00
skodak 792068fa8d MDL-11007 groupmembersonly support for glossaries 2008-03-18 17:11:53 +00:00
skodak 592d0165e9 MDL-10990 forum perf revisited - reply and post discussion buttons now back for guests 2008-03-18 17:07:00 +00:00
skodak 3f21bfb704 MDL-13807 assignment_showrecentsubmissions does not hide submissions on recent activity full report - patch by Jason Meinzer 2008-03-18 16:44:25 +00:00
skodak dda0672145 MDL-13824 use 0 for all groups - patch by ELoy 2008-03-18 16:41:53 +00:00
skodak 563392734f MDL-13921 Incorrect access given to members of group included in 2 groupings 2008-03-18 16:37:21 +00:00
nicolasconnault c77cf00618 MDL-13953 The dropdown was not populated using the same methods as elsewhere in Moodle. Backporting from HEAD 2008-03-18 16:03:00 +00:00
scyrma 0584008dc4 MDL-13594 - Fixes a display problem with "flagged" tags, code cleanup, other small fixes.
MDL-13434 - Cleaned up a bit more the api
MDL-13687 - If a manual relation is added to a tag, the opposition relation will be added at the same time.
2008-03-18 08:29:19 +00:00
skodak f8eacd07ec MDLSITE-320 digest processing should be able to continue without duplicates if fails 2008-03-18 08:26:45 +00:00
moodlerobot 13dbf19ec1 Updated the 19 build version to 20080318 2008-03-18 03:37:42 +00:00
scyrma 541b11c434 MDL-12514 - Added missing js library (thanks Johannes Albert) and fixed missing string escaping. 2008-03-18 01:20:50 +00:00
skodak 45d3c87b30 MDL-2674 adding $cm->grouping reset if groupings not restored; removed info about groups included in backup - they are always included, and there will not be any global groups/groupings 2008-03-17 21:54:47 +00:00
skodak c153af6351 MDL-2674 backup always backsup/restores groups regardless of user settings; backported from HEAD 2008-03-17 21:27:53 +00:00
skodak 8527371af3 MDL-13847 gradebook backup/restore fixes, xhtml strict fixes, other minor fixes 2008-03-17 19:36:35 +00:00
nicolasconnault 889aaef90e MDL-13743 Added realmedia support. Merging from MOODLE_18_STABLE 2008-03-17 13:14:31 +00:00
nicolasconnault ed75557ce9 MDL-13903 New file resource option for forcing the download of the file instead of embedding it. Backporting from HEAD 2008-03-17 12:56:37 +00:00
skodak 6b3281b20e MDL-13949 removed adobe reader XSS bug workaround 2008-03-17 12:35:35 +00:00
stronk7 2a5d6b8035 Glossary extended search fixed. MDL-13947 2008-03-17 12:29:13 +00:00
moodlerobot 86a226f6ca Updated the 19 build version to 20080317 2008-03-17 03:36:04 +00:00
skodak 2b47d8926a MDL-13943 improved perf when sending multiple grades into grade_update() 2008-03-16 23:21:35 +00:00
skodak 931ad967da MDL-13945 prevent fatal errors in all rs_xx functions 2008-03-16 22:46:31 +00:00
skodak 57525b9420 MDL-13944 rs_close() does not throw fatal error if rs does not exist aynmore 2008-03-16 22:06:55 +00:00
moodlerobot 267ecadfe9 Updated the 19 build version to 20080316 2008-03-16 03:34:15 +00:00
skodak 9e8a2d77ef MDL-13939 stats produce bogus role/course data if user has several different enrolments 2008-03-16 01:23:35 +00:00
diml f0bb791809 syncing with other branches block level lang packs for search. 2008-03-15 23:22:11 +00:00
skodak 435dd405d5 MDL-13866 adding warning that regrading of forums may take a while 2008-03-15 22:50:28 +00:00
stronk7 f47b53dd0a Prevent duplicate users in list when user has both visible and hidden roles. MDL-13935 2008-03-15 21:52:10 +00:00
skodak 37168eadd6 MDL-13920 adding warning that regrading of assignments may take a while 2008-03-15 18:51:50 +00:00
skodak 96015624c1 MDL-13412 Allow callers of email_to_user() to set wordwrap 2008-03-15 17:03:27 +00:00
skodak a1ac8fd963 MDL-13893 fixed hiding of editor buttons, added labels there too 2008-03-15 16:36:23 +00:00
skodak 043fd9c793 MDL-13927 indicate missing parent languages 2008-03-15 16:09:50 +00:00
skodak 72ec0c3baa MDL-13927, MDL-13938 indicate missing parent languages and allow multiselection when importing langs 2008-03-15 16:08:23 +00:00
skodak 5a79a02a79 MDL-13093 "Continue" link jumps over items 2008-03-15 15:04:29 +00:00
skodak 5d0160f8f5 MDL-13886 whitelist text-decoration in kses cleaning 2008-03-15 15:00:03 +00:00
skodak d332a153a8 MDL-13920 assignment without grades now sets text grade type, fixed overriding of feedback and overriding logic in general on grade edit page 2008-03-15 14:54:07 +00:00
moodlerobot c9cebbcdaf Updated the 19 build version to 20080315 2008-03-15 03:38:08 +00:00
moodlerobot 02c62cb3d5 Automatic installer.php lang files by installer_builder (20080315) 2008-03-15 03:23:53 +00:00
gbateson cbebda6a36 require_once $CFG->dirroot."mod/hotpot/lib.php"; // get the "hotpot_is_visible" function 2008-03-15 01:17:01 +00:00
scyrma 892174bda5 MDL-13236 fixes a regression - thanks to Steve Wright for the patch. 2008-03-14 08:19:50 +00:00
moodlerobot 098a9ff379 Updated the 19 build version to 20080314 2008-03-14 03:35:37 +00:00
moodlerobot eb2af98aaa Automatic installer.php lang files by installer_builder (20080314) 2008-03-14 03:23:15 +00:00
nicolasconnault 7ee7cb758a MDL-13796 Committing new recaptcha element. Merging from HEAD 2008-03-13 15:45:31 +00:00
sam_marshall c147575b6c MDL-13915: Fixed add_to_log when very long url is specified (now doesn't try to insert more than 100 chars into database) 2008-03-13 15:25:12 +00:00
nicolasconnault 5fd87bf13c MDL-13919 Fixed undefined variable. Merging from MOODLE_18_STABLE 2008-03-13 14:02:34 +00:00
nicolasconnault ce60661535 MDL-13300 Adds verbosity to the heading above the list of participants, showing which group is selected, and the inactivity time period, if either of these two filters are used. Merging from HEAD 2008-03-13 12:17:27 +00:00
wildgirl 976b0d2f2f MDL-12251 lang string typo fix 2008-03-13 10:22:34 +00:00
scyrma 2f06efca9a Fixed a bug introduced somewhere down the late modifications.. 2008-03-13 08:34:57 +00:00
moodlerobot 4db516ba85 Updated the 19 build version to 20080313 2008-03-13 03:37:40 +00:00
skodak 65299ae590 MDL-13845 rewritten rounding in grades classes again - rounding done also before storage into db so that we can compare the values properly and skip db updates if possible + some more optimisations 2008-03-12 19:44:39 +00:00
nicolasconnault 5673b0ce58 MDL-13796 Backported recaptcha element from HEAD. 2008-03-12 12:37:34 +00:00
nicolasconnault 19466f5699 file recaptcha.html was added on branch MOODLE_19_STABLE on 2008-03-12 12:37:34 +0000 2008-03-12 06:56:37 +00:00
moodlerobot 4646b94ab0 Updated the 19 build version to 20080312 2008-03-12 03:46:53 +00:00
moodlerobot f54f4b22a9 Automatic installer.php lang files by installer_builder (20080312) 2008-03-12 03:33:00 +00:00
skodak 0690424663 MDL-13895 incorrect title and alt on grade edit icon in gradebook reports 2008-03-11 23:58:51 +00:00
danmarsden 320ce836d1 MDL-13892 partial fix - check var first before using! 2008-03-11 19:00:38 +00:00
thepurpleblob 673e73d799 MDL-13872:
Display a dash when no grade info, suppresses notice.
2008-03-11 14:24:12 +00:00
skodak fd74d39545 MDL-13884 fixed incorrect left join, thanks Tim 2008-03-11 10:50:58 +00:00
skodak 8a55979706 MDL-13884 Students assigned at site or course category level do not appear in grader report 2008-03-11 09:50:26 +00:00
skodak a2051dc458 MDL-13885 fixed participation report problems 2008-03-11 09:20:29 +00:00
skodak e1e2d33d8a MDL-13881 fixed silly logic bug when disabling rcache - patch by Matt Clarkson 2008-03-11 09:04:29 +00:00
ethem 0b82096d87 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:26:42 +00:00
moodlerobot 81e8e321cc Updated the 19 build version to 20080311 2008-03-11 03:50:05 +00:00
moodlerobot 6d6d43d1df Automatic installer.php lang files by installer_builder (20080311) 2008-03-11 03:32:52 +00:00
pichetp c59a69dab8 MDL-12421 rounding merging from head a little correction line 77 2008-03-10 21:29:07 +00:00
skodak 7ff4e151ed MDL-13866 scale ratings do not work in forum 2008-03-10 21:18:44 +00:00
skodak bbf2de8d3b MDL-13866 fixed stupid bug in my last commit 2008-03-10 21:17:18 +00:00
skodak 5c691fc5fc MDL-13866 fixed stupid bug in my last commit 2008-03-10 21:16:57 +00:00
skodak e694d551b5 MDL-13878 use ints for old values of scales in grader report 2008-03-10 20:24:11 +00:00
garethmorgan e83460ac86 Populated $overridableroles and $assignableroles to make roles tags accessible. MDL-13803 2008-03-10 19:01:32 +00:00
nicolasconnault 49e1894df3 MDL-13796 Most of the recaptcha implementation is done. 2008-03-10 17:21:32 +00:00
andreabix 688df1279e fixed [MDL-13181] 2008-03-10 16:27:05 +00:00
andreabix c281745c42 Fixed [MDL-12830] 2008-03-10 15:53:10 +00:00
andreabix 361536479a Added grade pass/fail colours. Fixed label line height in course page 2008-03-10 15:13:34 +00:00
pichetp 4272fc068c nextpageparam["forceregeneration"] was not implemented correctly line 582 merging
from head
2008-03-10 12:00:58 +00:00
nicolasconnault 2b00d67a44 MDL-13789 Updating index.html and editing decimalpoints.html 2008-03-10 11:27:08 +00:00
nicolasconnault 5f58a4a398 MDL-13789 Removing useless files. 2008-03-10 10:46:12 +00:00
skodak a55cfa4fa1 MDL-13866 scale ratings do not work in forum; merged from MOODLE_19_STABLE 2008-03-10 10:45:49 +00:00
nicolasconnault 3fecb85f5b MDL-13789 Removing useless files. 2008-03-10 10:41:07 +00:00
skodak f74e0556dd MDL-13866 scale ratings do not work in forum 2008-03-10 10:40:21 +00:00
nicolasconnault de5971270b MDL-13852 Fixed help string links. 2008-03-10 10:11:15 +00:00
skodak 0f332452fe MDL-13863 detect missing idnumbers in formulas after restore 2008-03-10 09:34:52 +00:00
skodak 29ed8ead20 MDL-13862 grader report - do not show column averages if error found 2008-03-10 09:32:25 +00:00
nicolasconnault 1505b92d40 MDL-13830 Added colours for gradepass and gradefail. 2008-03-10 06:36:43 +00:00
moodlerobot c1a8231dfa Updated the 19 build version to 20080310 2008-03-10 04:31:07 +00:00
gbateson 0c11a3b0df 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:28 +00:00
stronk7 a72cd02f9e Ensure only target groups_members are added to backup. MDL-12453 2008-03-09 17:26:25 +00:00
moodlerobot 9046955f03 Updated the 19 build version to 20080309 2008-03-09 03:50:20 +00:00
arborrow a93679c79b MDL-13593 - added statement about non case sensitivity 2008-03-09 02:40:32 +00:00
skodak 52d6376cb9 MDL-13853 automatic fixing of incorrect grade category paths 2008-03-08 23:22:34 +00:00
skodak 5ce37277d3 MDL-13853 incorrect paths when moving grade categories - affects aggregation in subcategories 2008-03-08 22:37:27 +00:00
stronk7 5b7a62a269 Wood-ize groupinfo boxes. 2008-03-08 22:28:06 +00:00
skodak 9312d39243 MDL-13851 fixed disappearing grade categories in PHP4 2008-03-08 22:11:56 +00:00
skodak 83bf96e1ee cosmetic fix for CONTEXT:SYSTEM fetching 2008-03-08 15:36:00 +00:00
skodak a24259df35 MDL-13850 fix automatic creation of course grade item 2008-03-08 15:33:49 +00:00
skodak 11ff786551 MDL-13849 add API method to use outcome in course into grade_outcome class 2008-03-08 15:29:04 +00:00
skodak e347d1c0f9 fixed db warning 2008-03-08 15:27:01 +00:00
skodak 5f72b90848 add debug code for missing course id when getting course grading category 2008-03-08 15:09:52 +00:00
skodak 6b90b67d7c MDL-13848 backup form - do not include checkboxes for mods that are not used in course 2008-03-08 15:07:59 +00:00
skodak b6e8bdbbad MDL-13842 Error migrating grades for exercise module... 2008-03-08 12:57:23 +00:00
skodak c1393f970c MDL-13845 major performance problems when regrading course 2008-03-08 12:49:49 +00:00
moodlerobot cc4f01a09a Updated the 19 build version to 20080308 2008-03-08 03:56:08 +00:00
moodlerobot 1edcd3e2e0 Automatic installer.php lang files by installer_builder (20080308) 2008-03-08 03:40:48 +00:00
tjhunt 43d565b15f MDL-13836 - When grades are imported, list users who had grades imported, but who are not currenly in the course. 2008-03-07 17:30:52 +00:00
nicolasconnault b6b9873174 MDL-12356 Patched grade_grade->is_passed() method so that it returns null when the gradepass value is null or equal to grademin, or when the finalgrade is null. 2008-03-07 14:08:27 +00:00
nicolasconnault 291a7deb3e MDL-13709 Removing unneeded file 2008-03-07 13:26:53 +00:00
wildgirl aab5a32a63 MDL-13820 help file typo fixes 2008-03-07 13:11:55 +00:00
nicolasconnault 36f9513fc6 MDL-12854 Added required rule for submission text 2008-03-07 09:17:13 +00:00
nicolasconnault b412f4ac03 MDL-13820 Removed aggregation2.html and fixed typos in aggregation.html 2008-03-07 08:54:58 +00:00
moodlerobot d0e9296d42 Updated the 19 build version to 20080307 2008-03-07 03:57:28 +00:00
moodlerobot 63e7059c90 Automatic installer.php lang files by installer_builder (20080307) 2008-03-07 03:40:05 +00:00
danmarsden e352659420 MDL-13812 choice options not shown when limit enabled. 2008-03-06 19:55:24 +00:00
ethem ea9f82462a get_recordset in cron() for performance. Backported from HEAD. 2008-03-06 17:13:23 +00:00
nicolasconnault df87047314 MDL-12182 Fixing unit tests for gradebook. Mainly a change in set_locked() arguments. 2008-03-06 13:44:47 +00:00
andreabix 38302a5459 Fixed arrow problem in IE6 2008-03-06 10:32:51 +00:00
nicolasconnault bee7fad9b6 MDL-13046 Fixed notices 2008-03-06 09:41:24 +00:00
scyrma 2e291dfa51 MDL-12860 - Patch from Joseph Rézeau, to fix a problem in the display of lesson result when using regexp. 2008-03-06 08:02:09 +00:00
gbateson eb84b02feb remove trailing whitespace on everyline and standardize line endings 2008-03-06 07:34:02 +00:00
gbateson f01e8f7c24 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 06:59:44 +00:00
scyrma f06680badc MDL-13795 - Proposed fix to show a nice string instead of a non-existent deadline. 2008-03-06 04:57:42 +00:00
moodlerobot 5e0289bcde Updated the 19 build version to 20080306 2008-03-06 04:07:26 +00:00
moodler d8f4ee51a5 MDL-13810 Fixed check for ul.timeaccess 2008-03-06 02:11:53 +00:00
tjhunt edd01f0e5f MDL-13794 - Reordering tool does not work if you type the same number into two boxes.
Also, fix some javascript that did not work in IE7.
2008-03-05 10:16:16 +00:00
scyrma ee8bc9d180 MDL-13791 - fix to prevent notice 2008-03-05 10:15:52 +00:00
nicolasconnault 77e95f5bd3 MDL-13787 Updated get_pref() so that it looks up a short version of the config variable (grade_ instead of grade_report_) in case the first isn't set. It also returns null if no variable is found. 2008-03-05 07:09:03 +00:00
moodler 835625bf4c Fix up display of version in footer 2008-03-05 05:34:16 +00:00
moodler 3559450d81 Make the release build display a bit neater 2008-03-05 05:27:17 +00:00
moodlerobot d98bdd3592 Updated the 19 build version to 20080305 2008-03-05 04:20:00 +00:00
scyrma 7a6df50371 MDL-13769 - Fix for postgresql 2008-03-05 01:44:33 +00:00
stronk7 74c8a06e3e Simplify anydb_escape_string() to use simple-cross-db addslashes(). MDL-13793 2008-03-04 23:40:14 +00:00
danmarsden 4b02f546ee MDL-10358 Scorm package not updating correctly - calling function in lib not included. merged from HEAD 2008-03-04 22:26:30 +00:00
danmarsden 754104acb4 MDL-11722 - incorrect string - creating new one so that other lang packs translate it correctly. 2008-03-04 20:01:39 +00:00
skodak 7e3d9f3c18 MDL-13762 some debug code and workaround for sloppy use of recordsets 2008-03-04 09:23:08 +00:00
skodak f4d0a18a41 MDL-13360 expire notification problems 2008-03-04 08:54:09 +00:00
moodlerobot b53905ab09 Updated the build version 2008-03-04 07:30:29 +00:00
moodlerobot e31601a7f9 Updated the build version 2008-03-04 07:27:36 +00:00
moodler 1e2f651f2e Bumping release name post 1.9 2008-03-04 05:38:21 +00:00
moodlerobot 1568332295 Automatic installer.php lang files by installer_builder (20080304) 2008-03-04 03:51:57 +00:00
skodak ee1cbb3856 MDL-13741 Incorrect max size shown when using course upload limit; patch by Jason Meinzer 2008-03-03 20:48:54 +00:00
skodak 6904fe1e26 MDL-13749 Front Page Calendar: Not displaying information from courses student is a member of. 2008-03-03 20:39:19 +00:00
arborrow a15965fc5f MDL-13593 - adding uploadpictures.html help file 2008-03-03 17:42:08 +00:00
nicolasconnault 79147f355b MDL-13709 Removing escape slashes. 2008-03-03 12:36:40 +00:00
moodler aaa252dbc1 Bumoping version of module too 2008-03-03 12:02:12 +00:00
moodler 6f82b46490 Bumping backup version to 1.9 release date 2008-03-03 11:55:15 +00:00
moodler 60a6ca5f38 New version and requires (same as 1.9 release) 2008-03-03 11:48:39 +00:00
moodler 3dff726aa1 New block versions for 1.9 release 2008-03-03 11:41:01 +00:00
nicolasconnault 7fa6c5f12b MDL-13709 Re-entering the admin strings 2008-03-03 11:26:07 +00:00
skodak 67fbbc6a26 MDL-13730 site setting for aggregation of scales 2008-03-03 11:02:19 +00:00
nicolasconnault 72a2effa06 MDL-13709 More lang fixes. 2008-03-03 10:50:38 +00:00
nicolasconnault 99d4c223ff MDL-13709 66 new lang files, and links to these help files have been updated wherever found. 2008-03-03 10:29:44 +00:00
nicolasconnault e0bc9f3bec MDL-13709 66 new lang files, and links to these help files have been updated wherever found. 2008-03-03 10:21:32 +00:00
wildgirl e14a0902ed MDL-12759 lang string typo fixes 2008-03-03 10:11:07 +00:00
moodler 8a1d2fdf0d Final tags for 1.9 2008-03-03 07:31:32 +00:00
nicolasconnault 4efe1f63ca MDL-13663 Updated the link to configshowquickfeedback 2008-03-03 07:27:07 +00:00
moodler 585b76a0e8 Bumping the version to Moodle 1.9 in preparation for release. 2008-03-03 07:06:31 +00:00
moodler 15e6b71bc0 MDL-13754 Avoid joining to lastaccess unless we really wanted it
Plus some other cosmetic tidying and comments
2008-03-03 06:19:31 +00:00
moodler 94c265fe95 MDL-11484 Added some colors for overridden grades 2008-03-03 05:54:43 +00:00
moodler 9f3c4120f9 Fixed a notice 2008-03-03 05:27:36 +00:00
moodler 734b4d4dd1 MDL-13478 Cleaned up some variables 2008-03-03 05:24:29 +00:00
moodler 94cf182211 MDL-13753 Show percentages under numbers for result columns 2008-03-03 05:11:39 +00:00
moodler 2c7def765e MDL-13478 use count() function to count arrays 2008-03-03 04:38:36 +00:00
moodler 63ae91cc6d MDL-13478 - massive performance fixes
- general tidying up

           This patch is a mix of Dan Marsden's fairly extensive tidying up
           plus my fixes which bring db calls down to a constant value (from something
           like 6 calls per user response).  Thanks Dan!
2008-03-03 04:26:59 +00:00
moodler f7c44f3873 MDL-13722 Preview now works when when idnumbers might be empty 2008-03-02 15:15:07 +00:00
moodler 58331043d0 MDL-13475 Fixed some character lengths for course->shortname and role->shortname (100char) 2008-03-02 15:02:25 +00:00
moodler 08dc6e642a MDL-13717 Applied hack from Nicklas to fix sitemp etc. It worked for me in a quick test. 2008-03-02 01:20:23 +00:00
nicolasconnault 6a22b20efd MDL-13663 More lang string updates. 2008-03-01 16:56:41 +00:00
skodak ccb472e7b9 fixed groups property typo 2008-03-01 16:19:48 +00:00
skodak eccbfc92ae MDL-13705 2008-03-01 13:10:39 +00:00
nicolasconnault d4e9a98087 MDL-13663 Last lang string change. 2008-02-29 22:17:43 +00:00
nicolasconnault 1b44161802 MDL-13564 Deduced the missing strings from similar strings found in auth.php 2008-02-29 22:11:09 +00:00
nicolasconnault 66fd7a7612 MDL-13736 Wrapped the link in a div and fixed the style. 2008-02-29 21:44:08 +00:00
stronk7 60a18dc226 rebuild_course_cache() to calculate modinfo before role assignments. MDL-13740 2008-02-29 19:53:40 +00:00
nicolasconnault 7209121b5d MDL-11484 Changed the display of overridden and locked grades 2008-02-29 17:05:40 +00:00
tjhunt f154315266 MDL-13738 - Invalid context developer debug notice in manual grading. 2008-02-29 16:22:13 +00:00
moodler 189bb2de50 MDL-10990 Reverting patch for (5) for forum display for guests (from 27 Feb)
We really need this feature, there must be another way to still gain performance here.
2008-02-29 15:18:13 +00:00
stronk7 35cff7a641 Deletin the grader->get_numusers() method. I was doing some not
needed checks (I guess copied from load_users(), where they have
sense). Fallback to grade_report->get_numusers(), that looks ok. MDL-13403
2008-02-29 15:10:16 +00:00
danmarsden f0e4cbcabd MDL-13478 performance fixes. 2008-02-29 11:58:32 +00:00
nicolasconnault 464b3d80fa Notices on empty array index. 2008-02-29 10:06:43 +00:00
scyrma 08450fe007 MDL-13728 - No need for tag:changetype after all 2008-02-29 09:32:57 +00:00
scyrma 6387e05acd MDL-13728 - Tag form editing now provides a checkbox to set the tag type (official or not) 2008-02-29 09:31:58 +00:00
moodler fd21a93e5f MDL-13676 Fixed some mistakes 2008-02-29 08:55:42 +00:00
scyrma 548a5a4ae3 MDL-13728 - Removing old capabilities and creating a new one for tag type modifications. 2008-02-29 08:43:22 +00:00
moodler f45aff70d9 MDL-13676 Changed a field so that Oracle can cope with a COALESCE statement. :-(
I hate doing this at this late stage, but without it Oracle fails.

           On the way I also fixed the profile page so it displays role aliases if they exist
2008-02-29 08:40:39 +00:00
moodler 63b33f502d New tags file for 1.9 2008-02-29 07:49:53 +00:00
moodler 8f79558997 MDL-13568 Only show full profiles if capability allows it (FERPA) 2008-02-29 07:10:06 +00:00
scyrma 31820054f2 MDL-13728 - Removing old code, this is now in the tag management interface. 2008-02-29 07:08:23 +00:00
moodler 536273ae99 MDL-11960 DIsable rss block on tags pages :-( 2008-02-29 07:04:27 +00:00
moodler e331f94902 MDL-13727 Added a cpability check when showing blog entries 2008-02-29 06:51:02 +00:00
moodler 8a53bb7c91 Added error string for MDL-13725 2008-02-29 06:36:27 +00:00
moodler 97634109b7 MDL-13725 Fixed errorcode typo 2008-02-29 06:32:42 +00:00
moodler c7aebb6755 MDL-13725 Remove tag_get_tag_by_id completely
I also re-ordered tag/lib.php a bit
2008-02-29 06:25:22 +00:00
moodlerobot e8b45d3e1d Automatic installer.php lang files by installer_builder (20080229) 2008-02-29 03:36:24 +00:00
stronk7 9059cb4550 Raising to 1.9 final 2008-02-29 01:43:04 +00:00
tjhunt 078c8b402b MDL-12776 - Quiz email notification and separate groups mode - student not in group -> all teachers get email I have changed it so that if the quiz is set to groups mode, and if the student is not in a group, then only teachers with 'accessallgroups' get emailed. 2008-02-28 22:44:10 +00:00
tjhunt 0a22085fdb MDL-13723 - Unbalanced brackets in get_users_by_capability in the groups bit. 2008-02-28 22:39:15 +00:00
tjhunt 14942a2508 MDL-12815 - Quiz uses inconsistent class attribute for the paging bar. I have added the standard .paging class, but I have left the old class there too, so as not to break existing themes. 2008-02-28 21:43:47 +00:00
skodak 0abc6db872 MDL-13705 2008-02-28 21:16:56 +00:00
skodak 0771778fff MDL-13705 2008-02-28 21:00:13 +00:00
nicolasconnault cbca4dbf6c Changing "overall average" to "Course average" in the outcomes report. 2008-02-28 15:51:25 +00:00
nicolasconnault 0e55fb3512 MDL-13718 New icon for "locked" state icon, for grades whose grade item is locked. 2008-02-28 15:40:42 +00:00
tjhunt 3747744140 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:52:59 +00:00
nicolasconnault 0b0bfed7f3 MDL-13712 Fixed 2008-02-28 12:40:38 +00:00
nicolasconnault 2a1245108c Corrected a few US spellings (z in categorized for example). 2008-02-28 08:57:21 +00:00
urs_hunkler 591f3a61ab added new icon 2008-02-28 08:14:24 +00:00
scyrma b893b91a47 MDL-12726 - Making the htmlarea width default to 598 if it's null, don't touch it otherwise 2008-02-28 08:13:08 +00:00
moodlerobot e018b8db42 Automatic installer.php lang files by installer_builder (20080228) 2008-02-28 03:41:27 +00:00
moodler 0e8422bf22 MDL-13659 Change display of groupings on course page 2008-02-28 03:37:03 +00:00
martinlanghoff 551f60bd3b MDL-90: Remove System.php until we have sorted licensing issues. 2008-02-28 03:16:18 +00:00
scyrma dec87682bf MDL-11242 - Setting the width back to it's 1.8 value. This makes it a bit too large for the message window, but is necessary for IE7/Vista 2008-02-28 03:11:37 +00:00
nicolasconnault 38e533a43c MDL-13663 Docs updated. 2008-02-27 19:04:03 +00:00
skodak 0ed613096c MDL-13681 fixed forum search 2008-02-27 18:49:08 +00:00
nicolasconnault 6778021371 MDL-13699 Followed Helen's instructions. 2008-02-27 18:43:07 +00:00
urs_hunkler d3228e8238 MDL-13700 :: added fontsizes for tag clouds 2008-02-27 18:40:06 +00:00
andreabix b17ce9a429 Fixed MDL-12564 2008-02-27 17:36:53 +00:00
nicolasconnault 2758b9a780 MDL-11924 Changed setting quickfeedback to showquickfeedback and added the toggle accordingly. 2008-02-27 17:03:46 +00:00
andreabix 3fb558da2f Updates and fix for Moodle 1.9 2008-02-27 13:41:08 +00:00
nicolasconnault 5c32a46383 MDL-13674 Course category fullname field is no longer required. If set to empty it will be recorded in the DB as ?, and the course name will be used instead wherever the category name is displayed. 2008-02-27 12:45:10 +00:00
urs_hunkler 4b76cb6fc0 MDL-13648 :: removed the chameleon settings 2008-02-27 12:06:49 +00:00
skodak 7c6e10fe39 MDL-90 fixed quickforms pear include regression 2008-02-27 11:08:01 +00:00
urs_hunkler 68d6a45263 MDL-13648 :: several enhancements/changes due to the discussion in the Moodle tracker:
_ changed the README - Custom corners is now experimental
_ styles_colors from standard included - all the usabilty work using colors will automatically show up in Custom corners too
_ optimized the JavaScript which adds the necessary layouttable classes to the body tag
_ Chameleon engine removed - developers throw in CSS at the end without caring if the Chameleon engine can handle it
2008-02-27 10:31:28 +00:00
nicolasconnault 517e069dec /MDL-13578 New links implemented. 2008-02-27 10:11:50 +00:00
skodak ed1b0d012c MDL-13690 activity outcome items do not support calculation - remove calc icon 2008-02-27 10:10:23 +00:00
skodak cb8faf0f12 MDL-90 fixed install.xml 2008-02-27 10:07:10 +00:00
skodak 0854d3f00e MDL-13695 precreating grades in grade calculation if needed 2008-02-27 10:00:47 +00:00
scyrma d3b68faff0 MDL-13404 - print cloud in the box 2008-02-27 09:44:55 +00:00
scyrma 7684e6314d MDL-13691 - make the tag description edition work again. 2008-02-27 09:33:24 +00:00
nicolasconnault a6b6baf25e MDL-13647 Added new icon. 2008-02-27 09:15:59 +00:00
skodak 7551972d69 MDL-12497 fixed regressionwhen saving site letters, fixed redirect 2008-02-27 08:57:54 +00:00
scyrma 6f5fd34644 MDL-13404 - misc fixes 2008-02-27 08:54:26 +00:00
moodler 4e2d942e71 Fixed the renaming and added a new tag_get() function.
Some of the other tag_get functions should be removed and we can use this for many things
2008-02-27 08:53:03 +00:00
nicolasconnault 8ea0f9c792 MDL-13579 Corrected a bug in default value selection for the grader report preferences form. 2008-02-27 07:50:12 +00:00
scyrma 70adc76b61 MDL-13404 - make tag_rename able to make a change in case, and prevent numerous possible missing addslashes problems. 2008-02-27 07:29:15 +00:00
nicolasconnault ca45180f23 MDL-13579 Reduced the setting to 3 locations. 2008-02-27 07:27:13 +00:00
moodler 9b80ac3538 MDL-13635 FIxed logic here a bit: Mat is fixing tag_rename next 2008-02-27 07:12:28 +00:00
scyrma bb6010edaa MDL-13404 - Minor performance improvement and code cleanup 2008-02-27 06:31:28 +00:00
moodler 2c1868ca6b Protect the directory a bit 2008-02-27 06:11:39 +00:00
scyrma 0a08be2397 MDL-13633 - Now sorting correctly 2008-02-27 06:02:44 +00:00
scyrma 6a4bd1e861 MDL-13633 - (OOPS) Completed incomplete changes - simplified tag_print_cloud. 2008-02-27 05:54:16 +00:00
moodler 524c0c8fab MDL-13685 Make custom_corners use colours properly on plugin page 2008-02-27 05:39:14 +00:00
moodler 6468df8aca MDL-6591 Simplified some wording and fixed the help file name for emailnotification 2008-02-27 05:05:01 +00:00
scyrma fb10b05479 MDL-10639 - Missing string 2008-02-27 04:46:43 +00:00
scyrma 86def10b64 MDL-13633 - This is a first step toward integrating all "tag blocks" together. 2008-02-27 04:46:15 +00:00
moodler 9e1889cdae MDL-90 Adding webdav_locks table to make Martin Langhoff's WebDAV patches simpler to apply later
From: http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=e27f04c42ba05ee224eafa03549b4b5252ca07f5
2008-02-27 04:33:20 +00:00
moodlerobot 08bae0231a Automatic installer.php lang files by installer_builder (20080227) 2008-02-27 03:44:00 +00:00
martinlanghoff 351b7cd179 MDL-90 PEAR/HTTP/WebDAV: fix file name encoding ... for real this time?
Cherry picked from upstream.
2008-02-27 03:02:05 +00:00
martinlanghoff ed997a6b9c MDL-90 moodlelib: Introducing get_cache_flag() - gets a row from cache_flags table
Useful if you intend to use cache_flags as a session
table. (Oops! Did I reveal my cunning plans?)
2008-02-27 02:57:44 +00:00
martinlanghoff 94ff81261d MDL-90 authenticate_user_login() - don't accidentally return a bogus $user
While I don't quite understand why we need that $user->id=0, at
_least_ make double sure we don't return it! Callers assume
that if we return an object===success and a user acct that just does
not exist will return an dummy object.
2008-02-27 02:56:59 +00:00
martinlanghoff 58bf9beea3 MDL-90 lib/setup: extend include_path to cover the PEAR libs we distribute
Almost no cost - most of our require/include calls are with
absolute paths, which will skip the include_path. The few
that are not absolute are usually to include PEAR libs -
so this is appropriate and avoids having to change the
PEAR libs themselves when they make references to other
PEAR libs.

Using the include path does mean that OS-installed PEAR libs
will override ours. There's a small compat risk here - if you
need to ensure a particular version, use an absolute path.
2008-02-27 02:56:06 +00:00
martinlanghoff 0844c5d93b MDL-90 weblib: Introducing mdie() - close sibling of Perl's die()
So that commandline scripts can die with a message and
a nonzero errorcode
2008-02-27 02:52:39 +00:00
martinlanghoff 26e8984b51 MDL-90 Introducing MOODLE_SANE_INPUT and MOODLE_SANE_OUTPUT to setup.php
These two constants indicate that the Moodle core should not mangle
input (magic quotes of any kind verboten!) and should not spit odd stuff
in the output (displaydebug verboten!). Both are needed for WebDAV
support.

MOODLE_SANE_INPUT is tricky - it means that the codepaths _must_ use
$db->qstr() (or addslashes() - but that has its own problems).
2008-02-27 02:51:59 +00:00
martinlanghoff 2f599e1732 MDL-90 lib/pear: Included System.php - used by WebDAV libs
We need to resolve the dual-licensing of this if we are going to
distribute it with Moodle - see MDL-6693
2008-02-27 02:51:18 +00:00
martinlanghoff c67c987c80 file System.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:51:18 +0000 2008-02-27 02:50:59 +00:00
martinlanghoff b1f3971caf MDL-90 Imported PEAR's HTTP_WebDAV_Server from HEAD @ 28-01-2008
This is a very strict import - did not include any of the
sample files (which are quite dangerous!). See the
README_MOODLE.txt for details.
2008-02-27 02:50:20 +00:00
martinlanghoff dfaa493161 file _parse_proppatch.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff 3e02d264ab file _parse_propfind.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff 670fd620d8 file _parse_lockinfo.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff d47d910b13 file Server.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff 5874bee4d1 file README_MOODLE.txt was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff e74d5d31af file LICENSE was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:20 +00:00
martinlanghoff 9913f77ed1 file COPYING was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:20 +0000 2008-02-27 02:49:20 +00:00
martinlanghoff ef201b4775 file AUTHORS was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:20 +0000 2008-02-27 02:49:20 +00:00
skodak 36d07602b7 MDL-13158 choice/index.php only return values for choices in the current course. 2008-02-26 23:19:05 +00:00
skodak 2a154e890e MDL-10990 2) added event table index for calendar block/view 2008-02-26 22:46:32 +00:00
skodak 2bef07cd85 MDL-10990 4) added missing indexes into data module 2008-02-26 22:02:59 +00:00
martinlanghoff 5ab05fb15f MDL-11180 datalib: get_courses() - grab the course context as part of the select
This speeds up course & category listing enormously - cutting 2500 DB queries
for a site with 2500 courses. It's the power of the JOIN...
2008-02-26 21:51:16 +00:00
skodak 3236902cdd MDL-10990 5) eliminated reply related cap queries for guests and not-logged-in users because they can not post anyway, removed reply link for guests from news posts, they did not see Add discussion link already 2008-02-26 21:35:54 +00:00
skodak c1d1f1679e fixed occurred spelling; backport from HEAD 2008-02-26 21:25:03 +00:00
skodak 871836deb7 fixed broken lang string with incorrect " 2008-02-26 21:21:46 +00:00
skodak d242777c73 MDL-10990 1) fixed slow guest query with no mnethostid 2008-02-26 20:00:25 +00:00
skodak ea80372129 MDL-12927 installer should detect the magic quotes settings and undo the slashes if necessary 2008-02-26 19:50:06 +00:00
skodak ce896718cf MDL-6591 inverted checkbox for email notification; MDL-9657 - fixed date issues in drafts 2008-02-26 19:26:42 +00:00
skodak 13db6cc1e4 MDL-13623 proper version detection 2008-02-26 18:33:22 +00:00
nicolasconnault 997dc05600 MDL-13663 Docs updated. 2008-02-26 16:25:48 +00:00
nicolasconnault e588753478 Missing string 2008-02-26 13:02:00 +00:00
moodler 52ffec20aa MDL-13672 tag name function was not updated when tag/lib.php changed 2008-02-26 12:45:32 +00:00
sam_marshall c254ed8511 MDL-13660: Allow admin reports to have db tables, cron 2008-02-26 10:32:40 +00:00
nicolasconnault 8900fdf11d MDL-13663 Docs updated. 2008-02-26 09:56:30 +00:00
moodler 4dc9acd3db MDL-13569 Mark N patch for notice 2008-02-26 09:05:04 +00:00
moodler 2d08c94d20 MDL-12634 Fixed returning to index page 2008-02-26 08:42:21 +00:00
moodler 3bbc889109 MDL-12294 Fixed some strings 2008-02-26 08:34:04 +00:00
moodler eecbfe6e80 MDL-12294 Fixed some assignment strings 2008-02-26 08:26:23 +00:00
moodler 65be953852 MDL-12294 FIxed some wrong string 2008-02-26 08:06:56 +00:00
moodler c8842694e2 MDL-12294 Fixed a bunch of missing or wrong strings 2008-02-26 08:00:09 +00:00
scyrma 207828729e MDL-10639 - Removed "Export" column - export all available outcomes 2008-02-26 07:28:01 +00:00
moodler e5f7002f2f MDL-12294 fixed parentlang string 2008-02-26 07:27:23 +00:00
moodler 00f60cd1cb MDL-12248 custom_corners people can now use roles ;-) 2008-02-26 07:15:34 +00:00
moodler 659cae579e MDL-11809 Fixed broken headline 2008-02-26 07:01:23 +00:00
scyrma 8d0aa2442d MDL-13669 - Editing now only lists the manually added tags 2008-02-26 06:53:51 +00:00
scyrma 8389c869ee MDL-13404 - Missing part of previous commit : args to tag_get_related_tags have changed 2008-02-26 06:48:58 +00:00
scyrma 7bbd75dc6e MDL-13404 - Modification to all tag_get_tags_* calls needing an array & other improvements 2008-02-26 06:39:10 +00:00
skodak 186fa912d9 MDL-13623 fixed regression in PHP < 5.2.0 2008-02-26 06:25:23 +00:00
moodler 30c56fe4dc MDL-9367 Fix doc links for auth pages 2008-02-26 05:49:32 +00:00
scyrma 21c24eb64f MDL-13642 - re-added the proper query limits 2008-02-26 05:07:49 +00:00
scyrma a55d206ce7 MDL-13404 - Fix to a few queries, to prevent problems, as suggested by Eloy 2008-02-26 02:23:10 +00:00
skodak 578629dabe MDL-13626 fixed mssql compatibility issue in stats upgrade 2008-02-25 21:54:54 +00:00
skodak f362682471 MDL-13665 HTML editor is loaded as non-secure on the secure "Add new user" form, patch by Steve Bond 2008-02-25 20:38:52 +00:00
skodak 3dd102788f MDL-13661 - fixing incorrect use of array_shift 2008-02-25 20:21:18 +00:00
skodak a4166d5966 MDL-13237, MDL-13661 - fixing rcache regression, sorry :-( 2008-02-25 15:14:35 +00:00
skodak d7f64fa590 MDL-13483 adding noemailever info 2008-02-25 14:29:50 +00:00
skodak c5b4af2e5d MDL-13483 found two more native php mail() commands 2008-02-25 14:03:53 +00:00
skodak 3fa7bee5ce MDL-9657 advanced upload assignment draft tracking now available as activity setting 2008-02-25 13:33:26 +00:00
skodak e7bbc17fa2 MDL-9657 better dealing with drafts in assignment 2008-02-25 12:38:26 +00:00
skodak 2dc8d0e158 MDL-13653 droplow not ignoring ungraded items un sum aggregation 2008-02-25 12:16:56 +00:00
poltawski e9e0641372 MDL-9667 - convert_tree_to_html doesn't set css class properly if
$tab->linkedwhenselected is set

Patch from Jeff Graham
2008-02-25 11:56:43 +00:00
scyrma 6343168321 MDL-13624 - Use bigint(10), not bigint(11). This update doesn't change the schema on a site that's already installed. 2008-02-25 08:25:51 +00:00
scyrma 3c5591c51c MDL-13643 - Missing constant definition 2008-02-25 08:10:22 +00:00
scyrma 7afc1d07f4 MDL-13404 - Final fix to make it possible, for an tag-managing user, to rename a tag on the tag editing page. 2008-02-25 08:02:41 +00:00
skodak 137a439ac6 MDL-13644 permanent typos 2008-02-25 07:43:48 +00:00
moodler 4984973b93 MDL-13643 Use PARAM_TAGLIST 2008-02-25 07:16:14 +00:00
moodler 3ded4d989d Restoring type PARAM_TAGLIST MDL-13643 2008-02-25 07:15:33 +00:00
scyrma e9a0e86e70 MDL-13636 - Modification to the YUI autocomplete call, to show and use the right strings 2008-02-25 07:05:46 +00:00
moodler 10487fa6da MDL-13635 Managers can now edit tag name on the edit tag interface 2008-02-25 06:26:47 +00:00
moodler 58ea1ced21 Just moved a line of code 2008-02-25 06:25:54 +00:00
scyrma d6f8bc5b15 MDL-13639 - use tag_find_tags, MDL-13404 - improve documentation in the file, MDL-13636 - partial fix 2008-02-25 05:47:03 +00:00
moodler 4d6eee8d65 MDL-13632 Make sure official tags are in the right case. 2008-02-25 05:30:44 +00:00
moodler 6652a915eb MDL-13640 Manage tags link is now consistent on search and tag page 2008-02-25 05:02:25 +00:00
moodler 72876267d2 MDL-13638 Added a link to remove from interests, moved user/tag.php to tag/user.php and removed manage link from that list of links about the one tag 2008-02-25 04:56:18 +00:00
moodler 391cd0eb8e MDL-13637 Changed the check for siteadmin to a capability check (managetags) 2008-02-25 03:49:19 +00:00
scyrma dc62cb9ecc MDL-13404 - A site admin should always be able to edit a tag 2008-02-25 03:32:13 +00:00
scyrma f55102c501 MDL-13632 - Keep tag name case by default 2008-02-25 03:26:13 +00:00
scyrma f866f7be99 MDL-13404 - fix in tag_get_related_tags_csv 2008-02-25 03:23:03 +00:00
moodler 91e727f9ae Make blog_tags block get name and rawname MDL-13632 2008-02-25 03:20:35 +00:00
scyrma 1afe433c80 MDL-13634 - wrong _param type. Fixed 2008-02-25 03:15:59 +00:00
moodler f0f4244474 Latest tags 2008-02-25 03:15:51 +00:00
scyrma e278eb4830 MDL-13632 - keeptagnamecase needs to be "On", and with this change, it will work as expected. 2008-02-25 03:08:59 +00:00
scyrma dde95d41ec MDL-13630 - fix and improvement of the documentation. 2008-02-25 02:49:11 +00:00
scyrma 3310c48044 MDL-13404 - Several improvements to tag system (re-commit, with locallib.php). 2008-02-25 01:25:42 +00:00
scyrma 13ced7fb17 file locallib.php was added on branch MOODLE_19_STABLE on 2008-02-25 01:25:44 +0000 2008-02-25 01:16:46 +00:00
urs_hunkler 2bfb2f1f05 MDL-13418, MDL-13422, MDL 13597 :: corrected CSS issues 2008-02-24 21:15:05 +00:00
skodak 2ec2175f1e MDL-13625 improve perf and fixed groups code on forum index page 2008-02-24 20:14:30 +00:00
skodak 1f7448fc9d MDL-13303 fixed regression in forum recent activity 2008-02-24 20:04:52 +00:00
urs_hunkler da693b58b8 MDL-13453 :: corrected typo 2008-02-24 19:27:30 +00:00
skodak 4ba7849b64 MDL-13605 use userdate() instead of date() when printing next cron execution time 2008-02-24 13:29:10 +00:00
skodak 01911fa4b2 MDL-11494 MDL-13623 - support for secure and httponly cookies 2008-02-24 12:45:49 +00:00
skodak 7545ecdb86 MDL-13565 Tracking forum fixes 2008-02-24 10:52:40 +00:00
skodak 0ed6f1fc6b MDL-13274 label grouping identification 2008-02-24 10:32:13 +00:00
skodak 11274206e0 MDL-13520, MDL-13604, MDL-13620 stats - better simplified parent context join, administrator now counted too, optimised processing when no day logs present 2008-02-23 22:54:30 +00:00
arborrow f543e2acf7 added missing migratinggrades string (called from /backup/restorelib.php) 2008-02-23 20:20:30 +00:00
skodak 794fc9a9a3 MDL-13399, MDL-13614 fixed regression caused by last commit 2008-02-23 19:28:33 +00:00
skodak 1bd430af60 MDL-13615 course edit settings - improved metacourse compatible detection 2008-02-23 19:21:32 +00:00
skodak 910fa9c611 MDL-13613 added better detection for outdated course modinfo 2008-02-23 18:41:14 +00:00
skodak 11f95c99ad MDL-13525 role name aliases used in stat reports 2008-02-23 12:25:21 +00:00
skodak 17178a4ec3 MDL-13192 minor cleanup 2008-02-23 12:16:52 +00:00
skodak 54a252ba51 MDL-13603 fixed course_setup() minor problem with $course in $SITE 2008-02-23 12:12:47 +00:00
skodak 2771076cab MDL-13526 fixed site stats report language 2008-02-23 12:09:43 +00:00
skodak 80eb2b104b MDL-13532 removed incorrect coalesce+count combination 2008-02-23 11:54:34 +00:00
moodlerobot 11925184b7 Automatic installer.php lang files by installer_builder (20080223) 2008-02-23 03:27:48 +00:00
scyrma 4c264c7ff8 MDL-13594 - sorry again, didn't realize Petr had reverted the patch. This reverts the last commit..
i'll fix the mess on Monday.
2008-02-23 03:18:57 +00:00
scyrma a5725844ff MDL-13590 - commited the wrong file, sorry everybody. Here's the good one. 2008-02-23 03:12:52 +00:00
skodak 458544ed1d MDL-13404 reverted - missing file and other minor problems; backported from HEAD 2008-02-22 19:55:11 +00:00
skodak 6b1b51c095 MDL-13590 fixed fatal incorrect require 2008-02-22 14:53:46 +00:00
wildgirl 7541ac282a MDL-12759 help file grammar fix 2008-02-22 11:47:00 +00:00
scyrma 65c75c3ca7 MDL-13404 - Several improvements to the tag sub-system. 2008-02-22 10:17:56 +00:00
wildgirl 20dd99627c MDL-13116 lang string typo fix 2008-02-22 09:27:29 +00:00
wildgirl c070c4021e MDL-13013 lang string typo fixes 2008-02-22 09:02:30 +00:00
moodlerobot 48ab51a5ff Automatic installer.php lang files by installer_builder (20080222) 2008-02-22 03:39:22 +00:00
moodler 58dcf7ad08 Add a shortcut to assign roles page from the participants listing 2008-02-22 02:43:09 +00:00
moodler bda3445de9 MDL-13567 Some fixes to the updating of course settings for restricted modules 2008-02-21 15:15:49 +00:00
skodak 5ed1079984 MDL-13274, MDL-13215 - improved modedit shared forms, label supports groupmembersonly, removed extra button for labels 2008-02-21 14:11:18 +00:00
nicolasconnault 321fcad3ae MDL-11282 Implemented fix 2008-02-21 12:21:44 +00:00
skodak e731779d7a MDL-13559 discussion moving 2008-02-21 10:30:26 +00:00
skodak 9688dc4e27 MDL-13549 related these changes 2008-02-21 09:38:57 +00:00
skodak b8d4faed6b MDL-13549 major bugfixing and improvements in outline report 2008-02-21 09:35:31 +00:00
skodak 570d5b907d MDL-13549 major bugfixing and improvements in participation report 2008-02-21 09:32:15 +00:00
skodak e98a1b9ef3 MDL-13550 deprecated primary role concept 2008-02-21 09:28:59 +00:00
skodak e5a33e0082 MDL-13561 add cmid index to log table to speedup reports that deal with individual activities 2008-02-21 09:25:03 +00:00
nicolasconnault a919ee17b3 MDL-13465 Implemented Martin's solution. Merging from MOODLE_18_STABLE 2008-02-21 09:17:01 +00:00
skodak 20d03127ad MDL-13560 simplify deating with role name course aliases 2008-02-21 09:16:34 +00:00
skodak 2e14f03a63 MDL-13555 fixed typo - thanks Mitsuhiro Yoshida 2008-02-21 08:50:04 +00:00
skodak 1e095f1636 MDL-6591 moving the disable notification from fg prefs 2008-02-21 08:13:58 +00:00
moodler 7a67c58424 Initialise a variable to avoid a notice $displaypage 2008-02-21 06:13:05 +00:00
moodler fdc61d3e9f Latest tags file 2008-02-21 06:09:03 +00:00
moodler 246eb27d88 Avoided a notice for users not logged in 2008-02-21 06:08:30 +00:00
moodler 83ad6e2213 Just some robustness in checking for a variable 2008-02-21 06:01:31 +00:00
moodler 71ebb06911 Some better error checking to help us pick bad lang files 2008-02-21 05:59:50 +00:00
moodler 0746cf3e40 Reverted bad lang file MDLSITE-359 2008-02-21 05:51:48 +00:00
moodler c98be5a96f MDL-13554 Fix from Mark Nielsen for bad block backups 2008-02-21 05:34:10 +00:00
moodler d20c043713 MDL-11752 Upload user pictures (from Anthony and Inaki)
Verified with just major code formatting changes
2008-02-21 05:23:24 +00:00
moodlerobot 4f353aadf5 Automatic installer.php lang files by installer_builder (20080221) 2008-02-21 03:41:22 +00:00
scyrma 16b963e777 MDL-13553 - one more time : it's 'post' not 'blog' 2008-02-21 01:49:06 +00:00
scyrma d970b5a0b2 MDL-13553 - now correctly saving tags with itemtype 'post' 2008-02-21 01:39:31 +00:00
scyrma 6d643c9d6d MDL-13553 - upgrade path to correctly identify the type of each tag_instance 2008-02-21 00:49:59 +00:00
skodak 2c4bd0a648 MDL-6591 changing label to Disable notification in order to prevent confusion 2008-02-20 21:48:25 +00:00
stronk7 645beec03b Adding one new string, preparing for blogs backup. 2008-02-20 19:06:13 +00:00
skodak 0db6d34e6d MDL-12909 do not included users without idnumber in xml grade export preview 2008-02-20 18:28:50 +00:00
skodak 6b465e1867 MDL-6591 Optional assignment graded email notification - based on patch by Gary Anderson 2008-02-20 17:49:58 +00:00
pichetp 5420407e1e Merging from HEAD MDL-13457 Validation when moving to another category 2008-02-20 13:00:36 +00:00
skodak 9660a6ddf2 MDL-4667, MDL-4112 switching order of columns in course-userid log table index in order to please mysql 2008-02-20 09:52:46 +00:00
skodak 8ae9a7dffc MDL-4667, MDL-4112 switching order of columns in course-userid log table index in order to please mysql 2008-02-20 09:31:44 +00:00
skodak f499bdf505 MDL-13546 fixed table name typo - patch by Samuli Karevaara 2008-02-20 08:40:04 +00:00
moodler d0c276727d Prevent a notice with bad rss feeds 2008-02-20 08:10:38 +00:00
moodler 3eb9c93999 MDL-13544 Removed logging of cleanremoteaddr from logs 2008-02-20 07:01:18 +00:00
moodler 86e44df6b0 SMall notice fix for $showing 2008-02-20 06:51:45 +00:00
moodler d30f1d1ad9 Fixing a trivial notice 2008-02-20 06:18:52 +00:00
moodler f3aac02c26 MDL-13542 More return value checking 2008-02-20 06:15:16 +00:00
moodler 2116a8a428 FIxed some notices MDL-13542 2008-02-20 06:12:09 +00:00
moodler f8471a1a96 MDL-13541 Error checking on parameters 2008-02-20 06:07:18 +00:00
moodlerobot bebd1968b2 Automatic installer.php lang files by installer_builder (20080220) 2008-02-20 03:38:26 +00:00
moodler ed3b8f3d0c MDL-12277 Merged from 1.8 - fix for message sending in other languages 2008-02-20 02:32:03 +00:00
tjhunt 978af5c28b Fix dangerous comment. (MDL-13536) 2008-02-19 17:14:10 +00:00
tjhunt 1cc44fbf90 MDL-13448 - missing the global $db statement. Fix thanks to Samuli Karevaara. 2008-02-19 16:21:35 +00:00
tjhunt 17e4bb1533 MDL-13390 - Wrong links in quiz notification emails 2008-02-19 16:19:56 +00:00
tjhunt aede0ebcc0 MDL-13530 - Improve words used in the gradebook plugin selector dropdown menu 2008-02-19 15:00:00 +00:00
skodak 5f65bc5b94 MDL-12538 skip to main does not work if page div contains other attributes 2008-02-19 13:33:21 +00:00
skodak 4a906d7333 MDL-9931 adding go button to delete 2008-02-19 13:12:55 +00:00
skodak 281ec00e8f MDL-11586 rewritten file name collision handling in upload manager - files without extension, fixed increments if file name contains _123 already 2008-02-19 13:03:01 +00:00
stronk7 d685fe5705 Added one new string to installer files. MDL-13489 2008-02-19 11:47:35 +00:00
skodak c26f59b6fc MDL-11816 fixed wiki export with quick hack 2008-02-19 11:04:48 +00:00
skodak 9e931faa98 MDL-11816 fixed wiki export with quick hack 2008-02-19 10:59:21 +00:00
skodak f6dde04372 MDL-11843 deleting of activities directly from calendar is dangerous/confusing 2008-02-19 10:45:14 +00:00
skodak e4fd076246 MDL-12862 ewiki source code converted to utf8, patch by Tatsuya Shirai 2008-02-19 10:04:08 +00:00
urs_hunkler 5407ff018b Merged from 1.8 :: 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:52:37 +00:00
moodler 6fd30e78c7 MDL-13489 Fixed wording 2008-02-19 06:57:10 +00:00
moodler d33eb04648 MDL-13489 Applied patches from Anthony with minor changes 2008-02-19 06:49:41 +00:00
scyrma a81b97bf9b MDL-13404 correct typo 2008-02-19 05:13:41 +00:00
scyrma a5cf0536aa MDL-13404 - cleanup code style 2008-02-19 05:12:25 +00:00
skodak 827ea538e5 MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests 2008-02-18 23:39:28 +00:00
skodak adb4cdc5a8 MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests 2008-02-18 23:33:35 +00:00
skodak ff90e9be5f MDL-13302 gradebook data deleted now in remove_course_contents() - it makes better sense to have it there 2008-02-18 23:09:43 +00:00
skodak acb05e1d85 MDL-13302 gradebook data deleted now in remove_course_contents() - it makes better sense to have it there 2008-02-18 23:07:44 +00:00
pichetp a19e31a1d6 cleaning // 2008-02-18 20:40:41 +00:00
pichetp a1b3e19dd4 merging MDL-13419 removing space before input html element and cleaning of diagnostic
message
2008-02-18 20:35:52 +00:00
skodak 8905e7b645 MDL-13399 prevent ambiguous column names in get_my_courses 2008-02-18 20:13:02 +00:00
danmarsden b28a21b88b MDL-13478 choice results using too much memory. - improves performance when not showing the unanswered column. - also tidies up a few checks which aren't needed. Merged from HEAD 2008-02-18 19:53:06 +00:00
skodak 35e8af0edf MDL-12942 extra credit implemented in sum aggregation type; fixed sum aggregation; fixed division by zero in item grade min==max 2008-02-18 19:10:15 +00:00
moodler a607365fc8 Swapped the two save buttons MDL-6826 2008-02-18 14:22:30 +00:00
skodak ce07f4dc34 big big sorry, forgotten old debug code that sends all mails to null 2008-02-18 12:34:16 +00:00
stronk7 48c52be77a Add support to specify text sizes via formats. MDL-13505 2008-02-18 10:52:32 +00:00
moodlerobot c4e643d335 Automatic installer.php lang files by installer_builder (20080218) 2008-02-18 03:37:00 +00:00
moodler 1ba4c3e132 Add some information about the next stats run to the cron output 2008-02-18 03:12:57 +00:00
moodler eed0327fd9 MDL-13498 Removed path from display of plugins. 2008-02-18 02:10:14 +00:00
moodler e8f4d7e395 Removed some required files that are not needed 2008-02-18 02:08:04 +00:00
skodak 9159c64a7d MDL-11811 OpenDocument is correct name for file format 2008-02-17 19:47:48 +00:00
skodak 1f30b89fd8 MDL-11811 OpenDocument is correct name for file format 2008-02-17 19:47:25 +00:00
skodak 985ea691ac MDL-13445 linked activity deleting improvements 2008-02-17 19:11:29 +00:00
skodak 205e71d01a MDL-12934 temporary fix for grade items of activities without proper course module record 2008-02-17 19:03:15 +00:00
skodak 55534cfdd2 MDL-12934 temporary fix for grade items of activities without proper course module record 2008-02-17 18:37:54 +00:00
skodak 832ca9bd1b MDL-13026 improved sql for course totals on grader report 2008-02-17 17:17:48 +00:00
skodak c2f2f33541 MDL-13231 outcomes aggregation off by default now 2008-02-17 16:05:16 +00:00
skodak d29877ac8c MDL-13269 fixed regrading of activity raw grades 2008-02-17 15:59:44 +00:00
skodak 44ceee90e9 MDL-13437 Grader report: Showing idnumber column shifts controls into wrong columns 2008-02-17 14:55:40 +00:00
skodak bd9a7b89a7 MDL-13477 main version bumped to .02 - three decimal points did not work for Eloy :-( 2008-02-16 22:26:54 +00:00
skodak 1b268daa33 MDL-13192 major stats cleanup patch - see tracker for more details 2008-02-16 18:32:23 +00:00
skodak 490c14fe8a MDL-13459 fixed hardcoded mdl_ prefix 2008-02-16 11:35:54 +00:00
skodak 53726ba409 MDL-13241 adding forgotten table scale_history into upgrade code 2008-02-16 11:20:15 +00:00
nicolasconnault ee6689b003 MDL-13459 Didn't use the patch, which puts its finger in too many pies. Instead just implemented a quick-fix, a temporary get_assignable_for_switchrole() function. It only affects the switchroles menu 2008-02-15 16:35:19 +00:00
nicolasconnault 29252268ca MDL-13459 Didn't use the patch, which puts its finger in too many pies. Instead just implemented a quick-fix, a temporary get_assignable_for_switchrole() function. It only affects the switchroles menu 2008-02-15 16:35:19 +00:00
skodak bd09b95b81 undefined discussion timestart on frontpage 2008-02-15 15:27:17 +00:00
skodak 3db9b3c2b1 MDL-13484 peak memory used perf info added 2008-02-15 11:31:38 +00:00
skodak 30914826c9 MDL-13483 new hidden $CFG->noemailever setting to block sending of all emails - for dev sites only, set in config.php if needed 2008-02-15 10:45:36 +00:00
skodak 32d746f1d7 fixed warning when module code missing 2008-02-15 10:38:37 +00:00
skodak 02bb190c1d MDL-13482 fixed pg issue with group by 2008-02-15 10:30:38 +00:00
mudrd8mz 11a30670cb MDL-13480 swapped strings in help 2008-02-15 09:36:43 +00:00
skodak fc98a031c3 $cours typo fixed 2008-02-15 08:32:48 +00:00
donal 5afa13193d 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:24 +00:00
donal 14715db3ee Write to the log when the SSL key is created 2008-02-15 08:10:52 +00:00
donal 28febd2534 Remove unneeded mnet_host2service records 2008-02-15 08:04:22 +00:00
moodler 282e599572 UPdated readme to be consistent with new version
Languages all seem to be fixed upstream
2008-02-15 06:49:30 +00:00
moodler 626b76b38f Added back some forced conversion in _adodb_column_sql() (not the same patch as before)
Related to SC#259
2008-02-15 06:44:22 +00:00
moodler 4dd6dd7155 Reapply MDL-12378 to current version for XHTML compliance 2008-02-15 06:34:16 +00:00
moodler a41ba92752 Upgrading to 4.98 as per MDL-13474. Works for me! 2008-02-15 06:03:58 +00:00
moodlerobot c9d4eba186 Automatic installer.php lang files by installer_builder (20080215) 2008-02-15 03:39:23 +00:00
moodler 9988024f6e Just tidying up source 2008-02-15 02:42:56 +00:00
moodler 1fe0ed0b7d Fixed MDL-13476
- discussions can now be moved
 - URL for return is now correct (discuss.php not discussion.php)
2008-02-15 00:50:10 +00:00
stronk7 3ecc34b2d5 Messages backup improvement. MDL-13473 2008-02-14 23:32:43 +00:00
skodak 186c4de5ac MDL-13303 fixing missing group icons in forum 2008-02-14 16:36:12 +00:00
skodak 7a26b64a13 MDL-12945 fixed sql purity to make pg happy, fixed bug in user list of active chats 2008-02-14 16:11:58 +00:00
nicolasconnault 43a4458850 MDL-13430 I can only see this issue in the assignment submissions page. Merging from MOODLE_18_STABLE 2008-02-14 07:25:11 +00:00
moodler 6fcb1a4e2d MDL-13152 from Dariem Garces
Groups that don't exist will be created on the fly
2008-02-14 03:12:00 +00:00
skodak 66714f7c98 MDL-13303 - forgot to change warnings to developer mode only MFC 2008-02-13 17:17:26 +00:00
skodak 5623276da8 MDL-13450 and MDL-13303 - sorry for changing forum API so late, but it was needed; major perf improvement for forum; fixed printing of user pictures 2008-02-13 17:01:41 +00:00
skodak af9ce11eec this function should work for all modules but forgot to remove 'quiz' from sql. - backporting from HEAD, I hope that is ok ;-) 2008-02-13 16:30:12 +00:00
skodak f34dfc143f MDL-13375 fix for duplicate itemnumbers in outcome items 2008-02-13 09:47:22 +00:00
skodak 8a881c78de MDL-13375 reverting, the bug is somewhere else 2008-02-13 09:22:26 +00:00
nicolasconnault 4618409cfd MDL-13375 Applied Dan's patch, and patched up assignment/lib.php accordingly. Multiple outcome grading from assignment is now possible. 2008-02-13 08:49:52 +00:00
nicolasconnault 6644a4f4e5 MDL-13375 Fixed the bug in modedit.php 2008-02-13 08:14:40 +00:00
donal 916071c464 Ensure that the wwwroot has been supplied with a http:// or https:// prefix 2008-02-13 03:06:56 +00:00
pichetp a01d104cdf merging MDL-12421 rounding 2008-02-13 02:09:14 +00:00
pichetp 5710f8575c merging MDL-12388 return url and MDL-12421 rounding problem 2008-02-13 01:30:13 +00:00
donal 0962e21070 MDL-12492: This patch addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-12 22:27:51 +00:00
urs_hunkler 0594a0aaee MDL-13421 :: corrected left padding in admin block - second approach 2008-02-12 21:26:49 +00:00
poltawski 624c7abf1a MDL-13337 - Add confirmation before deleting outcomes (and POST for action..) 2008-02-12 21:13:25 +00:00
urs_hunkler 0871252e6b MDL-13444 :: removed the jQuery library and use direct JavaScript instead. That's much faster.
MDL-12078 :: Changed them calles from themewww to httpsthemwww (MDL-12078). MDL-13421 :: corrected left padding in admin block
2008-02-12 21:12:46 +00:00
nicolasconnault 311ea49f58 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:55:34 +00:00
nicolasconnault 111c351849 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:06:52 +00:00
nicolasconnault aebdc0bdb3 MDL-13440 fixed typo 2008-02-12 13:45:15 +00:00
thepurpleblob 91fa457ea2 Added check for <text> fields that contain markup (an error!) 2008-02-12 11:55:33 +00:00
skodak c2d04f05a0 MDL-9657 assignment submission finalisation now independent from grade 2008-02-12 10:50:35 +00:00
skodak a63215000d MDL-11920 prevent db traffic caused by user images 2008-02-12 08:19:50 +00:00
scyrma 6fec177f09 MDL-10639 - fix problem with buttons when there are no outcomes. 2008-02-12 07:59:24 +00:00
ethem a1cc49c6b1 Merged from MOODLE_18_STABLE 2008-02-11 15:39:13 +00:00
scyrma fa868b8a3d MDL-10639 - now using moodleforms 2008-02-11 02:19:37 +00:00
moodlerobot 78298a17dd Automatic installer.php lang files by installer_builder (20080209) 2008-02-09 03:35:43 +00:00
poltawski 4890c92d15 MDL-13262 - role related user filters were assuming roleids because array_merge
was stomping on keys. Patch by Dennis Rochford
2008-02-08 12:14:39 +00:00
poltawski a3b2abed80 MDL-13354 - wrong capability checked for view report link 2008-02-08 09:57:07 +00:00
moodler e26612356b Fixed context in has_capability call MDL-13378 2008-02-08 03:58:45 +00:00
moodlerobot 40a15c546e Automatic installer.php lang files by installer_builder (20080208) 2008-02-08 03:30:27 +00:00
poltawski f8cfb1230f 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.
2008-02-07 18:48:53 +00:00
ethem f461eacc8e 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_18_STABLE
2008-02-07 16:27:50 +00:00
moodler 67574a93c5 Fix subject lines and corrupted emails from messages MDL-13364 2008-02-07 05:19:01 +00:00
gbateson a6a781458e MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:14:21 +00:00
moodlerobot 32e854e51f iAdded lang 2008-02-07 03:32:09 +00:00
moodlerobot 713f0c63dd file installer.php was added on branch MOODLE_19_STABLE on 2008-02-07 03:32:09 +0000 2008-02-07 03:29:58 +00:00
moodlerobot ab147736c1 Automatic installer.php lang files by installer_builder (20080207) 2008-02-07 03:27:24 +00:00
nicolasconnault 2a5e3d244b MDL-6826 Removed the optional_param lines at the top, and set the submit buttons to PARAM_RAW. Also changed !empty() to isset(); Merging from 1.8 2008-02-06 10:24:40 +00:00
ethem d8347a0ab7 MDL-10181 User Management Improvements: Cron unenrolment of manual should takes place in the main cron.
It is time to use own enrolment method when calling funcs enrol_into_course, role_assign, role_unassign.

Zend Studio Warning: Assignment in condition (line XX), Solved, one more ()
Assignments in a conditional statement are sometimes the result of a typo.
In many cases, instead of the assignment operator =, the equality operator ==
should be used. When comparing a variable and a non-variable expression,
it is common practice to put the variable on the right-hand side of the equality
operator, so that if the equality operator is erroneously replaced with the
assignment operator, PHP will report a parse error immediately.
This helps you avoid a big subset of this class of bugs.
2008-02-06 08:07:03 +00:00
scyrma c9c2c21b84 MDL-13348 - fix to get the right order for countries with names starting with unicode characters 2008-02-06 06:17:10 +00:00
moodler 4f8ac26792 Fixed some apostrophes 2008-02-06 05:55:21 +00:00
scyrma 8f5ef63f5d Fix for MDLSITE-345 and correction to MDL-12565. This doesn't solve it all
though : there will still be "orphans" tags in table tag.
2008-02-06 03:34:14 +00:00
skodak 9e10147777 MDL-10132 improved random glossary blocks - now uses modinfo too + fixed some notices 2008-02-05 23:33:44 +00:00
skodak 58da996994 MDL-11282, MDL-11643 - removing notice() from grade_update() - we can not stop execution there! 2008-02-05 23:10:27 +00:00
skodak 9c76f3b45e MDL-13345 disabled module not present on backup form anymore 2008-02-05 22:55:26 +00:00
skodak ffd15ec8f6 MDL-13155 once more - reverting mod/xx/index.php to use get_all_instances_in_courses() again, should be now nearly the same as in 1.8.x ;-) 2008-02-05 21:39:52 +00:00
skodak f1bd9b5ecf MDL-13155 reworked get_all_instances_in_course() and get_all_instances_in_courses(), based on patch by Tim 2008-02-05 21:34:08 +00:00
stronk7 d916897125 Some old backups can contain empties in user->picture, fix them before insert. 2008-02-05 20:28:29 +00:00
skodak ef7b0cc319 MDL-13292 <Vspan> tag on the bottom of the wiki HTML Editor fixed 2008-02-05 19:51:49 +00:00
andreabix 03daf74013 Added missing classes
.rolecap .inherit.capdefault, .rolecap .allow.capdefault {
  background-color:#E3DFD4;
}

#admin-roles-override .capcurrent {
  background-color:#E3DFD4;
}
2008-02-05 18:53:54 +00:00
skodak 1eff062408 MDL-10796 fixed wiki deprecated passing by reference 2008-02-05 18:41:43 +00:00
poltawski c472c4bb50 MDL-13314 count_role_users was showing different count to those returned from
get_role_users(), based on patch from Patrick Pollett
2008-02-05 17:18:10 +00:00
poltawski f296008fe5 MDL-13235 - bulk user action removing users etc was buggy 2008-02-05 15:22:07 +00:00
skodak 782532955d MDL-12518 fixed restore of grade calculations 2008-02-05 13:11:09 +00:00
skodak f6ea800797 MDL-12938, MDL-12937 - unenrol fixes - can not unenrol if can not unassign all users roles in course, do not show self unenrol if enrolment comes from parent context, fixed rturn value from get_user_roles; based on patch by Eric Merrill 2008-02-05 12:58:59 +00:00
jamiesensei 1fe2c24de3 MDL-13298 "Question bank displays always page 1 after adding new question" this was caused because the question creation page was redirecting back to the question back edit page and telling it to change to the category of the question that was just saved. This was causing the edit page to go back to page 0 of the new category. Now we only go back to page 0 if the category has actually changed. 2008-02-05 12:08:38 +00:00
skodak 0e47869e99 MDL-3942 fixed warnings 2008-02-05 11:48:45 +00:00
skodak 6708fa8b98 MDL-12795 length specification in configtext constructor instead of css 2008-02-05 11:42:51 +00:00
jamiesensei c6a4075609 MDL-13005 When trying to restore a course when you have more then one quiz and you choose only one quiz, the restore fails when trying to create categories and questions. Fixed this by ignoring module context level q categories in backup when the course module has not already been restored. 2008-02-05 11:24:19 +00:00
skodak 9430296726 MDL-3942 - various forum scoring types - patch by Anthony Borrow 2008-02-05 11:21:36 +00:00
skodak ddc33af359 MDL-13335 rewritten caching in forum cron 2008-02-05 10:51:20 +00:00
skodak 907a481674 MDL-13334 get_role_access() static cache in cron only 2008-02-05 10:39:59 +00:00
nicolasconnault 7021c8441d MDL-12158 Applied Matt's patch, merging from 1.8 2008-02-05 10:39:29 +00:00
nicolasconnault 50d0bb2e24 MDL-12888 Removing redundant form 2008-02-05 10:29:31 +00:00
nicolasconnault 56352ac96f MDL-12497 Disabled the "override site defaults" checkbox for admin page, and removed redundant help buttons 2008-02-05 10:26:13 +00:00
jamiesensei 4811aacb5a MDL-13034 fixes "insertion of question / category ids at the CONTEXT_MODULE level does not respect whether the instance of the module has been selected for backup" and cleans up code a little. The last commit for this issue did not include any changes. 2008-02-05 10:16:40 +00:00
nicolasconnault 2008bbe5de MDL-10451 Fixed HTML errors, merging from 1.8 2008-02-05 09:53:07 +00:00
scyrma 816219141b MDL-10639. Initial commit of an import/export system for outcomes (and associated scales). 2008-02-05 08:38:44 +00:00
gbateson aad4873cc6 MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:24:24 +00:00
gbateson 369865830c MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:09:58 +00:00
moodler ea5a1c3bf6 Merged logic fix for MDL-6826 2008-02-05 03:17:42 +00:00
skodak ecf7fad11a MDL-13038 update_record now works with boolean false 2008-02-04 23:51:40 +00:00
urs_hunkler f3c789cd94 merged from 1.8 :: 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:59:20 +00:00
nicolasconnault 63fc9bd4fd MDL-13087 Adding a page break before the first user report 2008-02-04 14:29:11 +00:00
nicolasconnault 74f7fe1b30 MDL-13050 Now showing a link to the gradebook for the hotpot, assignment, quiz and lesson module grading pages, with the right capabilities etc. 2008-02-04 13:52:49 +00:00
nicolasconnault ad619206e1 MDL-6826 Implementing Tatsuya's patch 2008-02-04 12:59:53 +00:00
nicolasconnault d7df0a5d84 MDL-6826 Removed the word "changes" from the two buttons 2008-02-04 12:17:49 +00:00
nicolasconnault 1ee448b935 MDL-13101 Added the Reload button; inserted the 3 tables into one large table so they appear side-by-side; Reduced the font size 2008-02-04 10:58:24 +00:00
nicolasconnault 62556bfefa MDL-13101 Moved the "unattended upgrade" checkbox to the plugin check page 2008-02-04 10:06:49 +00:00
scyrma 087f51bde0 doc & typo fixes 2008-02-04 06:44:49 +00:00
scyrma 7677bef81e MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:09 +00:00
stronk7 cebf5d77a3 Save one extra query per user being restored. $newid contains the user id along all the iteration. 2008-02-04 00:04:02 +00:00
stronk7 1b053c41a4 Now custom profile fields and user tags are restored. MDL-6856
.CVS: ----------------------------------------------------------------------
2008-02-03 23:51:20 +00:00
stronk7 4512e31e51 Only insert outcome_course if it doesn't exist. MDL-13308 2008-02-03 18:42:48 +00:00
stronk7 d6ab69f11b Add some outcomes missing strings. MDL-13318 2008-02-03 18:31:57 +00:00
stronk7 0088748449 Oops, commenting some debug lines I left in my previous commit. 2008-02-03 18:24:56 +00:00
stronk7 71b750ed86 Fix restore of outcomes, resusing them when possible. MDL-13309 2008-02-03 18:20:36 +00:00
skodak b632c1b6c9 MDL-13320 typo in lang/en_utf8/forum.php, found by Mitsuhiro Yoshida 2008-02-03 17:56:59 +00:00
skodak 022747163e MDL-13319 skip disabled modules and blocks in cron 2008-02-03 17:27:32 +00:00
urs_hunkler 038b5bd550 Chameleon restrictions info added. 2008-02-03 17:07:05 +00:00
urs_hunkler 270c2f9a0d MDL-13268 :: CSS cleanup and moved from the end of the file to the other admin CSS definitions 2008-02-03 16:57:25 +00:00
urs_hunkler c1abb7586f Merged from 1.8 :: MDL-13268 :: CSS added 2008-02-03 16:54:53 +00:00
stronk7 e2f8d8a212 Detect used scales in course outcomes too. MDL-13307 2008-02-03 16:39:21 +00:00
skodak a3b9814156 MDL-13317 use cached system context in get_user_access_sitewide and when rebuilding paths 2008-02-03 16:21:35 +00:00
skodak b79595db64 MDL-13316 added static cache for time zone info 2008-02-03 16:00:27 +00:00
urs_hunkler 38d6367287 removed trailing space 2008-02-03 15:59:18 +00:00
urs_hunkler 936eeefdcb MDL-13181 :: added to handle changed xhtml
.glossarypost div.concept h3,
.glossarypost.continuous .concept {
  display: inline;
}
2008-02-03 15:55:29 +00:00
skodak ea3c67c5cb MDL-13312 fixed notices caused by previous commit, patch by Gary Anderson 2008-02-03 12:52:29 +00:00
skodak 27ea59826f MDL-13310 added static cron cache into format_text() to prevent some db access 2008-02-03 10:55:24 +00:00
skodak c0207b1ba7 MDL-13306 option to skip logging of blocked emails in forum cron 2008-02-03 10:35:23 +00:00
stronk7 e0acc94f9f Add missing description to grade_outcomes backup. 2008-02-03 10:32:10 +00:00
skodak fc637ec2c1 MDL-13305 , MDL-13304 - fixed memory leak in forum cron and saved 10% of queries when printing user pictures in mails 2008-02-03 10:20:31 +00:00
moodler 04d79b7a0e Automatic installer.php lang files by installer_builder (20080203) 2008-02-03 03:37:11 +00:00
stronk7 9ddb243f13 Add some browser output when restoring a lot of users 2008-02-03 00:46:32 +00:00
stronk7 8f92c1f78b Now we are reading user_profile_fields and user_tags + some small fixes on roles. MDL-6856 2008-02-02 23:58:09 +00:00
skodak 01eaffcf75 MDL-12901 undo weird IE6 hack on bulk and manage users filter form 2008-02-02 22:59:33 +00:00
skodak f995637ed3 MDL-12710 no wrapping of user selection columns in user bulk form 2008-02-02 21:52:43 +00:00
skodak 14f79d5a2f MDL-12900 prevent fatal errors when incorrect scale id specified in grade_item 2008-02-02 21:33:20 +00:00
skodak ccd48da98d MDL-13147 fixing undefined ungraded array and its indexes 2008-02-02 21:23:02 +00:00
stronk7 82ecf200b7 Respect $showfeedback when deleting groups and groupings. 2008-02-02 20:41:55 +00:00
skodak 0e87d49e09 MDL-13257 fixed problems when section 0 does not exist yet 2008-02-02 18:55:35 +00:00
skodak 98cb031e96 MDL-13239 improved smtp bulk setting based on feedback from Gary 2008-02-02 16:22:15 +00:00
moodler 7e49db8100 Automatic installer.php lang files by installer_builder (20080202) 2008-02-02 03:46:03 +00:00
stronk7 fe5f3d08ac Change some conditions to properly check if the custom-profile-field really is using a duplicate shortname. MDL-13288 2008-02-01 17:17:51 +00:00
skodak ede88ab3be MDL-12945 changing get_fast_modinfo() section property to sectionnum to prevent conflicts with real cm->section; full recent activity speedup when printing user pictures in forum 2008-02-01 14:09:27 +00:00
exe-cutor 3d4646688f Corrected some typos and improved instructions 2008-02-01 13:36:54 +00:00
exe-cutor 59780d2e8f Added Shibboleth integrated WAYF service (forgot to add these files) 2008-02-01 12:58:08 +00:00
skodak 38f3f5f1a1 MDL-12945 modfullnames typo 2008-02-01 09:11:52 +00:00
skodak c2508a1608 MDL-12945 fixing mod indexes broken by previous commit 2008-02-01 09:08:40 +00:00
exe-cutor 0bc5c5f8c6 Added new text strings for integrated Shibboleth WAYF service 2008-02-01 08:34:08 +00:00
exe-cutor f32f73c0a6 file login.php was added on branch MOODLE_19_STABLE on 2008-02-01 12:58:08 +0000 2008-02-01 08:30:17 +00:00
exe-cutor 765235a121 file index_form.html was added on branch MOODLE_19_STABLE on 2008-02-01 12:58:08 +0000 2008-02-01 08:30:17 +00:00
exe-cutor 0975cc6e50 Added integrated Shibboleth WAYF service on alternative login page
Updated README
2008-02-01 08:30:16 +00:00
skodak ab3f9fc74e MDL-13220 rebuild course cache after ajax edits - patch by Myles Carrick 2008-02-01 08:22:25 +00:00
skodak c102e3aade MDL-7547 yet more speed improvements in rebuild_course_cache() 2008-02-01 08:15:06 +00:00
skodak 8d8105fdf7 MDL-13214 rebuild_course_cache fixes and speed improvements 2008-02-01 07:47:47 +00:00
skodak 4ce19d978c MDL-12945 disabled mods are not returned from get_course_mods() anymore, the results are used in scheduled backup and other parts that do not expect disabled mods 2008-02-01 07:32:34 +00:00
skodak ab62d48e88 MDL-13239 smtp bulk sending 2008-02-01 07:04:25 +00:00
moodler 6242b7c12b Some cleanups on the error page
- avoid spammers
 - emit proper 404 response
 - use support address if configured
2008-02-01 05:48:43 +00:00
moodler e629fc4ed0 Fixed a notice when a feed dies 2008-02-01 03:05:34 +00:00
fmarier bb4bab500b MDL-13244 - weblib - Add 'summary' attribute to print_table() 2008-01-31 22:21:52 +00:00
mjollnir_ 34f06f743b MDL-12440: take out auth title and description into base class, plugins can override. updated places that use get_string to call these methods. Credit: Luke Hudson <luke@catalyst.net.nz> 2008-01-31 22:01:38 +00:00
gbateson cfce2efbf3 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:26:08 +00:00
moodler 1659924e8d MDL-13260 Fixing misplaced variable (notice) 2008-01-31 07:03:33 +00:00
moodler 88e2f1c4bc MDL-13263 2008-01-31 05:49:46 +00:00
moodler e21d53b06b Automatic installer.php lang files by installer_builder (20080131) 2008-01-31 03:46:40 +00:00
moodler 42e9c00f18 MDL-13245 Add a check for viewall 2008-01-31 01:28:29 +00:00
scyrma 08576b0d0a MDL-11594 - Changes in image location broke chameleon 2008-01-31 00:37:06 +00:00
scyrma 740e1c8bd7 file open.gif was added on branch MOODLE_19_STABLE on 2008-01-31 00:37:06 +0000 2008-01-31 00:35:27 +00:00
scyrma 7f5e32ce55 file item.gif was added on branch MOODLE_19_STABLE on 2008-01-31 00:37:06 +0000 2008-01-31 00:35:27 +00:00
scyrma a227d4c0d9 file closed.gif was added on branch MOODLE_19_STABLE on 2008-01-31 00:37:06 +0000 2008-01-31 00:35:27 +00:00
stronk7 013df172c0 Quick fix for not working glossary index. Related to MDL-12949 that needs more improvements. 2008-01-31 00:19:04 +00:00
poltawski 9724b07ebc MDL-13255 - hidden activity capability check was wrong 2008-01-30 21:00:00 +00:00
poltawski 53938064c5 MDL-13255 - hidden activity capability check was wrong, but require_login()
handles it for us when passsed $cm
2008-01-30 20:57:37 +00:00
poltawski 0a3158d669 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
2008-01-30 20:41:52 +00:00
tjhunt 9e1a55242f MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:34 +00:00
mchurch f98f1a922e MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:42:22 +00:00
tjhunt 4334697e9e MDL-13253 - Should use separate language strings for user and module idnumber. 2008-01-30 16:33:41 +00:00
tjhunt 000b78f3f0 MDL-13238 - Optionally show the user's idnumber in the grader report. 2008-01-30 15:57:56 +00:00
scyrma ea4e7a0226 converted file from dos encoding to unix encoding 2008-01-30 07:27:15 +00:00
moodler 30b646c765 Don't show grades link when $course->showgrades is off MDL-13245 2008-01-30 06:55:55 +00:00
scyrma bcdb377366 MDL-13060 - upgrade path for users (re)created from backup files 2008-01-30 05:23:39 +00:00
stronk7 06e22959d1 Now user profile fileds and user tags are included in backups. Part of MDL-6856 2008-01-30 01:09:40 +00:00
moodler d9ab63d7e9 Applied patch from Yazel Hernandez to fix XHTML strict MDL-13230 2008-01-30 00:34:33 +00:00
danmarsden 3b32b74f43 MDL-3721 Wiki adds lots of invalid tags to the top of the page in every edit. patch from Grigory Rubstov 2008-01-29 20:51:36 +00:00
skodak b8a2e4a095 MDL-13237 rceche limiting through intcachemax finally implemented - this should prevent major memory leaks 2008-01-29 17:29:39 +00:00
poltawski 6f36f19a62 MDL-13226 - allow user digest settings to be set with bulk user actions 2008-01-29 16:20:14 +00:00
scyrma 4d4938c15e Upgrade path for MDL-13060. 2008-01-29 05:47:01 +00:00
moodler 296c5450fd Automatic installer.php lang files by installer_builder (20080129) 2008-01-29 03:39:22 +00:00
scyrma d74e9bf395 No changes - only recoded to utf8. (MDL-13060) 2008-01-29 03:34:14 +00:00
scyrma e783513693 oops : problem with apostrophes. 2008-01-28 08:32:43 +00:00
scyrma 50d3025947 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.
2008-01-28 08:30:05 +00:00
moodler d2f18a8694 Merged pdf php5 fix from MDL-13207 2008-01-28 05:27:13 +00:00
moodler c15c851c3b Automatic installer.php lang files by installer_builder (20080128) 2008-01-28 03:42:10 +00:00
moodler d53e1e9535 Fixed missing context argument MDL-13206 2008-01-28 03:21:42 +00:00
moodler dd0070851d Latest 1.9 tags 2008-01-28 03:18:13 +00:00
pichetp 339726d0d0 Mergging from head MDL-12255 Adding questiontext decoding and subquestions validation 2008-01-28 00:42:42 +00:00
pichetp 5c90d8094c MDL-12255 Adding questiontext decoding and subquestions validation when editing 2008-01-28 00:39:13 +00:00
gbateson 04d1cad3bf Fix Undefined property: stdClass::$displaynext in mod\hotpot\lib.php on line 356 2008-01-27 23:55:29 +00:00
gbateson b09b58f052 fix Undefined index: studentfeedbackurl in mod\hotpot\mod_form.php on line 305 2008-01-27 23:47:17 +00:00
mjollnir_ 357eefcdbe MDL-13161 - auth/db - suppress php warning when there are no users using db auth 2008-01-27 20:05:29 +00:00
poltawski 66d4805a81 MDL-13149 - use correct capability checks to decide which forum subscribe
links to display
2008-01-27 16:59:29 +00:00
stronk7 5e41141993 Rename lesson usegrademax to usemaxgrade because some old sites can be using the wrong one. MDL-13177 2008-01-27 15:34:29 +00:00
stronk7 03901b0c62 sql_isnull() not used anymore. Deleting. MDL-12970 2008-01-27 01:37:41 +00:00
stronk7 b8f671b379 Deleting core uses of sql_isnull(). MDL-12970 2008-01-27 01:26:47 +00:00
stronk7 59a745a6ad Adding some missing log actions when restoring forums. MDL-13184 2008-01-27 00:34:41 +00:00
stronk7 3f134ab610 Fix notice with edit enabled in site page. 2008-01-26 23:12:09 +00:00
stronk7 5cfbedea89 Added some helper functions, cleanup a bit and add missing parts. MDL-10721 2008-01-26 21:52:20 +00:00
poltawski df599bc11f MDL-13180 - prevent return of duplicate rows 2008-01-26 17:35:22 +00:00
poltawski 8b722fe0b0 MDL-13179 - avoid calling get_admin() when unecessary.
It uses a relatively complex query and its not needed except
for a minority of users so we may as well avoid it..
2008-01-26 16:56:23 +00:00
poltawski 278ecb2567 MDL-13180 - stop returning duplicate rows 2008-01-26 16:02:30 +00:00
nicolasconnault c86003482a MDL-13101 Correcting the display of non-standard plugins missing from disk 2008-01-26 09:58:08 +00:00
moodler d7b02b694e Automatic installer.php lang files by installer_builder (20080126) 2008-01-26 03:33:54 +00:00
poltawski 53bdf7e60a MDL-13068 - fix typo causing course delete to fail 2008-01-25 21:07:49 +00:00
poltawski 6b18f14151 MDL-13117 - course info was unavailable to students. There was broken logic...
course_parent_visible() always returns true if $CFG->allowvisiblecoursesinhiddencategories
is true,
2008-01-25 20:42:57 +00:00
nicolasconnault be664f9a44 MDL-13101 Now showing installed plugins missing from disk 2008-01-25 16:27:34 +00:00
skodak 2b5db7a39f MDL-12945 minor modinfo improvement- fixed typos (thanks Nicolas) 2008-01-25 12:06:39 +00:00
skodak fecac81cac MDL-12945 minor modinfo improvement 2008-01-25 09:38:16 +00:00
nicolasconnault db9f04b35d MDL-13101 Now showing standard plugins missing from disk. Refactored get_plugin_name() method 2008-01-25 08:36:17 +00:00
scyrma e3a08c6eaa Start on MDL-12730 .. fixes some E_STRICT messages for 1.9 (removing __construct in
this branch only, to stay compatible with PHP4)
2008-01-25 08:34:37 +00:00
jamiesensei ed3a874632 MDL-13156 "insert_category_and_question_ids() function name can cause name conflicts" 2008-01-25 07:06:34 +00:00
moodler a2b4c8cb94 Avoid a notice about $current for guests 2008-01-25 06:26:26 +00:00
scyrma 9f7d599561 MDL-12565 : use the right table 2008-01-25 02:43:10 +00:00
scyrma 4175366743 MDL-12565 - add AS to prevent problem with pgsql 2008-01-25 02:31:22 +00:00
scyrma 080ed4ba60 Fixes MDL-13124 and chooses more relevant tags to display 2008-01-25 01:31:40 +00:00
martinlanghoff b227269e56 accesslib: Fix get_context_users_bycap() when no roles grant the cap
When no roles mention the capability, get_context_users_bycap() breaks
badly. This trivial patch does a sanity check before jumping into the
SQL shark-pool...

MDL-13160
2008-01-25 00:54:35 +00:00
stronk7 d8898325db Merge + General cleanup of backup users. Part of MDL-10721 ; merged from 18_STABLE 2008-01-25 00:46:55 +00:00
skodak 94cbbdbd2e MDL-12945 a slightly bigger patch for performance in recent activity and various group related issues + some other fixes - see list of subtasks in tracker 2008-01-24 20:29:31 +00:00
poltawski f954aeaecd MDL-12627 - when visiting the gradebook for the first time, we don't sort
by anything sensible. Default to surname
2008-01-24 20:11:21 +00:00
stronk7 f0421951ed Prevent grade_grades and grade_grades_history to be exported for non-target users. MDL-13115 2008-01-24 20:02:56 +00:00
nicolasconnault 405350262e MDL-13103 It wasn't a missing !, it was $grade_item spelled as $item... 2008-01-24 19:55:25 +00:00
nicolasconnault c92941d7a4 MDL-13103 Added missing exclamation mark in front of empty() 2008-01-24 19:46:17 +00:00
poltawski 3a8093f895 MDL-13088 - database presets weren't escaping bad chars, causing presets
to break with a rogue <
2008-01-24 19:39:59 +00:00
skodak 293a2545b1 mod/quiz: fixed fatal error in quiz_print_recent_mod_activity(); Author: Matt Clarkson <mattc@catalyst.net.nz>
backported from HEAD
2008-01-24 19:11:59 +00:00
stronk7 98e13c2eea Reworked a bit to prevent non-target user role assignments to be exported. MDL-13115 2008-01-24 19:07:43 +00:00
nicolasconnault 227323aecf Backporting small changes from Head 2008-01-24 19:05:00 +00:00
tjhunt adea20f6dc MDL-12933 - Bug in mod/quiz/lib.php break MyMoodle - Fix thanks to Eric Merrill. 2008-01-24 17:13:29 +00:00
tjhunt 0c1d63a43e MDL-13102 - quiz_results block links to the old URL of the groups editing interface, and it links there for everyone, even if they don't have the capability to go there. Make it link to the participants page instead, if possible. 2008-01-24 16:33:37 +00:00
poltawski e30a701156 MDL-13148 - adding help popup for course module idnumber 2008-01-24 16:09:12 +00:00
nicolasconnault 95a7a2b866 Correcting unicode characters 2008-01-24 15:34:39 +00:00
tjhunt 369f3834ca MDL-13150 - Remove extra <br /> tag for XHTML strict validation - Thanks to Joseph R?zeau 2008-01-24 15:06:48 +00:00
nicolasconnault be5709b7fb Fixing $Id: tag 2008-01-24 14:45:49 +00:00
nicolasconnault b1c418839e Backporting phpdocs from Head 2008-01-24 14:33:43 +00:00
nicolasconnault 300ce0c64d Backporting comment from Head 2008-01-24 14:32:02 +00:00
nicolasconnault 1b5d15ba9d Backporting view.php link in navigation from Head 2008-01-24 14:10:45 +00:00
poltawski 5c5d465c97 MDL-13146 - prevent debug message about missing helpbutton title 2008-01-24 10:59:28 +00:00
nicolasconnault 8ab96578ab MDL-13101
1. Showing full path
2. Showing plugins to be installed
3. Lang strings properly used
4. Table headers
2008-01-24 08:40:31 +00:00
scyrma ccbbdc7319 MDL-13124 : simplify and fix the tag correlation logic. 2008-01-24 08:38:27 +00:00
moodler 0c89fe886d Automatic installer.php lang files by installer_builder (20080124) 2008-01-24 04:08:27 +00:00
scyrma 9bd0d5f805 MDL-8810: changing require_once to include_once when looking for mod/.../lib.php 2008-01-24 02:17:17 +00:00
stronk7 182ac1d6d8 Readding one line missed in last commit 2008-01-24 00:49:50 +00:00
stronk7 8ba998c60e Now the backup->users = none setting is properly populated to all
modules / instances, saving a lot of info to be always written. MDL-13115

Merged from 18_STABLE
2008-01-24 00:47:40 +00:00
nicolasconnault f547727478 MDL-13101 Renamed the print_modules_table() function to print_plugin_tables() 2008-01-23 22:48:48 +00:00
nicolasconnault f5f4cc3fe7 MDL-13101 New section of the upgrade process: plugins check 2008-01-23 22:43:11 +00:00
skodak 3e6a1aa58e MDL-13026 rewritten sql for calculation of averages on grader report, I hope it will be a bit faster now 2008-01-23 19:04:45 +00:00
skodak 690b1d1324 MDL-11920 prevent db traffic caused by user images 2008-01-23 17:40:45 +00:00
poltawski d6ad2b61f1 MDL-13112 - order my courses block alphabetically when only displaying a users
individual courses.
2008-01-23 15:39:48 +00:00
poltawski af1a463811 MDL-13107 - clean up data cvs import capability checks
Removed bad check 'mod/data:uploadentries' (which doesn't exist),
replaced it with mod/data:manageentries which is what is used to display
the form for this page.

Also removed the empty database redirect and editing entries checks
as there no way to get to this point in the UI and capability check
is covered by the manageentries requirecap (+ later sesskey check).
2008-01-23 13:26:46 +00:00
nicolasconnault b55b207c27 MDL-6826 New button added! 2008-01-23 12:54:30 +00:00
scyrma 7bff26bed6 MDL-8123 and MDL-11594 : make admin icons themeable. 2008-01-23 05:41:56 +00:00
moodler 173ac66759 Automatic installer.php lang files by installer_builder (20080123) 2008-01-23 03:47:51 +00:00
moodler 7604731552 Disable Workshop by default in 1.9 MDL-13100 2008-01-23 02:52:12 +00:00
skodak 75ec296d45 MDL-12144 new catgory on modedit available only when outcomes used in course 2008-01-22 12:11:53 +00:00
skodak 14a3c9f3bc MDL-12144 fixed creation of course category 2008-01-22 11:58:43 +00:00
skodak fa2d7d3201 MDL-13091 Aggregate including subcategories off by default, adding default values info into grade cat combo setting 2008-01-22 08:25:32 +00:00
moodler 6be5bdfb8e Automatic installer.php lang files by installer_builder (20080122) 2008-01-22 03:40:16 +00:00
moodler d6b6304fc3 Fixed a typo in the styles 2008-01-22 01:20:47 +00:00
skodak 5db97707d3 MDL-13085 delete grades and items when uninstalling module 2008-01-21 23:35:11 +00:00
danmarsden 9d6bdd5874 Fix for MDL-12998 and MDL-13079 Ldap not unenrolling users correctly merged from HEAD 2008-01-21 23:22:49 +00:00
skodak d4e4739aed MDL-12620 When a student receives feedback on an an assignment, they should be able to see how many points it is worth 2008-01-21 18:45:43 +00:00
skodak 5dd81daaed MDL-12773, MDL-12144 grade category selection on modedit page 2008-01-21 18:41:32 +00:00
skodak 29ad04a314 MDL-13084 SORT_LOCALE_STRING not defined < PHP 4.4.0; fixed typo 2008-01-21 18:16:59 +00:00
skodak 4516dce1a3 MDL-13084 SORT_LOCALE_STRING not defined < PHP 4.4.0 2008-01-21 18:15:44 +00:00
nicolasconnault 0fbc5579fb MDL-13050 Reverting, it's not working out as well as planned 2008-01-21 13:39:51 +00:00
gbateson 9455d7c920 fix Undefined property: stdClass::$studentfeedbackurl (line 282) and Undefined property: stdClass::$cellcontent2 (line 1081) in mod/hotpot/lib.php 2008-01-21 07:33:33 +00:00
skodak bfaa2a61dc MDL-13081 add "long grade" formatted string "score / maxscore" into grade_get_grades() and friends 2008-01-21 07:17:47 +00:00
skodak 46203368b5 MDL-13080 delete calendar events when uninstalling modules 2008-01-21 07:07:51 +00:00
gbateson 5fffec5d49 fix for MDL-13047 where no attempts were found for a particular HotPot 2008-01-21 07:00:21 +00:00
gbateson 9275a2bae5 fix for: Error in call to helpbutton function: at least one of $title and $linktext is required 2008-01-21 06:42:40 +00:00
moodler 9051fd4e30 Automatic installer.php lang files by installer_builder (20080121) 2008-01-21 03:40:04 +00:00
stronk7 949e8de8e7 Adding missing string to installer. MDL-12914 2008-01-20 20:39:18 +00:00
danmarsden 69329d504a Fix for MDL-12979 forum sends out notification to users not in course - due to call to deprec function get_course_users - This also fixes MDL-10163 2008-01-20 20:04:17 +00:00
skodak cb2bf96fe9 MDL-12983 Installation stops after trying to download Language-Pack - patch by Dan Poltawski 2008-01-20 17:58:06 +00:00
moodler ec5e30a4e9 Automatic installer.php lang files by installer_builder (20080120) 2008-01-20 03:37:39 +00:00
mudrd8mz 39477c96a9 MDL-12291 help.php is now able to skip _local langpacks 2008-01-19 21:57:13 +00:00
skodak a746e49818 MDL-13063 fixed comments and changeme password reset; fixed prev commit 2008-01-19 20:04:23 +00:00
skodak 6c9aa9b38b MDL-13063 fixed comments and changeme password reset 2008-01-19 20:02:28 +00:00
nicolasconnault 890204da8c MDL-13050 Oops... fixing syntax error 2008-01-18 22:40:05 +00:00
skodak 49aa2ee116 MDL-13052 edit/user.php typo 2008-01-18 17:13:23 +00:00
jamiesensei acfc18d8e8 MDL-13034 fixes "insertion of question / category ids at the CONTEXT_MODULE level does not respect whether the instance of the module has been selected for backup" and cleans up code a little. merged from HEAD 2008-01-18 15:09:55 +00:00
nicolasconnault 82a6cc3f44 MDL-13050 reverting a debugging comment 2008-01-18 14:37:29 +00:00
nicolasconnault 7bb1b32039 MDL-13050 Modules were updated, and grades.php files were added to the lesson and hotpot modules 2008-01-18 14:31:15 +00:00
skodak 996177940e MDL-11165 [[writinggroupingsgroupsinfo]] - it was already in head 2008-01-18 11:06:58 +00:00
skodak a948673c75 MDL-11165 [[writinggroupingsgroupsinfo]] 2008-01-18 11:05:13 +00:00
sam_marshall 85caf1b299 MDL-13045: Made groups UI use role name aliases 2008-01-18 11:03:01 +00:00
skodak 047e7670aa MDL-11072 sort groupings alphabetically 2008-01-18 10:49:24 +00:00
skodak 3824b03f06 MDL-11759 group edit cleanup; merged from MOODLE_18_STABLE 2008-01-18 10:15:40 +00:00
skodak 4b4d9ef4fa MDL-11759 group edit cleanup; merged from MOODLE_18_STABLE 2008-01-18 10:08:10 +00:00
moodler 654a2dae51 FIxed some typos in the popup names 2008-01-18 05:17:12 +00:00
moodler 66b3a7bcec Automatic installer.php lang files by installer_builder (20080118) 2008-01-18 03:41:08 +00:00
danmarsden e7504c319b fix for MDL-7128 lang file. 2008-01-18 00:39:01 +00:00
danmarsden c562b0f504 fix for MDL-7128 - hide save button when options are all full. and tidy up of old is_guest call 2008-01-18 00:31:37 +00:00
danmarsden bab754c727 MDL-12331 prevent hidden role assignments from being shown in the unanswered column of the choice, but still allow them to be shown if they have selected a choice. 2008-01-17 23:01:02 +00:00
nicolasconnault 7300023df8 MDL-12122 Applied Petr's suggested capability fix 2008-01-17 16:25:40 +00:00
nicolasconnault 3983345254 MDL-12122 Changed userid to PARAM_INT, and changed 'all' to 0 2008-01-17 16:07:11 +00:00
nicolasconnault 047901cbd0 MDL-12122 Completed the change to a more useful user report for the admin, with a few extra bits. 2008-01-17 15:03:35 +00:00
nicolasconnault e0ade9dbe7 MDL-12122 Completed the change to a more useful user report for the admin, with a few extra bits. 2008-01-17 14:54:50 +00:00
sam_marshall 6d07659acf MDL-12991 Updated groups UI so that it categorises members and potential members into roles (Teacher, Student, etc) 2008-01-17 11:28:56 +00:00
moodler f35daade0d Automatic installer.php lang files by installer_builder (20080117) 2008-01-17 03:42:39 +00:00
urs_hunkler e9a903a539 some CSS cleaning up 2008-01-16 20:04:06 +00:00
danmarsden 5a60b8a69a MDL-12890 - patch that allows doanything users to submit a choice, but not shown in the unanswered column. 2008-01-16 18:49:42 +00:00
skodak 91cb9645d4 tweak has_capability() debug mode to add only one query per page for cap name verification 2008-01-16 17:23:07 +00:00
urs_hunkler c9262623e7 new faster jQuery version 2008-01-16 17:21:28 +00:00
urs_hunkler 6489172657 MDL-12536 :: changed customtheme call to fixed custom_corners call. 2008-01-16 17:19:03 +00:00
poltawski 64ca832445 MDL-13003 - dont initialise params twice 2008-01-16 15:05:11 +00:00
scyrma f9348b84bc MDL-13020 : deprecates make_table 2008-01-16 08:24:27 +00:00
nicolasconnault d994fe68bc Reverting MDL-12974 and MDL-12941 (Urs simple wrapper changes) 2008-01-16 08:05:01 +00:00
nicolasconnault a28baeb99c MDL-12941 Added clear:none; to div.user-box css. Also fixed a couple of & with &amp; 2008-01-16 07:33:24 +00:00
scyrma e52c8d89f6 Fix for MDL-9669 : make it possible to specify 0 as cellpadding and cellspacing 2008-01-16 06:29:03 +00:00
moodler f845a2fba9 Small fix for the new SQL ... it works now for me on moodle.org MDL-12990 2008-01-16 06:12:10 +00:00
moodler 3475eeac11 Automatic installer.php lang files by installer_builder (20080116) 2008-01-16 03:38:52 +00:00
moodler 7a15af7d90 Move the inclusion of upgradelib.php to the top MDL-13017 2008-01-16 01:48:53 +00:00
poltawski b972485c21 MDL-12990 - save more needless db queries 2008-01-15 22:07:36 +00:00
poltawski 1c9a35efa2 MDL-12990 - use our user object and we save 2dbq for free on message history page 2008-01-15 21:33:15 +00:00
poltawski 3e5f98212d MDL-12990 - Significantly reduce database queries for messaging
search by getting info required by in search sql.

On a site with 1500 users:
Before: 850 dbq
After:  8   dbq
2008-01-15 16:09:50 +00:00
tjhunt ae1a7e05a6 MDL-13011 - Improve import form layout. 2008-01-15 15:25:03 +00:00
thepurpleblob 3ed692737c MDL-12016:
Read xml structure correctly to get category path
2008-01-15 14:50:24 +00:00
thepurpleblob be1448f47b Reverting Mike C's change in MDL-12016 2008-01-15 14:34:08 +00:00
poltawski 86f404fa52 MDL-12990 - clean up message_print_contacts() a lot to:
* Use less DB queries and avoid getting lots of needless data
 * Dont do a big php array rearranging loop - database does the work for us instead
 * split all the duplicated display code into a single function
2008-01-15 13:47:45 +00:00
ethem 8c4ca06f88 Tidy up 2008-01-15 10:54:18 +00:00
mjollnir_ 33c34c5705 MDL-13000 Adding support for developers to add their own capabilities to local/db/access.php
This relies on a local/ language pack as well for the capability names.
Notes on implementation are in lib/locallib.php
2008-01-15 04:20:02 +00:00
mjollnir_ 0972aa2291 MDL-13001 - adding support for language files in local/ directory. 2008-01-15 01:39:55 +00:00
mjollnir_ 8b2a37e7b1 More on MDL-11561 - fixed up path to local/ settings file to be more consistent,
added documentation in lib/locallib.php on how to create new local admin tree items
2008-01-15 01:09:54 +00:00
mjollnir_ c1139b492e MDL-11561 - added support for local/localsettings.php 2008-01-14 23:32:19 +00:00
skodak 94000d7320 MDL-12822 readding grade_get_course_grade(), alternative to grade_get_course_grades() 2008-01-14 23:28:06 +00:00
skodak aaf8bbd470 MDL-12912 module idnumber course unique only 2008-01-14 22:45:22 +00:00
ethem c8db08b82e 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:55:43 +00:00
poltawski b81e38ec0b MDL-12990 Ensure that displaying message contact list pictures doesn't take a
dbq per contact. Could do with a rewrite, but this saves us dbqs for now
2008-01-14 16:58:07 +00:00
moodler 2a5bbf81ca Automatic installer.php lang files by installer_builder (20080114) 2008-01-14 03:53:09 +00:00
urs_hunkler 3f710c6be5 MDL-12974 :: We urgently need a simple wrapper function to avoid the advanced containers when only a wrapper div is needed. Pages like for example the tags page look awful in custom_corners with all those unesessarily overlapping boxes.
I created the function print_simplewrapper_start($classes='generalbox', $idname='', $return=false) { ... } and used it in tag/indec.php and tag/lib.php.

The pages look much better now in custom_corners.
2008-01-13 20:02:53 +00:00
poltawski 3416e63f61 MDL-8269 - stats wasn't paying attention to run time settings as the strtotime
arguments were the wrong way round. Thanks to Mark Nielsen
2008-01-13 18:45:55 +00:00
urs_hunkler f86a5be206 merged from 1.8 :: MDL-12564 :: added font-family to the arrow properties. 2008-01-13 17:52:48 +00:00
poltawski 8ac075addf MDL-12560 - layout fixes for tag blocks 2008-01-13 16:34:18 +00:00
poltawski d15518f149 MDL-12560 - layout fixes for tag blocks 2008-01-13 16:28:55 +00:00
poltawski 9c8bcc6562 further refinement.. 2008-01-13 12:30:17 +00:00
poltawski 2cf92c01fb Improving wording 2008-01-13 12:28:14 +00:00
poltawski 4575e76e98 MDL-7846 - use translatable strings for bulk messaging 2008-01-13 12:20:59 +00:00
poltawski 5d53aa0544 MDL-12943 - remove old dialogue unused dialogue language files 2008-01-13 11:44:44 +00:00
poltawski 22c2af60e8 MDL-12742 - remove duplicated lang files 2008-01-13 11:36:14 +00:00
jamiesensei 4a6a7074ce MDL-12695 Symantec Norton internet security pop up blocker seems to be stopping user starting a quiz attempt - fixed this by using print_single_button which uses an onclick event to trigger a confirm dialogue, should work better even with popup blockers. 2008-01-13 08:54:56 +00:00
jamiesensei f92b08d9e1 whitespace clean up, removed all indentation with tabs and trailing white space 2008-01-13 08:35:38 +00:00
jamiesensei d42e5b0034 MDL-12906 add an optional parameter $jsconfirmmessage parameter to print_single_button 2008-01-13 08:09:09 +00:00
stronk7 c279331f64 Minor changes to custom check definition. MDL-12914 2008-01-12 18:50:33 +00:00
stronk7 be176082f4 Function changed to check for register_globals. MDL-12914 2008-01-12 18:49:38 +00:00
urs_hunkler 2c30fce4a2 MDL-11154 :: added the missing code and the config line and explanation in config.php for flexible columns. 2008-01-12 17:52:03 +00:00
urs_hunkler 17be8562d7 merged from 1.8 :: MDL-9306 :: explanation added for hooks as comma separated lists in Chameleon. 2008-01-12 16:31:50 +00:00
urs_hunkler 0cb3c46479 merged from 1.8 :: MDL-11486 :: added width to the adminblock 2008-01-12 14:51:52 +00:00
urs_hunkler f300eadf46 MDL-12210 :: set background-color: none to transparent 2008-01-12 14:26:20 +00:00
urs_hunkler 901c3d48a6 MDL-12910 :: changed top from 2.9em to 3.5em 2008-01-12 14:04:49 +00:00
skodak bcb667b7f5 MDL-12914 Register globals trouble 2008-01-11 23:21:35 +00:00
stronk7 9040c8d4e9 Fixed copy/paste typo. MDL-11341 ;-) 2008-01-11 17:20:31 +00:00
poltawski 99f36270c0 MDL-11341 - allow users with language editing perms to access language
editing
2008-01-11 16:26:10 +00:00
poltawski 5a3cafc899 MDL-11074 - incorrect test in page_generic_activity, thanks to Gordon Bateson 2008-01-11 15:42:05 +00:00
skodak ca9b92d39f MDL-12926 Discussion list shows all discussion in separate mode if user not member of any group and does not have accessallgroups 2008-01-11 13:08:17 +00:00
poltawski f57cdf69c8 MDL-12930 - wrong title text on search webpages button, thanks to Mitsuhiro
Yoshida
2008-01-11 11:58:41 +00:00
poltawski 18778321e8 MDL-12400 - superfluous required_param causing problems in upload
assignment user report.
2008-01-11 11:45:30 +00:00
urs_hunkler 56db843241 typo body#tag-manage table#tag-management-list, th, must be body#tag-manage table#tag-management-list th, 2008-01-11 11:32:49 +00:00
nicolasconnault d9d18969f0 Fixed intermixed quickgrading and quickfeedback help strings 2008-01-11 10:03:24 +00:00
urs_hunkler c309d41688 MDL-12221 :: removed the "nocoursepage" hack, which was an attempt to find out if a page has a layout-table. I developed this hack because Martin said, that he does not see any chance to implement a layout-table check. This hack followed several exception hacks because Moodel pages are inconsistently created. All those exceptions I could delete too.
Now I added a JavaScript layout-table check which works great.
2008-01-11 09:21:24 +00:00
moodler 2ac2ce803e Automatic installer.php lang files by installer_builder (20080111) 2008-01-11 03:41:08 +00:00
stronk7 a8482189a7 Adding custom check to test MDL-12914 2008-01-11 00:04:12 +00:00
stronk7 9e87c6033e Backported from HEAD. Added new library to store all core
custom checks to be performed by environmental stuff. MDL-12914
2008-01-10 23:49:15 +00:00
stronk7 692866105a file customcheckslib.php was added on branch MOODLE_19_STABLE on 2008-01-10 23:49:15 +0000 2008-01-10 23:46:28 +00:00
skodak b5c8f2f808 MDL-12921 Using visible groups in Q&A Forums student can't reply to discussions for All participants (including groups code cleanup) 2008-01-10 23:12:46 +00:00
poltawski ba4aea2b35 MDL-12915 - fixed require of removed file 2008-01-10 16:10:07 +00:00
jmg324 3dc2b907da MDL-6216 print_category_info no longer counts invisible courses if the user does't have permission to see them. 2008-01-10 15:43:21 +00:00
tjhunt 168eda8b3a MDL-12913 - Error messages when doing an XML grade import are not very helpful, include the idnumber that is causing the problem in the error message. 2008-01-10 15:38:47 +00:00
skodak fa366ea698 MDL-12911 fixed permission checks; merged from MOODLE_18_STABLE 2008-01-10 15:09:10 +00:00
tjhunt d67aacd867 Fix notice when you try to import an empty XML file. 2008-01-10 14:17:35 +00:00
tjhunt 33d2459c8d MDL-12373 - More instances of links to the participants list being shown in the navigation bar to people without the necessary capability.
I have not copied and pasted the same code into lots of different places. That sucks. We really need to refactor this into a function that builds the navigation up to, and including the user's name. However, I don't have time now. A list of the places touched by this bug (MDL-12373) will at least give a complete list of places that such a refactoring would have to touch.
2008-01-10 10:58:09 +00:00
poltawski ff82f12d5e MDL-12221 - use theme variables so it doesn't break on my setup ;) And remove
comment reffering to local server
2008-01-10 10:42:42 +00:00
skodak 0e2c2828fa search cron.php is included from search block, the config.php was already included in admin/cron.php - MFC 2008-01-10 10:05:50 +00:00
jmg324 decfd5028c altered require statement for config. (merged from head) 2008-01-10 09:54:31 +00:00
moodler ab54cc74d8 Removing some temp files that shouldn't be here 2008-01-10 06:12:07 +00:00
moodler 65743c17e0 Some small fixes to make custom_corners behave better as a parent theme MDL-12221 2008-01-10 06:10:02 +00:00
moodler 84dc99bbe9 Add support for db folder to auth plugins 2008-01-10 03:46:01 +00:00
moodler 5be691946f Automatic installer.php lang files by installer_builder (20080110) 2008-01-10 03:39:46 +00:00
stronk7 675b1a05ea Bump release to have it included in backups to beta 4 2008-01-10 00:19:57 +00:00
skodak d3d791f208 MDL-12822 removing some unused grade functions (obsoleted by format grade function), renaming PUBLIC API to activity communication API and adding new querylib.php with useful functions (requested by other devs) 2008-01-09 18:19:12 +00:00
tjhunt 0e544a84e6 MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message - and there were also instances in blog. 2008-01-09 17:23:45 +00:00
tjhunt 79a9b69e28 MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message - this was repeated in other parts of the user profile that I had not noticed when I fixed this before. 2008-01-09 16:46:19 +00:00
urs_hunkler 8f4a3ae2f1 MDL-12221 :: I added changes to weblib and the forum and glossary view pages, the custom_corners and standard theme to get those pages working.
In the view pages I changed the container function call to a simple "echo 'div ...'" to avoid the custom_corners container overhead and page oddity.

In weblib I added "clearfix" handling to the function "print_box_start($classes ...". "clearfix" is handed over to the containing divs. This is a hack, but I didn't know how to handle it without rewriting too much areas.
2008-01-09 15:03:29 +00:00
poltawski 3dd4e13cd6 MDL-12889 - bad capability check [thanks Tim!] in assignment recent activity report 2008-01-09 12:56:48 +00:00
poltawski f00d4c451b MDL-12888 - remove require to form no longer used 2008-01-09 11:03:00 +00:00
poltawski 18077e8b96 MDL-12888 - remove require to form no longer used 2008-01-09 10:56:48 +00:00
poltawski 78fb3bf3df MDL-10886 - Category edit: use 'save changes', enable cancel button to allow us
to get back from where we came from & refine where we are returned to when cancelled.
2008-01-09 10:49:05 +00:00
poltawski fd0e2fec76 MDL-12461 - wrong urls for message related log entries 2008-01-09 10:11:04 +00:00
moodler 4d7325ef33 Added back missing string to 1.9 MDL-12801 2008-01-09 07:35:47 +00:00
moodler 220a6d19b1 Hmm, somehow I checked in a conflict! :-( MDL-12801 2008-01-09 07:30:02 +00:00
moodler 8826b45a5a Bumping to Beta 4 2008-01-09 06:59:41 +00:00
moodler 1ec0ef254c Merged MDL-12801 from MOODLE_18_STABLE (Improve roles terminology for system) 2008-01-09 06:49:14 +00:00
scyrma 941802c3d1 Small documentation fix. 2008-01-09 04:09:00 +00:00
ericmerrill 95fb95cb3e MDL-11674
Undid change that could result in dataloss.
2008-01-09 02:08:04 +00:00
mjollnir_ 07e27f4746 MDL-12884 web installer should set the depth of the miscellaneous course category to 1 too (discussion in moodle hq skype chat with Petr) 2008-01-08 23:26:26 +00:00
martinlanghoff 9b672f584f mod/chat:chat_cron() - IS NOT NULL is better - MDL-11674 2008-01-08 22:37:18 +00:00
poltawski 8049c822ec MDL-12840 - gradebook CSV import was failing due to newlines with nothing
on them
2008-01-08 22:24:10 +00:00
martinlanghoff bf2de3499f mod/chat:chat_cron() delete stale chat messages with a single query, fast, and portable too! MDL-11674 2008-01-08 20:58:32 +00:00
poltawski 8432e9ba39 MDL-12882 - we were caching empty records which caused clone warnings 2008-01-08 20:19:18 +00:00
tjhunt 5e17bdd0eb MDL-12771 - change multianswer quetsion type HTML to more closely match that of other question types, in order to fix a layout glitch in Moodle 1.9. 2008-01-08 18:37:43 +00:00
tjhunt 5ae009ad6d MDL-12785 - Partially correct tick icon not displayed for MULTICHOICE, single answer questions. Fix thanks to Joseph R?zeau. Merged from MOODLE_18_STABLE. 2008-01-08 18:29:17 +00:00
urs_hunkler a35ce8ef14 MDL-12881 :: added class names "username" and "password" for better login form handling. 2008-01-08 17:59:44 +00:00
sam_marshall 6730788f48 MDL-12876 Moved accesshide text further off the screen as it was sometimes visible 2008-01-08 17:27:29 +00:00
poltawski 27e05b35a9 MDL-12464 - refine further so that glossary can't refer to instance from
another course (and cause breakage)
2008-01-08 16:46:41 +00:00
nicolasconnault b521e9ed8a MDL-12829 Removed a hard-coded test integer 2008-01-08 15:23:52 +00:00
tjhunt e0a411d4a4 MDL-12875 - Hidden courses not in category list not visible to teachers on those courses in the list of courses in a category. 2008-01-08 15:17:04 +00:00
tjhunt 0229dc83ea Put back DEBUG_DEVELOPER sanity check in has_capability, that makes sure the capabiltiy you are asking about actually exists. I know it takes an extra DB query, but it is DEBUG_DEVELOPER only, and it is worth its weight in gold, because otherwise you get really subtle bugs that take forever to diagnose. I know, I have just been banging my head against the wall for an hour. 2008-01-08 15:04:04 +00:00
poltawski 39dfcf7138 MDL-9372 - only show RSS options in database module when RSS is enabled 2008-01-08 13:39:35 +00:00
poltawski 0b7c820a73 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.
2008-01-08 12:49:41 +00:00
poltawski dc51efed7e MDL-12873 - show an add course button when editing at the top level (which
is the default view when you click 'Add/Edit Courses'
2008-01-08 11:59:07 +00:00
skodak df2a9e2a0a MDL-11830 width applied to input fields only, that should solve the incorrect size of button 2008-01-08 07:32:56 +00:00
skodak d65bb1547b MDL-12869 fixed minor security problem in installer - reported by hanno 2008-01-08 07:15:29 +00:00
iarenaza d0d840eaed 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.

Forward ported from MOODLE_18_STABLE
2008-01-08 00:16:18 +00:00
poltawski 7e65c42f39 MDL-12856 - previous commit was breaking moodle installs after
redeclaring method. Remove the duplicate function.
2008-01-07 20:56:20 +00:00
poltawski 6b843dfac1 MDL-12859 - add some whitespace so translation layout doesn't get messed
up
2008-01-07 20:31:02 +00:00
tjhunt d091ee027f Use the locale to sort the list of activites everywhere. This matches a change a made in one place before christmas. If you don't do this, the PHP sorts by ASCII order, so mixed case names, or special characters, get sorted wrongly. 2008-01-07 16:46:10 +00:00
poltawski d18387534d MDL-6529 - strip slashes when displaying category added success messsage 2008-01-07 12:20:13 +00:00
martinlanghoff 9276c875dd dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4 - MDL-12827 2008-01-07 05:03:45 +00:00
ikawhero f1d52ce1aa Adding method to allow printing of the enrolment key form code when using PayPal. 2008-01-07 00:58:10 +00:00
martinlanghoff 9dc8c1b014 MDL-12452 accesslib: get_users_by_capability() now excludes doanything'ers properly
With some subselect-outer-join poison-pill magic, when the we don't
want doanything users, we remove the roles that would grant such
dubious status.

Just a flick of the SQL muscle, actually.
2008-01-06 23:20:00 +00:00
martinlanghoff 264d665380 MDL-12523 accesslib: get_users_by_capability() fix subselect with ra.hidden
MDL-12452
2008-01-06 23:19:04 +00:00
martinlanghoff 4658b598b4 MDL-12523 lib/deprecatedlib: use sort_by_roleassignment_authority() to sort RAs
After calling get_users_by_capability(), use
sort_by_roleassignment_authority() to mimic what older versions of
Moodle did.

Affects: get_teacher(), get_course_teachers()

    MDL-12452
2008-01-06 23:18:51 +00:00
martinlanghoff 4ebe85b6a5 MDL-12523 accesslib: Introducing sort_by_roleassignment_authority()
This will help us bridge the gap from olden-style order-by
user_teachers.id. From the phpdoc...

 Will re-sort a $users results array (from get_users_by_capability(), usually)
 based on a sorting policy. This is to support the odd practice of
 sorting teachers by 'authority', where authority was "lowest id of the role
 assignment".

 Will execute 1 database query. Only suitable for small numbers of users, as it
 uses an u.id IN() clause.

 Notes about the sorting criteria.

 As a default, we cannot rely on role.sortorder because then
 admins/coursecreators will always win. That is why the sane
 rule "is locality matters most", with sortorder as 2nd
 consideration.

 If you want role.sortorder, use the 'sortorder' policy, and
 name explicitly what roles you want to cover. It's probably
 a good idea to see what roles have the capabilities you want
 (array_diff() them against roiles that have 'can-do-anything'
 to weed out admin-ish roles. Or fetch a list of roles from
 variables like $CFG->coursemanagers .

MDL-12452
2008-01-06 23:18:37 +00:00
martinlanghoff 3e117fb6af MDL-12523 lib/deprecatedlib: enrol/manual: Fix calls to get_users_by_capability() to avoid ra
get_users_by_capability() can no longer refer to properties of role
assignments or roles, as the capability aggregate is indirect.

Fixes:
 get_teacher() - though the results will be poor, as we cannot provide
                 role.sortorder reliably
		 (used mainly by mod/workshop)
 get_course_teachers() - which seems broken for a lot of situations as
                 its default parameters still refer to old tables.

MDL-12452
2008-01-06 23:18:19 +00:00
martinlanghoff f5687e385b MDL-12523 enrol/manual: Fix calls to get_users_by_capability() to avoid ra
get_users_by_capability() can no longer refer to properties of role
assignments or roles, as the capability aggregate is indirect.

MDL-12452
2008-01-06 23:18:08 +00:00
martinlanghoff b5ea0a4a52 MDL-12523 accesslib: get_user_by_capability() - Fix pagination
Ooops! Off-by-one error

MDL-12452
2008-01-06 23:17:53 +00:00
martinlanghoff 8658d5c5b0 MDL-12523 datalib: get_admins() - Rewrite to avoid get_users_by_capability()
get_admins() and get_admin() were counting on
get_users_by_capability() returning a role-assignment id to pick the
"primary" admin account. With the get_users_by_capability() rewrite,
we no longer have an RA id to clearly blame for the capability.

So, rewrite get_admins() based on the known-good SQL used in
is_siteadmin().

MDL-12452
2008-01-06 23:17:42 +00:00
martinlanghoff 22edc02cf9 MDL-12523 accesslib: get_user_by_capability() - Fix last_access handling
We were missing $courseid, which is actually $context->instanceid.

MDL-12452
2008-01-06 23:17:24 +00:00
martinlanghoff 3f1e6d3c73 MDL-12523 accesslib: get_user_by_capability() - Move capcheck to has_capability_from_rarc()
This fixes the handling of default roles as "tie breakers" for lower
RAs in conflict, and simplifies the code a lot.

The main loop in get_user_by_capability() runs a simpler state machine
that just collects role assignments (roleid and depth), and handles
pagination.

The complex part of the state machine has moved to
has_capability_from_rarc() which will walk the data structures
collected by get_user_by_capability() for each user.

Having all the complex state handling of $hascap there makes things a
lot easier for pagination and general sanity of
get_user_by_capability().

MDL-12452
2008-01-06 23:17:11 +00:00
martinlanghoff 53d3f7fd89 MDL-12523 accesslib: get_user_by_capability() - Move hidden RA checks to subselect
we don't deal with RAs in the main SELECT -- we deal with _capabilities_
which is an entirely different matter ;-) -- so push the ra.hidden check
into the subselect.

Also, remove ra.hidden from the default list of fields. Hopefully no
callers are using ra.hidden -- if they are, they should be calling
something else, as this function deals with capabilities. So we might
need an audit of callers, to check that noone is expecting ra.hidden
to be there.

MDL-12452
2008-01-06 23:16:54 +00:00
martinlanghoff ba702c6731 MDL-12523 accesslib: get_user_by_capability() - Handle the complex case
With this commit, we can handle the complex cases with

 - correct pagination, but not very efficient over large datasets

 - mostly-correct application of the override rules

The structure of the code is fairly complex in that we want to do
it without holding all the recs in memory, so we use a small state
machine. We have to handle the complex override rules over 1 or 2
permissions (when $doanything is set) so it all ends up quite complex.

There is one known issue with this code, in cases where the default
role ends up as the decider between 2 conflicting RAs, we fail to
apply it. This will need a bit of reorg of how the loop works.

MDL-12452
2008-01-06 23:16:33 +00:00
martinlanghoff b8dc2b75a4 MDL-12523 accesslib: get_user_by_capability() - Simple cases now handle multiple RAs
The "simple" case SQL did not handle multiple enrolments for the same
user correctly -- it would generate multiple rows for those users,
incorrectly.

With this patch we move the join to RA to a subselect where DISTINCT
takes care of things.

MDL-12452
2008-01-06 23:16:20 +00:00
martinlanghoff 6d5d43bab3 MDL-12523 accesslib: get_user_by_capability() - Handle complex rolecap resolution
With this patch, get_user_by_capability() can handle the cases where
users have multiple role assignments to the same course, and PREVENTs
and PROHIBITs affect the rolecaps of this course.

Without stored procedures we cannot resolve this entirely on the
server side - so in the complex cases we do as much as we can on SQL,
and post-process the data on the PHP side, including SQL-style
pagination.

MDL-12452
2008-01-06 23:16:07 +00:00
martinlanghoff 285b024ebf MDL-12523 accesslib: get_user_by_capability() - First, handle simple cases
This patch reorganises the conditions and field handling so
we can spot if this is a call we can resolve in a single SQL
query that we just pass back the results.

If there are any PREVENTs or PROHIBITs, we need to delve into
more involved stuff...

MDL-12452
2008-01-06 23:15:33 +00:00
martinlanghoff 26de0996d9 MDL-12523 accesslib: revert changes to get_users_by_capability() - MDL-12452 MDL-12451
The changes made by Yu and Tim are superceded by the patches that
follow -- and would not apply cleanly without this revert.
2008-01-06 23:14:25 +00:00
martinlanghoff 18ef2fc61e lib/setup: restore sanity to rcache handling
$CFG->rcache is safe to keep, even as we are reading the config table.

This is because whenever we update the config table, all the rcache
plugins either mark the cache as dirty or they update the cache.

The reason we want to be able to preserve this is that rcache settings
in CFG should usually be set in config.php rather than in the config
table.

With this fix, we support both control points.

Merged from HEAD.
2008-01-06 22:56:11 +00:00
martinlanghoff 73733d1b4b dmllib:rcache_get()/rcache_set() clone cached records - we do not want magic references here - MDL-12827\n And calling fullclone() with the huge cost in serialize()/unserialize() is not needed. Merged from HEAD. 2008-01-06 22:46:49 +00:00
moodler f0a794d200 Automatic installer.php lang files by installer_builder (20080106) 2008-01-06 03:24:42 +00:00
thepurpleblob 235b0335ef MDL-12701:
Missing string

Merged from STABLE_18
2008-01-04 21:05:44 +00:00
stronk7 fea7cdb0ba This change was missing in 19_STABLE 2008-01-04 18:18:18 +00:00
stronk7 c319e83622 Fixing $Id expansion. 2008-01-04 18:13:07 +00:00
moodler 890aec679c FIxed the navigation on the course assign roles tab MDL-12828 2008-01-04 05:19:21 +00:00
moodler 377002f981 Automatic installer.php lang files by installer_builder (20080104) 2008-01-04 03:31:09 +00:00
poltawski c5e1dedb3c MDL-12825 - add some extra height to popups in IE7, otherwise they cant
be used
2008-01-03 22:40:12 +00:00
skodak b85226a64e MDL-12817 logout before 1.9 upgrade in order to prevent weird upgrade problems 2008-01-03 16:36:22 +00:00
skodak c05ce94476 MDL-6786 Improved dropping of block and module tables during uninstall 2008-01-03 15:02:59 +00:00
moodler 2fa04d6d4b Automatic installer.php lang files by installer_builder (20080103) 2008-01-03 03:24:17 +00:00
skodak f113b4cc91 MDL-9744 passwork field for ldap bind pw - patch by Iñaki Arenaza; merged from MOODLE_18_STABLE 2008-01-02 22:54:25 +00:00
skodak 883ceaf293 MDL-10975 enrol_database_sync.php will run even if the plugin is disabled - patch by Braden MacDonald 2008-01-02 22:35:33 +00:00
skodak d282117166 MDL-11471 adodb 4.96a import 2008-01-02 18:37:42 +00:00
skodak d2b41f28a8 MDL-12796 iplookup rewrite; MFC 2008-01-02 16:49:02 +00:00
skodak 4d3e308a52 file geoipregionvars.php was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak a54217c8fd file geoipcity.inc was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak fa0516e1c4 file geoip.inc was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak 5b6d891d19 file earth.jpeg was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:04 +0000 2008-01-02 16:48:00 +00:00
skodak 936649fc69 file README.htm was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak 6a981df540 file ChangeLog.htm was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:04 +0000 2008-01-02 16:48:00 +00:00
skodak 60eb215831 file marker.gif was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:04 +0000 2008-01-02 16:47:59 +00:00
stronk7 789d840942 Respect case of enumvalues. MDL-12803 ; Merged from 18_STABLE 2008-01-02 16:47:34 +00:00
poltawski 8a898cb994 MDL-12789 - dont unnecessarily iterate over all groups 2008-01-01 23:03:02 +00:00
skodak a6c905fdac MDL-12794 admin setting for file location 2008-01-01 22:23:35 +00:00
skodak fb179457ce MDL-12793 PARAM_HOST incorrect cleaning 2008-01-01 17:21:54 +00:00
skodak 9263acf92a MDL-12790 highlighting in admin search results breaks html
MDL-12791 add defaults parameter to format_admin_setting()
MDL-12792 search in admin settings and defaults
+ minor speedup of fast highlighting and fixed empty span tags
2008-01-01 15:51:12 +00:00
poltawski ecf8aad8ca just tweaking comment for easy greppage 2008-01-01 15:30:09 +00:00
stronk7 225ff8f476 Better behaviour for "-" course searches under MSSQL and Oracle. MDL-7312 ; merged from 18_STABLE 2008-01-01 12:01:36 +00:00
moodler 2d00ab58bf Automatic installer.php lang files by installer_builder (20080101) 2008-01-01 03:15:04 +00:00
skodak dc2c453d63 MDL-11845 fixed security issues in curl related code in new download_file_content() + minor fixes in Snoopy 2007-12-31 23:16:56 +00:00
skodak f3566b2674 MDL-12786 admin search in configselect choices 2007-12-31 15:54:28 +00:00
skodak 5cc576de2f MDL-12782 magpie now uses download_file_content() - that should solve several remote RSS issues including proxy user/password + several download_file_content() improvements + other minor fixes 2007-12-31 15:36:48 +00:00
stronk7 1ee938f8ef Removed old timezones file. MDL-12024 ; merged from 18_STABLE 2007-12-31 15:27:11 +00:00
stronk7 40a6466542 Correct timezones listing when importing olson files 2007-12-31 15:24:22 +00:00
stronk7 f7cf45ab80 Prevent some debugging notices, cast to object before inserting. 2007-12-31 15:18:59 +00:00
stronk7 3e04a3cae9 Moving from old "timezones" location to the new "timezone" one. MDL-12024 ; merged from 18_STABLE 2007-12-31 15:06:09 +00:00
poltawski e967a609ae MDL-12777 - No longer a second option so tweak language 2007-12-31 15:01:51 +00:00
stronk7 6a51c3b132 1976 rules from 2007j Olson files. MDL-12024 ; merged from 18_STABLE 2007-12-31 13:22:21 +00:00
stronk7 1dd5f6455f file timezone.txt was added on branch MOODLE_19_STABLE on 2007-12-31 13:22:21 +0000 2007-12-31 13:20:36 +00:00
moodler 1ac07fdbcd Automatic installer.php lang files by installer_builder (20071231) 2007-12-31 03:19:00 +00:00
stronk7 19f28a9a35 Missed this in my previous commit. MDL-12698 2007-12-31 01:09:31 +00:00
stronk7 6dbe0406b6 Change some constants to avoid name collisions. MDL-12698 2007-12-31 01:03:37 +00:00
poltawski 5738a677f2 MDL-11845 - use the http 1.0 'Moved Temporarily' rather than unhelpful 'Found' 2007-12-30 23:09:29 +00:00
skodak 7271bdaf04 MDL-11830 a bit bigger button in login block, removing colons and adding css spacing 2007-12-30 22:54:16 +00:00
skodak bd955d4add MDL-12698, MDL-12569 - fixed inline docs 2007-12-30 22:35:45 +00:00
skodak 668932588a MDL-12775 PARAM_INT value '' automatically converted to 0 in configtext settings 2007-12-30 22:29:47 +00:00
skodak 5a5534d815 MDL-11845 unmask password field type for proxy url - thanks Dan for reminding me 2007-12-30 22:24:38 +00:00
skodak 52d4f11037 MDL-12698, MDL-12569 - componentlib & langimport improvements and fixes 2007-12-30 22:18:39 +00:00
skodak 593eb8ee75 MDL-11845 removing curl emulation library, snoopy has better support for proxies and seems to be more reliable on different platforms; spelling correction cURL instead of Curl; adding all proxy admin settings; better debug messages for file downloading; SOCKS5 proxy support 2007-12-30 19:42:04 +00:00
skodak 994190c63b MDL-12774 allow returning of errors from admin configtext settings 2007-12-30 17:58:30 +00:00
moodler f2bb3ae677 Automatic installer.php lang files by installer_builder (20071230) 2007-12-30 03:16:09 +00:00
mark-nielsen c992ccef67 Merging fixes for MDL-12383 and MDL-12605 from MOODLE_18_STABLE 2007-12-29 22:47:48 +00:00
mark-nielsen 56c256f030 Merging fix for MDL-12605 from MOODLE_18_STABLE 2007-12-29 22:16:03 +00:00
poltawski 3d3e3df555 MDL-11306 - adding a bit of info to try and explain that you can use
.domain.com to allow subdomains
2007-12-29 22:08:21 +00:00
mark-nielsen 69cf3d1ffb Merging fix for MDL-11900 from MOODLE_18_STABLE 2007-12-29 21:49:39 +00:00
mark-nielsen da367cb720 Merging fix for MDL-12610 from MOODLE_18_STABLE 2007-12-29 20:40:18 +00:00
poltawski 8ab536ef8c 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!
2007-12-29 20:29:00 +00:00
poltawski 6984aea08f MDL-12763 - proxy_url() in langimport was doing its own custom proxied
download magic. Convert to use download_file_contents() for more
robust downloads. And also add a more helpful error message while i'm
at it.
2007-12-29 20:01:04 +00:00
skodak e2d53c3d9e MDL-12756 print save button in admin search only when there are settings to save 2007-12-29 16:47:58 +00:00
skodak f62b5930a7 MDL-12752 making unsupported pages truly hidden 2007-12-29 16:35:59 +00:00
poltawski 1a30e1bc5c MDL-7242 eliminate last use of location to refer to city in profile where
it causes problems for translators
2007-12-29 15:35:38 +00:00
moodler 1946941cd7 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 12:18:40 +00:00
poltawski 3e6c7834ed Remove debugging message 2007-12-29 12:06:10 +00:00
stronk7 b097747f75 Added note about automatic DB creation. MDL-9609 2007-12-29 11:53:25 +00:00
stronk7 93c366d35d New string goes to installer lang files. MDL-9609 2007-12-29 11:50:09 +00:00
stronk7 9dbf0647b4 New string added to note about automatic DB creation. MDL-9609 2007-12-29 11:46:25 +00:00
stronk7 4698d64435 Under MySQL, create the db on install if possible. MDL-9609 2007-12-29 11:27:18 +00:00
moodler b4cc78ec68 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 03:18:14 +00:00
poltawski bb28536f44 MDL-3842 - tweak file-moving text to clarify 2007-12-28 23:23:46 +00:00
poltawski f0f110ff74 MDL-4962 - intialise var 2007-12-28 22:54:28 +00:00
stronk7 e7282f1fe6 Prevent race condition in event creation. MDL-5956.
Credit goes to Penny, Luke and Martin @ Catalyst.

Merged from MOODLE_18_STABLE
2007-12-28 18:57:45 +00:00
mchurch 23d08ac7be 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:12:32 +00:00
mchurch 16614d8106 MDL-12704 - Added error handling to print_recent_activity() to prevent fatal errors in the case of missing files. 2007-12-28 16:00:24 +00:00
poltawski 32261099c9 MDL-5598 - Custom feed titles on RSS block did not allow spaces or other
useful characters ;)
2007-12-28 12:56:32 +00:00
urs_hunkler e0a046d040 MDL-12749 :: print_box_strart was closed with pint_simple_box_end. corrected. 2007-12-28 12:43:43 +00:00
poltawski 2a2113d1be MDL-2414 - using quotes in enrolment keys failed due to slashes. 2007-12-28 12:35:26 +00:00
iarenaza 4efbaec111 MDL-12323 MDL-4061 Don't connect to the LDAP server if update external is not set for any field.
Forward ported from MOODLE_18_STABLE
2007-12-28 12:08:57 +00:00
moodler 5fcd786eca Automatic installer.php lang files by installer_builder (20071228) 2007-12-28 03:33:58 +00:00
mchurch aef130f71e 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:32:04 +00:00
urs_hunkler d7d14a80ef MDL-12745 :: added class clearfix to "form-item" to stop div collapsing. 2007-12-27 20:54:33 +00:00
poltawski f1b73b438f MDL-12209 - fix css errors 2007-12-27 15:38:53 +00:00
poltawski 1107dde0a1 ZZMDL-12345 - use consistent ordering on both sides of the assign group members
pane, sorted by lastname like other screens
2007-12-27 13:39:43 +00:00
poltawski 11bdc5ab49 MDL-12530 - fixed changing of tag type in tag management 2007-12-27 12:11:21 +00:00
poltawski ed3e48f765 MDL-9312 - prevent more than 20 chars being typed in city field, (we only
store 20 chars )
2007-12-27 11:35:38 +00:00
poltawski 9964700f5b MDL-12640 - if $CFG->country is set, use it for signup default 2007-12-27 11:17:58 +00:00
stronk7 17f1039b58 Bump to 1.9 beta 3 2007-12-27 00:15:12 +00:00
skodak 36d703a877 MDL-9552 reverting the [$userid] change - we do need array there in upgrades and changes in modedit 2007-12-26 23:20:54 +00:00
poltawski 08b6eeeae3 MDL-4164 - fix typo 2007-12-26 22:12:23 +00:00
poltawski e3a87a68b9 MDL-3776 fix typo 2007-12-26 21:40:01 +00:00
skodak ad2c8da954 MDL-12735 Make AJAX on by default, add option to disable AJAX course editing by default 2007-12-26 21:32:34 +00:00
poltawski f6453c1cde MDL-12734, fix calling print_header() twice 2007-12-26 20:18:14 +00:00
poltawski c5f4b371fe MDL-2013 - Stop resource auto-linking from occuring when resources are hidden 2007-12-26 17:41:48 +00:00
skodak cf0352fa3b MDL-12729 show recoverable fatal errors in DEBUG_ALL and DEBUG_DEVELOPER 2007-12-26 13:31:52 +00:00
skodak 50726e2969 MDL-12351 verify active group before use because allowed groups may change 2007-12-26 12:41:54 +00:00
skodak 05a3688962 MDL-12728 missing USER->mnehostid in forum cron processing 2007-12-25 22:21:19 +00:00
skodak 564c1a9392 MDL-11783 no uploads after finalising 2007-12-25 22:02:05 +00:00
skodak 1665e2d3b6 MDL-11758 removing one htmlpurifier file to prevent problems on some systems 2007-12-25 21:05:33 +00:00
skodak fbedee57ef MDL-12338 prevent KSES from breaking í chars in alt/title tags - credit goes to Eloy 2007-12-25 20:55:57 +00:00
skodak e262e268b2 MDL-12458 fixed gradebook upgrade/update problems when not grades yet in activities 2007-12-25 20:50:42 +00:00
skodak 3ff4e0d771 MDL-11561 tex debug leaking sensitive info 2007-12-25 11:41:46 +00:00
skodak 8450217132 MDL-11561 improved text filter cache resetting when settings change; fixed bug causing fatal errors if html purifier enabled during upgrade 2007-12-25 10:03:16 +00:00
moodler b2bc7cc85c Automatic installer.php lang files by installer_builder (20071225) 2007-12-25 03:17:23 +00:00
poltawski 8a4cb9dd5e MDL-12697 Category Themes do not appear when editing off 2007-12-25 00:59:31 +00:00
skodak 74a05d3fc8 MDL-12725 remove_dir() does not return correct status and fails if dir does not exist + improved sanity test in check_dir_exists() 2007-12-24 21:15:05 +00:00
skodak cb6400a485 MDL-12724 import of html purifier 2.1.3 2007-12-24 21:06:34 +00:00
skodak c525a81701 MDL-12713 all IE versions are broken beyond belief, rewrite of admin tree collapsing/expanding 2007-12-24 20:53:20 +00:00
moodler 7938b1cced Automatic installer.php lang files by installer_builder (20071224) 2007-12-24 03:21:34 +00:00
arborrow 1444c9d07e added comment to see MDL-9609 for progress on resolving auto creation of MySQL database 2007-12-24 02:35:49 +00:00
skodak 54e0d9a55c MDL-12720 removing confusing/not implemented CONTEXT_PERSONAL 2007-12-23 20:00:51 +00:00
skodak 9ddbe2cfb8 MDL-12720 removing confusing/not implemented CONTEXT_PERSONAL 2007-12-23 19:47:59 +00:00
poltawski cbf2ebdeee MDL-9981 - remove hardcoded admin path 2007-12-23 17:20:44 +00:00
poltawski 37c9edcbdf MDL-10611 - backslashes in username get doubled up with an nonsuccessful log in
merged from MOODLE_18_STABLE
2007-12-23 16:41:48 +00:00
poltawski 5dc7db71af 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.
merged from MOODLE_18_STABLE
2007-12-23 16:17:13 +00:00
poltawski 868f172373 MDL-10607 - support single quotes in db user/password in installer 2007-12-23 13:26:54 +00:00
skodak 4bdb55f50b MDL-12716 fixed admin setting for rcache; more robust rcache handling in setup.php 2007-12-23 13:08:56 +00:00
skodak 0c6d0ae8ed MDL-12717 use apply_default_exception_settings before other admin defaults 2007-12-23 12:04:59 +00:00
skodak 05b11fcb66 MDL-12714 no guest autologin for admin settings 2007-12-23 11:52:59 +00:00
skodak 8d6e06a18a MDL-12711 use 'checked' value for enabled resource_popup 2007-12-23 11:49:42 +00:00
skodak ed2d5284f7 MDL-12712 fixed multiselect when nothing selected 2007-12-22 21:57:28 +00:00
poltawski 2be702e457 MDL-12707 - moved hotpot/ lams to use new admin settings
backported from HEAD
2007-12-22 20:04:11 +00:00
poltawski 7c23e5eff3 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-22 20:04:12 +0000 2007-12-22 19:57:46 +00:00
skodak eeaf6aa373 MDL-12705 disabled guest autoogin in upgrade scripts 2007-12-22 18:16:22 +00:00
poltawski d44522b5f7 MDL-12706 - fix caps typo 2007-12-22 17:04:09 +00:00
moodler 068deeb136 Automatic installer.php lang files by installer_builder (20071222) 2007-12-21 19:10:26 +00:00
tjhunt 6bd8edfbde Ensure links of the form /mod/quiz/view.php?q=332 are backed up and restored correctly. 2007-12-21 15:38:38 +00:00
tjhunt 88b020ce95 Sort the add activites dropdown using the locale. 2007-12-21 15:37:50 +00:00
nfreear 999fb96f7b Merged MDL-7493 further fix: clean up themes, and remove references to 'hide-show-image' background images. Document smartpix for theming icons in wood and orangewhite readmes. 2007-12-21 12:01:24 +00:00
nfreear f7bd77baf5 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:28:50 +00:00
skodak 67c2776bae MDL-12690 use the same title for block in admin tree as in blocks manage page 2007-12-21 09:52:20 +00:00
scyrma dc82ac6eff Let the admin choose if a textfield is to be shown as plain text or as a password (with '*' in place of normal text) 2007-12-21 08:17:36 +00:00
moodler 0319f6ccac Automatic installer.php lang files by installer_builder (20071221) 2007-12-21 03:24:25 +00:00
stronk7 13ffbef897 tidy up phpdoc 2007-12-20 23:16:51 +00:00
stronk7 c15475c93b After some more tests... apply the new preconfigure_dbconnection()
to core. MDL-12657
2007-12-20 23:12:51 +00:00
stronk7 73c4f0de0e Adding the new preconfigure_dbconnection() function
to pre-define some BD/ADOdb stuff before connection. MDL-12657
2007-12-20 22:51:10 +00:00
skodak c7d6dce97d MDL-12683 - fixing broken tex in windows (borked by my last commit) sorry 2007-12-20 21:37:00 +00:00
skodak 45158bdb9d MDL-12443 use "UTF-8" label instead of "None" in sitemailcharset select box 2007-12-20 21:16:33 +00:00
skodak 766acf6ce4 MDL-12684 fixing wrong link to manual settings page - settings.php not implemented yet, sorry 2007-12-20 20:59:13 +00:00
poltawski 5d2fb0f679 MDL-12159 - We were only showing the filter selections to the user list when
there were more results than shown on the current page. This is unintuitive
with small lists where we were invisibly exluding users because of a filter
which is applied (but not shown on screen).

Now we always show the filter selections. Thanks to John Ryan.
2007-12-20 17:42:30 +00:00
skodak 583c8c1ebe MDL-12680 Assignment count for groups not working - patch by Greg Humphreys 2007-12-20 17:37:52 +00:00
poltawski cf20428733 MDL-12668 - Various themes not respecting theme varaibles 2007-12-20 17:31:18 +00:00
skodak 7e9b2809a9 MDL-12678 moved pinned blocks setup page to Modules/Blocks/ 2007-12-20 16:30:39 +00:00
skodak ed277edea0 MDL-11814 use system context for pinned blocks 2007-12-20 16:25:17 +00:00
poltawski 0c3cdd4d79 MDL-12638 - fixed typo 2007-12-20 16:16:50 +00:00
poltawski ae74081cc3 MDL-12670 - fix warning when groupings not enabled 2007-12-20 16:10:03 +00:00
poltawski 847af02833 MDL-12676 - generate navigation if none supplied to print_header_simple() 2007-12-20 15:48:37 +00:00
tjhunt 176c6e8a23 MDL-12675 - Give teachers a direct link from the quiz index page to the results. 2007-12-20 15:11:01 +00:00
poltawski bcb2b60ff9 MDL-12674 - use require_capability on the participants page to get
friendly error messages
2007-12-20 15:09:40 +00:00
skodak 59a1e0f320 MDL12672 fixed parent::search trouble 2007-12-20 14:38:01 +00:00
tjhunt 204f51c760 MDL-12666 - When moving questions between categories, we should default to copying amy linked files. 2007-12-20 11:26:50 +00:00
skodak 0d3b5bdc16 MDL-10464 user list download in bulk ops 2007-12-20 10:54:07 +00:00
skodak 165ea8e3bb MDL-12659 fixed warning 2007-12-20 09:00:59 +00:00
moodler 5f4d28ccf9 MDL-7493 further fix: strip_tags from title strings because the titles may have HTML in them. 2007-12-20 01:50:38 +00:00
whchuang 2b9cc5a966 Fixed MDL-11812, thanks to Alan Trick's report 2007-12-20 01:35:17 +00:00
mjollnir_ 363d415464 fixing lying phpdoc comments in role_cap_duplicate function that I moved to accesslib yesterday 2007-12-19 23:32:15 +00:00
skodak 4d3769bf61 MDL-12656 indicate when current value is incorrect and propose default instead in admin settings 2007-12-19 22:37:37 +00:00
poltawski bc97420bd4 MDL-11561 - tweaking language a bit 2007-12-19 22:35:49 +00:00
skodak a5b7f1ab73 MDL-12655 set_config() should cast values to string because get_config does that too 2007-12-19 22:31:16 +00:00
poltawski a3eed2b0c0 MDL-11561 - remove unused variable 2007-12-19 21:06:12 +00:00
diml c695bf2783 adding keys for LESSON Module 2007-12-19 19:29:26 +00:00
skodak a8419f1a9d MDL-11561 use 60x8 text area to fit on all screens 2007-12-19 18:41:09 +00:00
skodak 00c2507ab0 MDL-11561 nail the editor width to 640px in admin settings pages - prevents resize problems (whitespace fix) 2007-12-19 18:25:19 +00:00
skodak 285286acf3 MDL-11561 nail the editor width to 640px in admin settings pages - prevents resize problems 2007-12-19 18:24:57 +00:00
skodak 765e3e8e82 MDL-10401 redirect to site/admin/ if section error found 2007-12-19 18:04:18 +00:00
skodak 3e1f8e095c MDL-12858 fix course category depths during upgrade to 1.9 2007-12-19 17:47:31 +00:00
skodak 40f43aa1fc MDL-11561 admin tree improvements and bugfixing; backported from HEAD 2007-12-19 17:38:37 +00:00
skodak d7381358f8 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:49 +0000 2007-12-19 17:35:28 +00:00
skodak 530239bbc9 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:49 +0000 2007-12-19 17:35:27 +00:00
skodak 92c1df4735 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:45 +0000 2007-12-19 17:35:26 +00:00
skodak 07053e3df5 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:41 +0000 2007-12-19 17:35:26 +00:00
skodak 86a42c8ac9 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:43 +0000 2007-12-19 17:35:26 +00:00
skodak 8caa580efd file plugins.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:37 +0000 2007-12-19 17:35:25 +00:00
skodak 618689ef22 file lib.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:41 +0000 2007-12-19 17:35:24 +00:00
skodak 6237517812 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:42 +0000 2007-12-19 17:35:24 +00:00
skodak 5b8f6bcc0b file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:48 +0000 2007-12-19 17:35:22 +00:00
skodak 2328f76997 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:47 +0000 2007-12-19 17:35:22 +00:00
skodak f58505164c file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:43 +0000 2007-12-19 17:35:22 +00:00
skodak 0384e168e8 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:46 +0000 2007-12-19 17:35:21 +00:00
skodak 14b34c4af3 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:45 +0000 2007-12-19 17:35:21 +00:00
tjhunt 6dd47a844f Teach XMLDB about the local/db folder, but only include it if the local folders exists. 2007-12-19 15:06:52 +00:00
nfreear b310a2d7c0 Followup for MDL-7493... - Finally the correct images! fix transparency, and improve contrast in Windows High Contrast Black mode. Merged. 2007-12-19 13:39:11 +00:00
tjhunt 7542409d39 New option on print_single_button to all printing of disabled buttons. 2007-12-19 13:31:06 +00:00
tjhunt 5af229ea58 gradebook / graded_users_iterator - Typo in conditional. 2007-12-19 12:40:02 +00:00
tjhunt 16ee776952 MDL-12647 - Moving multiple_choice questions between contexts breaks them.
There was a subtle interaction between get_question_options  and replace_file_links for this question type.
2007-12-19 12:10:50 +00:00
scyrma e8fe560958 Fix a bug passed on after commit of by http://lists.moodle.org/arc/commits/2007-12/msg00352.html
There shouldn't be html tags in this place.
2007-12-19 05:57:24 +00:00
poltawski 0600c266e9 MDL-12639 - prevent debug warnings about help buttons on database presets 2007-12-18 21:25:21 +00:00
mjollnir_ 4f5ffe5a7e moving two functions from admin/roles/manage.php (switch_roles and role_cap_duplicate) to accesslib & added phpdoc. Fixes MDL-12621 2007-12-18 20:50:39 +00:00
tjhunt e5f0e7d200 Improve the quiz_rescale_grade function, and call it from one other place, instead of duplicating code. 2007-12-18 18:19:36 +00:00
skodak b9015c2c2b MDL-12496, MDL-11889 allow deleting of activities with disabled grading from gradebook 2007-12-18 17:37:45 +00:00
nfreear fc025aeae5 Fixes reopened MDL-7493... - foreground show/hide block icon/ALT text switched with Javscript. Merged. 2007-12-18 17:25:59 +00:00
tjhunt 3f7c4ee5c4 MDL-12635 - Manual grading report does not check capabilites - also, only show the tabs for the reports people can access. 2007-12-18 16:11:41 +00:00
poltawski dca17878da MDL-12515 Feedback not available to student on assignments unless a grade has been assigned 2007-12-18 15:35:35 +00:00
tjhunt 5db5737b4f MDL-12517 - fix typo in the last commit. 2007-12-18 14:57:05 +00:00
skodak 7293bdf4cb MDL-12517 reverting the moving of data processign, returning array of warnings instead from function 2007-12-18 13:52:15 +00:00
skodak 44e65ebf62 MDL-12517 null not treated properly, max instead of min typo and pretty please initialize all objects properly 2007-12-18 13:26:30 +00:00
skodak 5b6219a750 MDL-12628 acces typo fixed 2007-12-18 11:59:52 +00:00
scyrma 72d707a346 MDL-12613 - this should fix (part of) the problem with the search block (take 2) 2007-12-18 08:17:13 +00:00
scyrma 075e3c715d MDL-12613 - this should fix the problem with the search block 2007-12-18 07:53:32 +00:00
moodler 7fdfade8dc Automatic installer.php lang files by installer_builder (20071218) 2007-12-18 03:26:51 +00:00
skodak 470b711740 MDL-12103 new config option for mail newline chars 2007-12-17 23:39:43 +00:00
skodak e1be3139a4 MDL-12524 fixed quoting of phrases in mail header (problem with special chars in names of users) 2007-12-17 21:37:59 +00:00
tjhunt cfa16a536e Strip out an unneccessary HTML table that way causing a 'button moves when you try to click on it' problem. 2007-12-17 17:17:17 +00:00
tjhunt 860f345ceb Minor quiz layout improvements. 2007-12-17 16:56:16 +00:00
tjhunt 833711e3b8 Unset a meaningless id. This probably does not change anything in moodle, but it was part of a bug fix in the OU version of Moodle that seemed correct, so I am merging it over. 2007-12-17 15:29:43 +00:00
tjhunt 204666c569 MDL-12616 - Improve layout so you can distinguish the student's response to an essay question from the feedback. 2007-12-17 12:28:00 +00:00
fmarier 00ff61c64a course/lib: Cache get_categories() using a static variable (MDL-11938)
Some recursive functions call get_categories() repeatedly to get all of the
child categories of the current one.

This commit create a lazily-initialized cache of all of the categories so
that the database is only queried once to retrieve all of the categories.

It speeds up the both the homepage and the course edit page (where the
categories are displayed in combo boxes).
2007-12-17 04:48:52 +00:00
poltawski 0b777b60c6 MDL-12385 - glossary category edit page doesn't respect $CFG->pixpath 2007-12-16 18:15:00 +00:00
poltawski 071680021c MDL-11086 - more tweaks to helpfile as per Rays suggestions 2007-12-16 16:13:26 +00:00
skodak 04a9e1a834 MDL-12596 Timezone problem in PHPMailer RFCDate() Function - patch submitted by Leo Gaggl 2007-12-16 14:50:02 +00:00
poltawski 5b243bb55d MDL-11191 - lets not advocate copyright abuse by advising to steal pictures
from the web!
2007-12-16 11:57:34 +00:00
skodak 60414b0b11 MDL-12599 , MDL-12598 - fixed capability tests in user and overview reports 2007-12-16 10:53:36 +00:00
skodak f337e9c2c9 MDL-12598 use user context instead of personal 2007-12-16 10:34:41 +00:00
urs_hunkler 6c9f235d93 CSS cleanups :: collect some background definitions in a basic property and work with cascading to more special definitions. 2007-12-16 09:39:52 +00:00
poltawski dd377953f7 MDL-12593 - hidden role assignment icon wasn't being shown. Also prevent warning
about unset $hidden
2007-12-15 23:27:01 +00:00
poltawski 2559de3be6 Improving phpdocs for when to use format_string()/format_text() based on
wiki comments. It wasn't an entirely clear (e.g. mixup in MDL-11800)
2007-12-15 18:40:18 +00:00
skodak 504e7efe76 MDL-12580 fixed infinite redirect loop when editing profile for the first time 2007-12-15 16:56:33 +00:00
skodak 138b92ce7f MDL-12592 do not execute theme_setup() if header already printed 2007-12-15 16:52:27 +00:00
skodak 7d23e00836 MDL-12581 fixed multiple xhtml strict 2007-12-15 16:05:30 +00:00
skodak 05719ae21a MDL-12585 make sure category path, parent and depth are ok before creating contexts 2007-12-15 15:46:37 +00:00
skodak 2637d1d193 MDL-8992 eoas hack added only when really needed, removed slow fullclone 2007-12-15 13:20:28 +00:00
skodak 62d19b5336 MDL-11800 improving previous commit 2007-12-15 12:05:12 +00:00
skodak 4df7a2ef4f MDL-12570 option to disable lang autodetect from browser 2007-12-15 11:48:34 +00:00
stronk7 8b32d8e829 19_STABLE version bump by delta. Modify some timezone fields to accept new olson files. MDL-12024 2007-12-15 00:31:31 +00:00
stronk7 b0f0e1bb3a Modify some timezone fields to accept new olson files. MDL-12024
Merged from MOODLE_18_STABLE
2007-12-15 00:30:41 +00:00
skodak 7fdb5ee675 MDL-12221 reworked container autoclosing - error() and notice() do not work everywhere though; notice print header if needed now; new print_footer('empty') for empty footer - removes some hacky </body></html> 2007-12-14 21:21:06 +00:00
toyomoyo fc9aacd2d7 MDL-9290, restore performance improvements on reading xml 2007-12-14 06:15:11 +00:00
urs_hunkler 7006fb7609 MDL-12221 :: Some enhancements to handle the changed boxes - work in progress. 2007-12-13 20:21:05 +00:00
urs_hunkler aeb10b1c28 MDL-11438 :: added screenshot.jpg to prevent IEs crashing on the them selection page. 2007-12-13 20:17:37 +00:00
tjhunt c9cde2149e MDL-12575 - Backup and restore problems with the new question bank. 2007-12-13 18:48:16 +00:00
stronk7 ac11681809 Added the sql_cast_char2int() funtion to provide cross-db
casting from char/text to integer. MDL-12574
2007-12-13 18:00:30 +00:00
tjhunt ddd8279beb Improve error messages. 2007-12-13 17:24:51 +00:00
tjhunt 6a729d0756 MDL-12517 - Further refinement. Move the processing to after print_header, so any notices do not break XHTML strict. 2007-12-13 14:26:01 +00:00
tjhunt 99a4959494 MDL-12517 - Move checking code into the user interface layer where it belongs. 2007-12-13 14:17:29 +00:00
toyomoyo c912cc7258 MDL-12517, notify when grades entered into gradebook is out of bounds 2007-12-13 07:08:52 +00:00
toyomoyo 86b73f8e9c MDL-12470, fixing broken span tag 2007-12-13 02:32:27 +00:00
tjhunt 946db1620f MDL-11267 - follow-up - don't show the checkboxes in the overview report if you cannot do anything with them. 2007-12-12 19:12:54 +00:00
tjhunt a488df2a95 Improve PHP doc comments. 2007-12-12 19:02:01 +00:00
tjhunt 4e0af3b107 Fix Javascript error from essay questions on the review page. 2007-12-12 18:10:50 +00:00
tjhunt b7f00cff12 Fix notice. 2007-12-12 17:47:37 +00:00
tjhunt ea7f759cbf MDL-9459 - Provide information relating to groups in the summary message "Attemts: 123". Now, depending on the situation, you see one of three messages: "Attempts: 123", "Attemtps 123 (45 from your groups)" or "Attemtps 123 (45 from this group)".
I also took the opportunity to improve the layout of this message slightly, and clarify the message that tells you that you cannot add or remove questions from the quiz if there are attemts.
2007-12-12 17:23:38 +00:00
tjhunt 297178bc87 Improve PHP doc comments. 2007-12-12 17:10:51 +00:00
toyomoyo 82b7f28a61 MDL-12544, hide hidden roles in profile when user has no capability 2007-12-12 07:12:38 +00:00
toyomoyo d40f5b74e6 MDL-12550, wrong user count in role assignment 2007-12-12 03:28:41 +00:00
stronk7 214f6d7493 Reintroducing the possibility to declare a second row of tabs
via extratabs. MDL-12551
2007-12-12 00:56:54 +00:00
stronk7 a88c2ffdaa Adding the ability to perform custom uninstall tasks in modules. MDL-12520 2007-12-11 23:38:38 +00:00
tjhunt 5775ef80c0 MDL-12546 - The choice module was calling get_users_by_capability, which hammers the database and returns lots of data, inside a loop over users - and it was calling it with identical parameters each time. Ouch!
Actually, since the fix for MDL-12331, which changed the get_users_by_capability call at the top of this function, the check it was doing is entirely redundant anyway, so I removed it.
2007-12-11 18:49:44 +00:00
tjhunt 0eea4f9355 MDL-12543 - Quiz overview report displays a grade of 0 the same way as a missing grade for an incomplete attempt. 2007-12-11 16:55:40 +00:00
tjhunt 8d531749c3 MDL-8682 - followup. When disabling the enter key, don't disable it on links. That is bad for accessibility. 2007-12-11 16:23:32 +00:00
tjhunt 6233a11b29 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. 2007-12-11 15:21:28 +00:00
nfreear 0a440a8682 Fixes MDL-12541 "Weeks course format - dates for each section should be marked up as heading". 2007-12-11 15:17:55 +00:00
tjhunt c6d734d3f9 MDL-12540 - Quiz sometimes outputs content before <head> when previewing - breaks HTML strict. 2007-12-11 15:04:09 +00:00
nfreear 2ec308a8b5 Fixes MDL-12539 "Help link text for all admin/user filters are broken". Merged. 2007-12-11 14:01:17 +00:00
nfreear 29308ee5da Fixes MDL-12539 "Help link text for all admin/user filters are broken". Merged. 2007-12-11 13:01:13 +00:00
tjhunt eabc30d78b Take out debugging output in role_assign. It only tells you that something has worked, and everywhere else we use debugging output to warn people they have called an API wrongly. Therefore, this is just confusing now that we trust this bit of roles code. 2007-12-11 10:37:56 +00:00
toyomoyo 66064c5262 MDL-12504, gradebook export does not respect course item position 2007-12-11 05:42:08 +00:00
scyrma 1c8bf4e4c2 prevent some notices, cleaner code. 2007-12-11 05:09:08 +00:00
scyrma 64fa3a1f8f MDL-12528 - getElementById was misspelled. 2007-12-11 04:58:13 +00:00
jamiesensei be350cb127 MDL-12410 - a way to select which questions to export, includes debug messages 2007-12-11 03:54:21 +00:00
toyomoyo 0abcfef0c9 MDL-12463, do not backup mod gradeitems if not selected 2007-12-11 03:15:33 +00:00
toyomoyo ed8bd3952b MDL-12519. grader report row colors override highlighting 2007-12-11 02:04:00 +00:00
martinlanghoff 25977a0eaf MDL-12523 accesslib:cleanup_contexts() - Fix invalid SQL syntax and reserved keywords
cleanup_contexts() was not working on Oracle - mostly due to 2 SQL
syntax problems. So probably marginally working elsewhere.

 - We should not use AS when naming table/subselect aliases - only
   when referring to column aliases in the resultset

 - level is a reserved word - oops! - so back to contextlevel
2007-12-10 21:34:05 +00:00
tjhunt abc011e5cc MDL-12512 - Gradebook calculations are broken. This was caused by == FALSE that should have been === FALSE deep in the 3rd pary maths lib. 2007-12-10 17:37:01 +00:00
tjhunt 1bb997ecc3 Do not suppress errors from developers! it makes debugging a nightmare! 2007-12-10 16:53:11 +00:00
tjhunt 200640a52c Fix notice in numerical question. 2007-12-10 11:57:22 +00:00
stronk7 2494fa8c7b Document MDL-12378 2007-12-09 18:21:39 +00:00
stronk7 6931f8a7b5 Prevent XHTML breackage. MDL-12378 2007-12-09 18:19:24 +00:00
skodak d6948ebc6a MDL-11835 proper merging 2007-12-09 15:26:00 +00:00
stronk7 91cd49491c Changing wrong UNSIGNEDs to nulls in tests. MDL-11662 2007-12-08 18:52:12 +00:00
stronk7 c9a6c442a3 Changing XMLDB_UNSIGNED to nulls for non-numeric types. MDL-11662 2007-12-08 18:33:33 +00:00
stronk7 25da458902 XMLDB_UNSIGNED only applicable to number types. MDL-11662 2007-12-08 18:18:56 +00:00
tjhunt f8c7c3ae32 MDL-12501 - Logic for including 'Grades' link in admin block is different for the logic in grade/report/index.php. 2007-12-07 16:57:53 +00:00
sam_marshall cc4dae1350 MDL-12500 Fixed restore conversion for links in database templates 2007-12-07 16:26:07 +00:00
stronk7 1b2335b2c6 Using new cross-db sql_isnotempty() function. MDL-12084
Backporte from HEAD
2007-12-07 16:02:08 +00:00
sam_marshall ac1b88eab8 MDL-11845 Last checkin accidentally omitted a require_once (hopefully finally done now!!) 2007-12-07 11:11:13 +00:00
sam_marshall 58520f98b0 MDL-11845 Updated the three file downloads from Snoopy to download_file_content (which I didn't know about before :) 2007-12-07 10:23:27 +00:00
moodler 3563da4aad Added some whitespace as a test, sorry for the noise 2007-12-07 08:12:43 +00:00
moodler 15ad5491a4 Added whitepspace 2007-12-07 07:45:52 +00:00
fmarier ec7125dc19 weblib: Fix typo in print_table() which was causing invalid <th> tag
MDL-11506
2007-12-07 04:59:32 +00:00
toyomoyo 8353edcdf1 customized cron should be in dirroot/local/cron.php 2007-12-07 04:38:57 +00:00
toyomoyo b1b887fd84 MDL-12373, restore should not try to restore pre 1.9 gradebook categories 2007-12-07 04:06:33 +00:00
moodler ba1674a11c A test commit, only whitespace affected 2007-12-07 02:26:59 +00:00
toyomoyo 9132d15eca MDL-12432, do not enable 'updated only' grades export for other plugins 2007-12-07 01:40:45 +00:00
mattc-catalyst b97e501d33 MDL-12433: course/info respect the $CFG->allowvisiblecoursesinhiddencategories setting
Credit goes to Petr Kalis
2007-12-07 00:24:29 +00:00
mattc-catalyst 4ead5c7e3c MDL-12335: mod/lesson - fixed missing navigation links 2007-12-06 22:52:27 +00:00
sam_marshall a8e3b790b5 MDL-11845 Support for config proxy options when downloading language packs (& other components), timezone file 2007-12-06 18:07:42 +00:00
poltawski e0af2ed26c MDL-12464 - if a glossary is deleted, it causes some breakage in the
random glossary entry block
2007-12-06 15:42:01 +00:00
skodak a964e03d4f fixing unmerged files 2007-12-06 09:30:45 +00:00
skodak 0cec6e0c68 fixing unmerged files 2007-12-06 09:23:27 +00:00
skodak f8ed98f83b fixing unmerged files 2007-12-06 09:02:02 +00:00
moodler 6aac29e4ef Bumped the version to Beta 3 for new CVS server 2007-12-06 07:46:42 +00:00
toyomoyo be8e377c91 MDL-12352, block/search fails to install on postgres 2007-12-06 07:07:32 +00:00
moodler 3bdac46d14 Automatic installer.php lang files by installer_builder (20071206) 2007-12-06 05:22:42 +00:00
toyomoyo a08b933a00 MDL-12451, in get_users_by_capability(), defaultroleid bit fixes 2007-12-06 03:55:19 +00:00
tjhunt ccc64d9cf0 MDL-12452 - not a fix I fear, just clarifying the comments about how this method is broken. 2007-12-05 17:25:18 +00:00
tjhunt 22dd4e275a MDL-12438 - followup - fix typos. Thanks to Dan Poltawski. 2007-12-05 16:50:15 +00:00
tjhunt ecfa2d90ff MDL-12450 - Matching up roles on the restore settings form is broken - this is basically a complete rewrite of these two functions. 2007-12-05 16:13:59 +00:00
diml 6e7e89849a fixing security hole. reference : http://moodle.org/mod/forum/discuss.php?d=85748#p379857
Inaki Arenzana
2007-12-05 15:55:27 +00:00
poltawski 33dfd09c2d MDL-12446 - profile signup page not respecting custom user profile field
sortorder
2007-12-05 14:29:55 +00:00
nicolasconnault 4e5fa682b5 MDL-11835 Implemented changes discussed in http://moodle.org/mod/forum/discuss.php?d=85908. Also added item name and module name and category name (for category totals) in alt tags of icons 2007-12-05 09:35:18 +00:00
toyomoyo 1c47be2472 MDL-12430, if new and regrade are chosen, then preview hides 'old' students 2007-12-05 07:49:21 +00:00
toyomoyo 566e9d1313 MDL-12439 database preset fixes 2007-12-05 06:12:38 +00:00
toyomoyo 26deeb61ab MDL-12435, cancel in preferences form doesn't work 2007-12-05 02:58:54 +00:00
toyomoyo c635d2acc8 MDL-12437, sorting by names adds teacher to gradebook list 2007-12-05 01:12:02 +00:00
skodak ce9dd0470a MDL-12133 fixed regression in user advanced edit, sorry 2007-12-04 23:52:09 +00:00
mudrd8mz 907e321018 Do not produce PHP warnings in case string file does not define array $string 2007-12-04 21:50:35 +00:00
tjhunt a7502277f2 MDL-12438 - Print a develoer debug message if you call get_records with a non-unique first column. 2007-12-04 17:29:35 +00:00
nicolasconnault 5203f7252e MDL-11835 Implemented all the default settings suggested in the pdf report, and turned down the size of the report table fonts. 2007-12-04 16:05:57 +00:00
poltawski d5ca7a5706 MDL-12415 - When we have more than one category/lots of courses the course
block shows two links next to search other (Search Courses/All courses)
which point to the same place....

The all courses link is able to be switched off and the search courses is not,
for this reason i've gone for removing the search courses link.
2007-12-04 12:54:47 +00:00
sam_marshall afeec49db6 MDL-12431 Added ability for filters to contain lang files 2007-12-04 11:46:12 +00:00
nicolasconnault dbb552852a MDL-12389 Removed the selectallornone element in favour of a more generic submitlink element. The checkbox controller is now added to a form using moodleform::add_checkbox_controller. 2007-12-04 10:27:14 +00:00
martinlanghoff 7e17fa336e 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:24:23 +00:00
martinlanghoff fc3a00b2dc 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:23:44 +00:00
martinlanghoff a3fd4aeea7 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:23:23 +00:00
martinlanghoff eaad116912 accesslib: build_context_path() remove $temptable for Oracle too
The removal of $temptable was incomplete - and so build_context_path()
was broken on Oracle. MDL-11347
2007-12-04 06:23:06 +00:00
moodler 522437d506 Automatic installer.php lang files by installer_builder (20071204) 2007-12-04 05:24:57 +00:00
toyomoyo 8473f41780 MDL-12399, shorten_text() truncates all closing tags 2007-12-04 05:07:11 +00:00
toyomoyo d5694b16bb MDL-12419, do not present course start date if start date is invalid 2007-12-04 01:07:59 +00:00
toyomoyo ff302bdbb9 MDL-12419, do not present course start date if start date is invalid 2007-12-04 01:03:12 +00:00
fmarier ce32e5047d ddllib: Mark table_column() as deprecated
Signed-off-by: Eloy Lafuente
2007-12-03 23:19:17 +00:00
stronk7 50371de63b Adding some outer spaces to returned SQL to avoid wrong
sentences caused by concatenation.

Merged from MOODLE_18_STABLE
2007-12-03 20:43:43 +00:00
stronk7 257d6684ca 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

Merged from MOODLE_18_STABLE
2007-12-03 20:28:45 +00:00
nicolasconnault 4d502df33f MDL-12389 Removed testing code 2007-12-03 20:07:24 +00:00
nfreear 9008efba33 Fixes bug MDL-12416, Help links - img ALT text should contain phrase "new window" to match link TITLE. Merged. 2007-12-03 16:44:49 +00:00
nicolasconnault 3e328cac4e MDL-12389 Added a new getElementsByClassName function in lib/javascript.php, added the selectallornone formslib element, modified the advcheckbox element to support the group variable, and implemented the new element in grade_export_form 2007-12-03 15:42:08 +00:00
poltawski ab8eeb7b5a MDL-12409 - stop access to editing 'site course' with course edit form. 2007-12-03 12:12:15 +00:00
toyomoyo 5c451f237d MDL-10915, additional setting for emoticons 2007-12-03 06:25:58 +00:00
toyomoyo d062a31039 wrap search/replace in a function so that it could be used in cron 2007-12-03 04:45:49 +00:00
toyomoyo 58d4c2f1c0 MDL-12397, gradebook sort by names should start with ASC 2007-12-03 02:02:49 +00:00
tjhunt 974fc258fb MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message. 2007-11-30 12:07:25 +00:00
tjhunt 25c052dbd7 MDL-12393 - Layout tweaks on question category editing page. 2007-11-30 11:00:06 +00:00
scyrma 4b50cb9857 Code style corrections. 2007-11-30 03:08:05 +00:00
toyomoyo 79aa617250 adding support for customized cronjob 2007-11-30 01:56:52 +00:00
toyomoyo 5ed7235b17 fixing duplicate navigation 2007-11-30 01:15:34 +00:00
moodler 2548ed0c9c New installer files added - stronk7
Backported from HEAD
2007-11-29 17:03:39 +00:00
moodler abe74df9d9 file installer.php was added on branch MOODLE_19_STABLE on 2007-11-29 17:03:33 +0000 2007-11-29 16:59:26 +00:00
skodak 5642a74c63 MDL-7028 rewritten course reset + forum role_unassign cleanup fixes 2007-11-29 14:40:36 +00:00
scyrma a723bf77c4 Possible fix to MDL-12093 : give window without heading and navigation special css classes. 2007-11-29 07:18:53 +00:00
toyomoyo 4904f5c7a5 fixing a typo 2007-11-29 07:08:45 +00:00
moodler e38cd94623 Automatic installer.php lang files by installer_builder (20071129) 2007-11-29 06:00:48 +00:00
scyrma 4c75fbc5bb MDL-12093 : new strings to get locale-aware popup windows. 2007-11-29 05:59:18 +00:00
scyrma 84f78756c8 MDL-12093 : cleanup & simplify code to get popup windows. 2007-11-29 05:52:38 +00:00
toyomoyo 095c40469a MDL-12346, lesson module GIFT import fails 2007-11-29 04:31:14 +00:00
stronk7 cb60bc9eda Adding new wraplevelXX class for easier containers identification. MDL-12339 2007-11-28 18:13:32 +00:00
tjhunt 811c6b01e0 MDL-12330 - moving a question that uses an image in a subfolder of course files, where the same subfolder does not exist at the destination, fails. 2007-11-28 16:43:04 +00:00
urs_hunkler 210caf54a8 added missing pix 2007-11-28 16:14:58 +00:00
urs_hunkler 6480900924 file adv.gif was added on branch MOODLE_19_STABLE on 2007-11-28 16:14:58 +0000 2007-11-28 16:14:08 +00:00
urs_hunkler c5de7683ad file req.gif was added on branch MOODLE_19_STABLE on 2007-11-28 16:14:58 +0000 2007-11-28 16:14:07 +00:00
urs_hunkler 63aaa32f88 MDL-12370 :: added missing images 2007-11-28 14:20:56 +00:00
tjhunt 49aeee2bf6 MDL-12369 - get_actual_response should not truncate the student's response. 2007-11-28 12:45:42 +00:00
skodak a863e9a119 MDL-7028 gradebook related changes for course reset 2007-11-28 09:43:04 +00:00
toyomoyo 53bbf98533 MDL-10263, enable forum search for multiple groups 2007-11-28 07:51:48 +00:00
nicolasconnault f6ae5aee7c MDL-12356 Merging changes back from HEAD 2007-11-28 05:15:54 +00:00
toyomoyo 55271966bf MDL-11818, single post forum descript = first post 2007-11-28 05:08:19 +00:00
toyomoyo 2266595f2f MDL-11800, multilang support for category description 2007-11-28 02:56:04 +00:00
toyomoyo 33d78656e4 MDL-12326, adding missing footer 2007-11-28 01:24:52 +00:00
toyomoyo 76cf7cce29 MDL-12366, removing useless print_capabilities function 2007-11-28 01:19:38 +00:00
tjhunt b4c11424e2 MDL-12362 - Don't show scores for incomplete attempts on the quiz view page. 2007-11-27 19:18:11 +00:00
nicolasconnault 7f5f3d5f28 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:30:22 +00:00
nicolasconnault 43ba326a82 MDL-12098 Printing a closing div tag and the moodle footer 2007-11-27 10:31:48 +00:00
nicolasconnault b3469a7e13 MDL-12312 Reviewed and slightly improved Petr's great help file 2007-11-27 10:00:45 +00:00
gbateson 4761566c54 MDL-12318 filter/mediaplugins/filter.php can no longer insert mediaplayers into javascript, so hotpot module now requires its own filter to mimic behavior of multimedia filter in Moodle 1.7 2007-11-27 08:41:00 +00:00
nicolasconnault 9333d66af5 MDL-9506 Added support for 'course' type in grade_get_grade_items() function, plus corrected a few typos 2007-11-27 07:08:41 +00:00
nicolasconnault cd7bc967e3 MDL-12356 CSS classes implemented 2007-11-27 06:38:56 +00:00
moodler 00a00321ae FIxed up info about recordset usage 2007-11-27 05:58:18 +00:00
toyomoyo 430196f1a0 MDL-12352, block/search fails to install on postgres 2007-11-27 05:30:10 +00:00
scyrma dab7fce2aa imagealt wasn't loaded in a list of the user's posts. 2007-11-27 04:59:35 +00:00
toyomoyo 19907e0cfa fixing a typo 2007-11-27 03:22:03 +00:00
toyomoyo 2be1f0f6bb MDL-11194, course role names not reflected in course description 2007-11-27 01:52:17 +00:00
skodak 81bfdff8dd MDL-12350 do not set parent cat when updating 2007-11-26 17:44:46 +00:00
dwoolhead 81d923af09 MDL-12313 basically rationalising getting calendar events function calls 2007-11-26 14:43:07 +00:00
jamiesensei 619b3ca8db fix for error message 2007-11-26 13:34:47 +00:00
toyomoyo 52fbb269fd MDL-12331, hidden teacher should not be displayed in choice results 2007-11-26 06:00:55 +00:00
scyrma 1e27409e63 MDL-12294 - one more string fix 2007-11-26 04:51:06 +00:00
scyrma 35c9a930f3 Fix for part of the missing strings, as reported in MDL-12294 2007-11-26 04:42:23 +00:00
toyomoyo 717d379f57 MDL-12175, forum reset should delete attachments 2007-11-26 04:21:30 +00:00
toyomoyo 98ee46df71 expect multiple groups from sql 2007-11-26 03:21:20 +00:00
toyomoyo cb00cf26de MDL-12081, teacher with import capability can not import course 2007-11-26 02:38:56 +00:00
moodler 013c9869e1 Automatic installer.php lang files by installer_builder (20071125) 2007-11-25 03:57:12 +00:00
skodak a11abf14cb MDL-12130 fixed regression - disabledIf did not work in dateselectors 2007-11-24 13:36:13 +00:00
skodak ef4ad6c66e MDL-12133 validate() method tidying up 2007-11-23 22:12:34 +00:00
skodak a7d006a0d9 MDL-12329 fixed last access when course not accessed yet - patch by Yolanda Ordóñez Rufat 2007-11-23 21:30:46 +00:00
skodak 6900784f92 MDL-12221 custom themes revisited - fixed bug in previous commit, added more developer debug 2007-11-23 20:23:43 +00:00
skodak d6756ebbbc MDL-12221 custom themes revisited - implemented container concept 2007-11-23 16:41:13 +00:00
thepurpleblob a87249f196 MDL-12296:
Oops, missed adding do-not-unenrol option to synchronisation script.
Also took out bogus test function
2007-11-23 15:41:27 +00:00
moodler 868282ddc0 Automatic installer.php lang files by installer_builder (20071123) 2007-11-23 05:02:43 +00:00
stronk7 7b6da3346c Deleting one ='' condition that isn't cross-db nor necessary. MDL-12186
Merged from MOODLE_18_STABLE
2007-11-22 22:46:56 +00:00
skodak a75f4ef3e3 MDL-12312 fixed outdated aggregation help, added examples 2007-11-22 21:35:34 +00:00
tjhunt d1453ce26e MDL-12322 - Reference to incorrect language file 2007-11-22 18:15:07 +00:00
skodak 4aa2dc193f MDL-12312 fixed outdated aggregation help 2007-11-22 17:52:08 +00:00
tjhunt 1dcf42a4ba MDL-12282 - fix typo in previous commit. Sorry. 2007-11-22 11:51:19 +00:00
nicolasconnault a4a66fc93b MDL-9506 Returning stdclass objects instead of grade_item objects 2007-11-22 08:50:33 +00:00
moodler 338efed0ca Rename Smallest -> Lowest so it pairs with Highest 2007-11-22 07:04:25 +00:00
scyrma d2957326c8 Replaces 'GMT' by 'UTC' where it showed in user interface and fixes MDL-9164. 2007-11-22 06:26:58 +00:00
toyomoyo 81e19d3595 MDL-12309, gradebook can not sort by names while in group mode 2007-11-22 05:15:47 +00:00
toyomoyo b7144a35b3 removing user class from firstname/lastname cell, to avoide arrow image css 2007-11-22 01:37:00 +00:00
toyomoyo 3202bd7416 turn this block off when CFG->messaging is off 2007-11-22 01:16:37 +00:00
toyomoyo 9e4ae46a4b MDL-10028, adding a string 2007-11-22 01:04:59 +00:00
tjhunt 4a0f06d551 MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the quiz. 2007-11-21 18:08:56 +00:00
tjhunt a5f1acc2b4 MDL-12305 - Quiz reorder tool broken. 2007-11-21 17:59:52 +00:00
tjhunt ac6fa5eb90 Fix some whitespace. 2007-11-21 16:30:14 +00:00
tjhunt c4c1a7737f Fix typo. 2007-11-21 16:28:40 +00:00
nfreear 375f8d33f8 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:06:02 +00:00
thepurpleblob 5612af0dba MDL-12296:
Added option to prevent database enrolment plugin unenrolling users.
2007-11-21 11:07:56 +00:00
thepurpleblob e80944a42a MDL-12296:
Add option to turn off unenrolment by database plugin.
2007-11-21 11:04:52 +00:00
nicolasconnault 08403fd61c MDL-9506 Implemented and tested the new API functions 2007-11-21 10:04:19 +00:00
toyomoyo 02bd2e0d38 MDL-10294, MDL-10028, changing messaging/bulk messaging system 2007-11-21 07:52:50 +00:00
mudrd8mz 36d2ca6559 MDL-8090, MDL-10664 & others - improved help files editing
* langdoc.php has been merged into lang.php, some GUI improvements
* ability to edit both master and local help files
* preview fix (but still blocked by MDL-12291)
* added a help file
2007-11-21 02:56:30 +00:00
stronk7 7a92a518b3 Applying one missing string. tableofcontentsabbrev. MDL-12071 2007-11-20 23:43:15 +00:00
stronk7 a62cc62551 Adding one missing string. tableofcontentsabbrev. MDL-12071 2007-11-20 23:40:49 +00:00
diml 794d8721c0 added default values for datetime fields 2007-11-20 23:29:44 +00:00
diml c75d22a17c adding lesson support to 1.9 STABLE 2007-11-20 23:28:29 +00:00
diml e7b43fe5a2 fix unchecked foreach loops 2007-11-20 23:27:45 +00:00
diml 3b0d855c3c fix table name for deletion of indexes before regeneration 2007-11-20 23:27:26 +00:00
sam_marshall eebf6e2a47 MDL-12284 Moved require_js to weblib and improved it so that it works if called during header (also tidied up code) 2007-11-20 18:03:14 +00:00
tjhunt 5ee185d12e MDL-12286 - 'Save as new question' button ignores the setting in the 'Save in category' dropdown. 2007-11-20 17:51:45 +00:00
tjhunt b35f76841d MDL-12172 - Sorry, more fall-out from converting continue buttons to use GET instead of POST. Sometimes, URLs were being passed in with & already repalced by &amp; and we weren't handling that properly. Should now be fixed. 2007-11-20 17:30:56 +00:00
tjhunt 011508b2b0 MDL-12282 - Numerical question type - the units are displayed on the editing form with a stupidly large number of decimal places. Merged from MOODLE_18_STABLE. 2007-11-20 16:57:15 +00:00
tjhunt e1a0eb49d6 MDL-12280 - Question bank forgets sort order when adding multiple questions to a quiz. 2007-11-20 15:54:21 +00:00
tjhunt 09846a54ad MDL-12133 - Errors calling parent::validation in a moodle form subclass because the base class method returns true not an empty array. This patch allow subclasses to start their validate method with
$errors = parent::validation($data, $files);

which is what you naturally want to do if you are used to object oriented programming.
2007-11-20 15:07:48 +00:00
tjhunt 06d7ef9cd3 Remove a developer debug notice and save a database query. 2007-11-20 14:46:33 +00:00
nfreear 14156d6b54 Fixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text" (includes white-space cleanup). Merged (+ hacks for IE). 2007-11-20 14:24:41 +00:00
ethem 104838c9db Fix for Canadian Postal Code
http://moodle.org/mod/forum/discuss.php?d=81736
2007-11-20 13:30:50 +00:00
tjhunt 1a632495f7 MDL-12133 - Errors calling parent::validation in a moodle form subclass because the base class method signature was changed. This patch fixes all calls to parent::validation in the question editing forms. 2007-11-20 12:40:44 +00:00
scyrma 6ededd5f41 Makes it possible to confirm users using manual auth system. 2007-11-20 05:26:57 +00:00
moodler 36103b02fa Automatic installer.php lang files by installer_builder (20071120) 2007-11-20 05:17:31 +00:00
toyomoyo c1427112a1 fixing header/formatting 2007-11-20 05:14:55 +00:00
toyomoyo cba041369f MDL-12234, fixing unicode issues for global searchy 2007-11-20 04:09:41 +00:00
mattc-catalyst a559555e6c 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:34:55 +00:00
martinlanghoff 244f618892 MDL-12142 mailout-debugger: Now works on Windows too
Switched to use sys_get_temp_dir() to define
which tempdir to use.
2007-11-20 00:32:15 +00:00
martinlanghoff 27bb711fe9 accesslib: has_capability_in_accessdata() respects rdef locality a bit more
With this patch, we respect rdef locality when two roles
assignments in the same context have conflicting rdefs.
In that case, the most local rdef wins.

So RA locality still matters most. If you are a teacher
sitewide and a student in course X, student role trumps
teacher.

For a use case, see the discussion here
http://moodle.org/mod/forum/discuss.php?d=84472

Notes:

- If we wanted to have locality of RDEF trump everything
  we can. A comment in this patch shows how.

- I don't know how to reproduce this in pure SQL.

And Also:

This patch also fixes a bug where if CAP_PROHIBIT was set
_and_ another role added to it in the same context, we would
add or substract 1 to CAP_PROHIBIT, and it would lose its magic.

And while at it, tighten the code to avoid casts. All the
ints are unambiguously ints.
2007-11-20 00:19:07 +00:00
stronk7 d77bd5ecbe Some question formating...
Merged from MOODLE_18_STABLE
2007-11-20 00:08:58 +00:00
skodak 24b3c8307f MDL-12249 fixed distribution for small groups 2007-11-19 22:53:50 +00:00
skodak bad6da7acc MDL-12249 fixed small group ration, can be overriden from config.php now 2007-11-19 21:30:47 +00:00
skodak 70e10c77f3 MDL-12249 groups UI cleanup and improvements - see tracker for details 2007-11-19 20:27:50 +00:00
nfreear 9523ad0ab7 Initial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - test, imgAttributes.length NOT attributes.length. Merged. 2007-11-19 15:26:29 +00:00
sam_marshall ee20235449 MDL-12075 Display individually colour-coded events in calendar rather than random day colours 2007-11-19 10:50:53 +00:00
moodler 17afefef30 Improvements to the tabs for assigning and overriding roles. MDL-12120
Tabs are now all on the top row
Tabs have clearer titles
Other help texts improved
2007-11-19 07:10:48 +00:00
moodler d0131dbd89 Added some styles so that override screens have color. MDL-12248 2007-11-19 06:56:50 +00:00
scyrma 64b489a10d MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts. 2007-11-19 04:42:43 +00:00
toyomoyo 8ed7f23e33 MDL-12218, display course specific rolenames on override page 2007-11-19 04:34:16 +00:00
toyomoyo 08f256c416 MDL-12217, display course specific rolename in participants page 2007-11-19 04:12:38 +00:00
martinlanghoff 27278d2346 user_login() was not converted to using get_cache_flags().
It was still using the 'old' get_config() interface, so the 'cookie'
set by ntlmsso_finish() wasn't retrieved at all, and the automatic
login always failed.

Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>


Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>
2007-11-19 02:51:36 +00:00
martinlanghoff bb4bfe13df If the cache flag is not set, it doesn't make sense trying to test its value
Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>


Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>
2007-11-19 02:51:25 +00:00
martinlanghoff c124578f93 Fix typo in ntlmsso_finish()
Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>


Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>
2007-11-19 02:51:14 +00:00
martinlanghoff 2e2892ce89 auth/ldap: "creators" role assignment now also supports contexts
Now the DNs that indicate a course-creator role can also be contexts.
This way we support one more widely used practice in the weird and
wonderful LDAP world... MDL-12178
2007-11-19 02:50:55 +00:00
toyomoyo 896c18e842 MDLSITE-294, have to use a type cast 2007-11-19 02:23:30 +00:00
toyomoyo a3752a0b13 MDLSITE-294, role id needs to be an int, not a string 2007-11-19 02:06:37 +00:00
mattc-catalyst fc0e5e988e MDL-12172: fixed get parameters not being submitted in Firefox
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-11-19 01:42:38 +00:00
toyomoyo 4ea6f1f0ef changed to get_recordset_sql because get_records forces the first element to be key 2007-11-19 01:38:59 +00:00
toyomoyo 8bb10719d6 making an SQL cross-db compatible 2007-11-19 01:12:22 +00:00
iarenaza 2fa4b6d68e MDL-11099 and MDL-11655 Don't show external db password in clear (backported from HEAD) 2007-11-18 12:47:26 +00:00
moodler 9e65d861f7 Automatic installer.php lang files by installer_builder (20071118) 2007-11-18 04:49:16 +00:00
skodak 92db621b5d MDL-12231 fixed applying of CFG defaults during initial install phase 2007-11-17 21:20:48 +00:00
skodak 119fb86673 fixed typo throwing warnings during install 2007-11-17 20:54:43 +00:00
skodak 056ac15288 MDL-12041 fixed groupmode flag in cm when mode forced in course 2007-11-17 17:40:46 +00:00
skodak be4dd6c79b MDL-12041 fixed groupmode flag in cm when mode forced in course 2007-11-17 16:55:26 +00:00
skodak 9743ed49b9 MDL-10888 parent definition_after_data() must be called too! 2007-11-17 16:52:45 +00:00
skodak eafe828b26 MDL-12221 initialised $output and fixed whitespace 2007-11-17 16:35:26 +00:00
skodak 16ba1b0cf2 MDL-12199 problem with "Show advanced" used after pressing of enter in forms 2007-11-17 13:29:14 +00:00
skodak 6d1ad6b3e1 MDL-12146 merged recent changes from normal item to outcome form 2007-11-16 22:13:12 +00:00
skodak e56fb50a4a MDL-12146 merged recent changes from normal item to outcome form 2007-11-16 22:13:12 +00:00
skodak 519b6676c8 MDL-12200 fixed problems when no custom user fields defined 2007-11-16 22:10:52 +00:00
dwoolhead 0c46637a1a MDL-12226 forum index page not always displaying forum links or subscription buttons as expected 2007-11-16 17:00:50 +00:00
nfreear 326cf96333 Fixes bug MDL-12225, Mark up lists correctly in course/lib (accessibility). Merged. 2007-11-16 16:51:14 +00:00
dwoolhead 2bb2aa4dbb MDL-11979 Forum subscriptions loop hole allowing users to subscribe to forums they should not have access to. 2007-11-16 16:23:42 +00:00
arborrow fc4a2fffc6 Clarified help for importing custom user profile field data in response to http://moodle.org/mod/forum/discuss.php?d=84651 2007-11-16 16:13:48 +00:00
urs_hunkler b173ea77d9 MDL-12221 :: example: adding custom_corners to the info box on the forum page. 2007-11-16 12:49:10 +00:00
urs_hunkler 441df375b6 MDL-12221 :: add CSS for custom_corners boxes 2007-11-16 12:47:16 +00:00
urs_hunkler 1adb0ebb50 MDL-12221 :: Added wrapper functions for print_box, print_box_start and print_box_end to be able to add custom_corners to any boxes.
If you call print_custom_corners_box with the same parameters as print_box and custom_corners is enabled you get the custom corners divs within those boxes and can style them accordingly.
2007-11-16 12:44:53 +00:00
skodak 5a948984c4 MDL-12096 changed label of parent cat 2007-11-16 07:34:55 +00:00
scyrma 6df78935f8 Small fix for MDL-12216 : user.imagealt now showing in forum posts. 2007-11-16 06:05:34 +00:00
moodler 45b20961da MDL-12215 made the advanced search tab more consistent with the interface 2007-11-16 05:55:00 +00:00
toyomoyo 14975c1946 MDL-12121, fixing a warning 2007-11-16 04:24:17 +00:00
scyrma d9b9b40a71 Fix to a bug preventing rss feeds from loading correctly. 2007-11-16 03:32:26 +00:00
toyomoyo d9c7b58af6 MDL-12187, fixing grader report style 2007-11-16 03:08:14 +00:00
toyomoyo 990e04d823 MDL-11672, hide hidden assignment descriptions from calendar 2007-11-16 02:48:32 +00:00
skodak b8e8419bfc MDL-12096 new simple weighted mean aggregation type 2007-11-15 22:28:45 +00:00
skodak 791ad685b2 MDL-12146 grade item settings can be now configured as advanced, new advanced defaults, minor tweaks in admintree 2007-11-15 17:31:07 +00:00
urs_hunkler 6142a99373 MDL-12195 :: added closing '>' in line 157. 2007-11-15 16:26:33 +00:00
skodak 72c475f9ab MFC: MDL-12140 weights/extrapoints are never advanced 2007-11-15 15:44:39 +00:00
mchurch 1ea47ba4c0 MDL-12016 Category text not being sent to 'create_category_path'. 2007-11-15 13:56:31 +00:00
mchurch 89d2e91d13 MDL-12015 Import question count was wrong. 2007-11-15 13:30:44 +00:00
urs_hunkler 3941cc43f1 MDL-12191 :: workaround with JavaScript to add MDL-12191"haslayouttabel" class to body. 2007-11-15 12:06:34 +00:00
urs_hunkler f545230234 changed the form lable look. 2007-11-15 11:43:25 +00:00
bobopinna d0d5d320b1 MDL-12161 Stripped slashes in LO titles 2007-11-15 08:40:02 +00:00
skodak 4217056ab9 MDL-12140 category can be selected when adding new items or categories 2007-11-15 08:27:13 +00:00
bobopinna c90933facf MDL-12161 Stripped slashes in LO titles 2007-11-15 08:01:51 +00:00
toyomoyo edc62676a2 MDL-12180, blocks capabilities not appearing when overriding block roles 2007-11-15 07:44:52 +00:00
scyrma f2ee9706a2 Fix for MDL-10996 : prevent course name from being displayed twice. 2007-11-15 04:08:44 +00:00
scyrma 42cf57fb26 MDL-11401 - This simplifies the code and makes the registration page a bit more clear & coherent. Also fixes an issue where the $id was mangled when coming back from moodle.org registration. 2007-11-15 02:02:12 +00:00
toyomoyo 59a24c227e MDL-8330, adding a warning to translators about updating of lang packs 2007-11-15 01:17:48 +00:00
martinlanghoff 77db689064 MDL-9399 - auth/ldap NTLM SSO - strings 2007-11-14 23:45:21 +00:00
martinlanghoff 4e5813e6f2 admin/mnet: undo accidental commit 2007-11-14 23:43:05 +00:00
martinlanghoff 53cda2de31 MDL-9399 - auth/ldap NTLM SSO - fix a missing global 2007-11-14 23:40:50 +00:00
martinlanghoff c1ef755c30 MDL-9399 auth/ldap: NTLM temp sessions now use cache_flags
cache_flags is now the apropriate way to manage this kind of temp
data. It gives us time expiry and GC for free, so it's a perfect fit
for the job, as it simplifies the code a bit.
2007-11-14 23:39:41 +00:00
martinlanghoff 8b435d0993 MDL-9399 auth/ldap: NTLM SSO - fix hardcoded strings
From Iñaki Arenaza
And here is a little patch with the last remaining non-traslated
strings (unless I missed something).
2007-11-14 23:39:24 +00:00
martinlanghoff 4912df1582 MDL-9399 auth/ldap: NTLM SSO - move textlib conversion earlier
From Iñaki Arenaza - fix for

... I forgot to put the textlib conversion
call before the block of code that uses $extusername, so it
completely breaks the user validation process.
2007-11-14 23:39:11 +00:00
martinlanghoff 6e45019417 MDL-9399 auth/ldap: NTLM SSO - cleanup of sesskey handling
Fix a bug in ntlmsso_finish(), and tighten up user_login() to avoid a
pointless DB lookup if the password doesn't match the sesskey.

Hopefully this makes things work again...
(thanks I~naki for the testing!)
2007-11-14 23:38:44 +00:00
martinlanghoff d8ee4dfa6e MDL-9399 auth/ldap: NTLM SSO - use sesskey and other tidyups
Several tidyups:

- use moodle_strtolower() for utf-8 correctness

 - use sesskey as the key instead of IP addr to support
   proxied users

 - clean the sesskey after success!

 - pull timeout out to a constant: AUTH_NTLMTIMEOUT
2007-11-14 23:38:31 +00:00
martinlanghoff 8f09118ae0 MDL-9399 moodlelib: set_config() deletes config entries if the value is NULL
New! Improved! If you pass NULL as the value, it will delete the
config entry for you.
2007-11-14 23:38:07 +00:00
martinlanghoff 176307a26a MDL-9399 auth/ldap: Tighten NTLM AD checks to the appropriate OU
From Iñaki Arenaza...

Right now, if someone logs in via NTLM magic, we don't check if that
user is inside the contexts specified in the LDAP settings. I mean,
if I want to restrict my Moodle site to those users inside a given OU
or subtree of my LDAP directory, with the current code any valid user
in my whole AD domain (and if we are using a GC as the LDAP server,
the whole forest) can log in. We should check that the user is inside
one of the configured contexts before allowing his/her to log in.

Something along the lines of the attached patch could do it.
2007-11-14 23:37:53 +00:00
martinlanghoff 58af55c35e MDL-9399 auth/ldap: ntlmsso_finish() now completes the user session setup
As Iñaki points out, ntlmsso_finish() needs to do all the setup that
login/index.php would do for a user once auth succeeds. With this
patch, the session setup is complete so the logon is usable.
2007-11-14 23:37:40 +00:00
martinlanghoff afac1a0781 MDL-9399 auth/ldap: NTLM redirect only on initial GET
We only want to redirect when users are being shown the login page (on
GET) but not when users are POSTing to it, actually trying to login.
2007-11-14 23:37:26 +00:00
martinlanghoff a1353477c4 MDL-9399 auth/ldap: NTLM SSO - lots of fixes from Iñaki
Lots of typos and minor errors fixed by Iñaki. Thanks!
2007-11-14 23:37:10 +00:00
martinlanghoff 3ae767d8ba MDL-9399 auth/ldap: NTLM SSO - Resolve Moodle cookies issue, tighten config.php require()s
Use $nomoodlecookie global to avoid session troubles. Also

 * Ensure we load the appropriate config.php, even if we are executing
   under a strange environment (ie: with a user's credentials!)

 * Test we have a spacer gif to open before we open it
2007-11-14 23:36:56 +00:00
martinlanghoff bdadff33ff MDL-9399 auth/ldap: Add NTLM SSO pages
These pages control the process of attempting an NTLM SSO login
safely. This is very draft and needs real-world testing and polish.

And string localisation too ;-)

  * If NTLM SSO is enabled, and the user's IP addr is in the right
    subnet, the loginpage_hook() of auth/ldap redirects to
    ntlmsso_attempt.php

  * ntlmsso_attempt.php will display a "redirect" msg with an img tag
    pointing to ntlmsso_magic.php, a 3s wait, and a redirect to
    ntlmsso_finish.php

  * ntlmsso_magic.php should be configured to have "Integrated
    Windows Authentication". If it does, it will serve a spacer gif
    and call ntlmsso_magic()

  * ntlmsso_finish.php calls ntlmsso_finish() to complete the SSO
    and handles failures.
2007-11-14 23:36:41 +00:00
martinlanghoff 94beeb79c7 MDL-9399 auth/ldap: flesh out ntlmsso_* functions
Flesh out the functions that get the job done. These will be triggered
by PHP files sitting under auth/ldap/ ...

ntlmsso_magic() - here is where the magic happens. Call it serving
something harmless, like a space GIF, from a URL that is blessed with
Integrated Windows Authentication. If the IWA is successful, it will
set a special session cookie in config_plugins table.

It won't complete the job because when we are under IWA magic we
cannot change (even read!) the session data, as the execution happens
under the OS privileges of the actual user acct being logged in (!!!)

ntlmsso_finish() - if it finds the session set by ntlmsso_magic() and
it hasn't expired, it will finish the job of logging in the user, by
calling authenticate_user_login() and exercising the whole auth
machinery.

user_login() - when called by authenticate_user_login() it will check
to see if there's a session setup by ntlmsso_magic() and OK the login
without really asking the AD backend to proof a password we don't have
anyway.
2007-11-14 23:36:14 +00:00
martinlanghoff 056a54babe MDL-9399 auth/ldap: Introducing loginpage_hook(), ntlmsso_attempt(), ntlmsso_finish()
A work in progress -- initial loginpage_hook() and headers for the
remaining functions. One thing to consider here is that this won't
work if there's a proxy in the middle.

Does NTLM auth thingy support proxies?
2007-11-14 23:36:00 +00:00
martinlanghoff 04038968be MDL-9399 auth/ldap: Manage 2 new config settings for NTLM SSO
Changes in the forms and forms handling to set and edit NTLM SSO
related config options.
2007-11-14 23:35:46 +00:00
martinlanghoff 6d3da6bf92 MDL-9399 auth/shibboleth: ensure we load enrolments
Most of this code should be replaced with complete_user_login() but it
does a few odd things, so we'll play it safe for now, specially since
I don't have a Shib setup to test...
2007-11-14 23:35:31 +00:00
martinlanghoff b3ebb9802e MDL-9399 loginas: call check_enrolment_plugins()
Admins will want to see an update of the user's enrolments when
they do a login-as.
2007-11-14 23:35:15 +00:00
martinlanghoff 12a113f24e MDL-9399 auth/mnet: when landing, user complete_user_login()
By using complete_user_login() we ensure that the session is fully
setup, and that enrolment plugins are called correctly.
2007-11-14 23:35:00 +00:00
martinlanghoff 8f5c5184aa MDL-9399 accesslib: Move check_enrolment_plugins() to complete_user_login()
... where it belongs ;-)

load_all_capabiloties() gets called at several points where we don't
want to be re-querying the enrolment backends. It needs to  be called
before load_all_capabilities() and only by callers that are setting up
a logon session.

Those callers need to be calling complete_user_login() anyway, as they
need to set the Moodle cookie, log the logon action, etc. In fact,
those callers duplicate a lot of that code already.

The callers that don't duplicate code for the login are actually the
cases where the backend enrolment plugins should not be queried.

To be followed by callers cleanup...
2007-11-14 23:34:46 +00:00
martinlanghoff 9d6a3d1513 MDL-9399 login/index, moodlelib: move session setup logic to complete_user_login()
Move most of the user session setup logic from login/index.php to
complete_user_login().
2007-11-14 23:34:29 +00:00
martinlanghoff 5f3315e78e file ntlmsso_finish.php was added on branch MOODLE_19_STABLE on 2007-11-14 23:36:41 +0000 2007-11-14 22:12:25 +00:00
martinlanghoff 5f084a4ecb file ntlmsso_attempt.php was added on branch MOODLE_19_STABLE on 2007-11-14 23:36:41 +0000 2007-11-14 22:12:25 +00:00
martinlanghoff 2115a30667 file ntlmsso_magic.php was added on branch MOODLE_19_STABLE on 2007-11-14 23:36:41 +0000 2007-11-14 22:08:55 +00:00
mudrd8mz dee938a59e MDL-11332 Preview did not work with help files in subdirectories. Thanks to Christian Deligant for the patch. 2007-11-14 21:20:41 +00:00
tjhunt 582e15dfd2 MDL-12066 - Links in the HTML block are not recoded on backup and restore.
This is messy because the links are hidden in the configdata column, which is serialized and base64encoded. So we have to untangle that, then ask the block whether there are any bits of $config that need to be fixed, then re-encode it before backup up. And reverse that on restore. It needs to remain base64 encoded in the backup file, so that the file format is backwards compatible.

I disucssed this with Eloy before doing it.
2007-11-14 17:03:16 +00:00
tjhunt d2219dda26 MDL-12172 - print_continue should create a method="get" button, not post. 2007-11-14 16:33:57 +00:00
urs_hunkler cf8781f41c added 2 CSS definitions to dimm the summary and the course no. in a hidden course topic. 2007-11-14 16:05:07 +00:00
tjhunt 2fca979ee3 Delete commented-out code that was actually not commented out properly, and so caused warnings. Merged from MOODLE_18_STABLE. 2007-11-14 14:48:46 +00:00
bobopinna 85ab48b33f MDL-12118 Fixed learner_response report. It was changed by SCORM2004 3rd Ed. specification 2007-11-14 12:59:16 +00:00
skodak 3929ee53cd MDL-12146 grade category defaults, forced settings and advanced options 2007-11-14 11:49:55 +00:00
bobopinna cf6e361c02 Fixed MDL-11914 2007-11-14 09:51:31 +00:00
toyomoyo 8909a7a075 removing duplicate entries in grade_grades prior to adding unique key 2007-11-14 05:06:50 +00:00
toyomoyo 0fb90ef70b MDL-12140, making most common non-weighted settings easy for teachers 2007-11-14 02:11:19 +00:00
martinlanghoff b21ca22e1f 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 01:24:40 +00:00
fmarier cfb5feb8b5 mod/quiz: Revert commit which added the "go back to course" link 2007-11-14 01:09:29 +00:00
mchurch bc304733e8 MDL-11991 Fixing error on undefined method while using the manual plug-in. 2007-11-13 18:04:58 +00:00
mchurch 90cef3dc05 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:59:13 +00:00
skodak b4deed5688 MDL-12154 used proper cast to float before !== comparison 2007-11-13 16:46:12 +00:00
skodak 11b9b76181 MFC: MDL-12154 used proper cast to float before !== comparison 2007-11-13 16:09:00 +00:00
arborrow e3f5d9654a 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:02:20 +00:00
mchurch 8ead149149 MDL-12114 Fixed typo in elements array. 2007-11-13 15:59:51 +00:00
skodak 08d82f5688 MFC:
MDL-10901 new SUM aggregation type
MDL-12154 used proper cast to float before !== comparison
2007-11-13 15:33:16 +00:00
nfreear 1a78d381ff MDL-12153, "Validome - moodle.org invalid - require Content-Script-Type". Merged. 2007-11-13 14:49:04 +00:00
urs_hunkler 2c00ee97df removed CSSEdit reference line. 2007-11-13 10:31:37 +00:00
skodak 1a35d7472f MFC: MDL-12101 cleanup/fixing/refactoring of user bulk operation and admin user browsing 2007-11-13 09:02:11 +00:00
skodak 4d85a640dd file simpleselect.html was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:27 +00:00
skodak c8693d4dc1 file user_bulk_forms.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:22 +00:00
skodak 3d5f5f6021 file lib.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:22 +00:00
skodak 8ab940c495 file user_filter_forms.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:20 +00:00
skodak 0fe0327175 file simpleselect.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:13 +0000 2007-11-13 08:43:20 +00:00
moodler cd73c31074 Fixed up some grammar and capitals MDL-12145 2007-11-13 08:41:47 +00:00
toyomoyo 995a53787b allowing horizontal and vertical highlighting 2007-11-13 06:21:48 +00:00
toyomoyo 6f04b5d626 MDL-12124, fixing styles for grader report 2007-11-13 03:18:18 +00:00
toyomoyo 522803d42a MDL-12138, set aggregate graded only as default 2007-11-13 03:06:56 +00:00
toyomoyo 815673e92f MDL-12141, category names should be mandatory 2007-11-13 02:52:30 +00:00
martinlanghoff 69a4aef1e1 admin: Introducing the mailout-debugger
A stand-in for sendmail that will log all emails instead of sending
them out. Use when debugging cron performance and output.

References:
  MDL-12142
  http://moodle.org/mod/forum/post.php?reply=349457
2007-11-13 00:33:42 +00:00
urs_hunkler d0796153bf The XHTML of the actual tab has been changed. Therefor the actual tab was not shown in front of the line any more. I changed the CSS to correct this introduced bug. 2007-11-12 20:20:48 +00:00
skodak 0fe09ea8fe MFC: MDL-12131 db debug messages now quoted properly 2007-11-12 17:22:22 +00:00
skodak 8490c5350e MFC: MDL-12130 and MDL-12129 - fixed advanced status of elements when header not closed; disableIf now works inside grouped elements too; code cleanup in focus() and _getElNamesRecursive() 2007-11-12 17:14:52 +00:00
nfreear 8ca956147b Fixes MDL-12125, Call to a member function FetchRow on a non-object in get_user_access_sitewide. Merged. 2007-11-12 16:56:38 +00:00
urs_hunkler 04139219e7 MDL-12093 :: changed function call from get_in_popup to is_in_popup. 2007-11-12 11:36:57 +00:00
urs_hunkler 24bcd2e3b1 MDL-12093 :: Tim propsed to change the name get_in_popup to is_in_popup for esear reading - done. 2007-11-12 11:05:18 +00:00
gbateson 393150a996 fix for MDL-9713 : use XMLDB functions to create tables when mod/hotpot/db/mysql.sql is not found. This allows upgrade direct from Moodle 1.5 (or earlier) to Moodle 1.8 (or later) 2007-11-12 08:53:54 +00:00
toyomoyo 903740173f MDL-9059, when teacher creates group event on calendar, they can not see it 2007-11-12 06:26:57 +00:00
martinlanghoff ce97dd9102 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:09:37 +00:00
toyomoyo 2efdf88b94 MDL-12104, gradebook is showing 2 scales together 2007-11-12 03:13:05 +00:00
urs_hunkler ff3cf1e507 MDL-10683 :: added as Eric proposed:
.mform .ftextarea #id_alltext {
    width: 100%;
}
2007-11-11 19:32:09 +00:00
urs_hunkler aaef7468ac moved the sideblock accessibility property to the sidblocks section. 2007-11-11 19:24:56 +00:00
urs_hunkler fb529d5c10 added the clearfix option to the custom_corners call for admin pages to keep the "Save Changes" button within the area. 2007-11-11 17:27:55 +00:00
urs_hunkler 6a1a00bc50 Some theme enhancements while working on MDL-12098 and MDL-11154.Some theme enhancements while working on MDL-12098 and MDL-11154. 2007-11-11 16:02:21 +00:00
urs_hunkler fb87e8ae3b Added the check, if all opend custom_corners are closed. This way it's possible to add the close call in the footer which closes eventually open ccs. 2007-11-11 15:02:54 +00:00
urs_hunkler 60a4797402 MDL-12045 :: the extra "clearer" div broke the custom_corners theme on IE7. I removed the "clearer" div and added the class "clerafix" to the surrounding coursebox.
In FF and Safari floating is a mess now. I removed float:left for "coursebox" to get the page working in all browsers. It is a single element and should not need floating.
2007-11-11 11:19:36 +00:00
urs_hunkler cdedf35b0f MDL-12045 :: the extra "clearer" div broke the custom_corners theme on IE7. I removed the "clearer" div and added the class "clerafix" to the surrounding coursebox. 2007-11-11 10:53:31 +00:00
urs_hunkler b3c26633e5 added missing "if ($heading)" to suppress empty page header. 2007-11-11 09:29:51 +00:00
mark-nielsen 1e73338065 Mergin fix for MDL-12088 from MOODLE_18_STABLE 2007-11-11 01:21:52 +00:00
skodak d184f8f9b7 MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:55:46 +00:00
skodak 537e8dedfa MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:50:34 +00:00
urs_hunkler 1463bdc4ee MDL-12093 :: function get_in_popup() added to weblib.php. It returns true if the page is opened in a popup window.
* TODO Use a central function to create the popup calls allover Moodle and
 * TODO In the moment only works with resources and probably questions.
2007-11-10 14:44:41 +00:00
skodak 6ba839a768 MFC: MDL-12092 removed newline chars, we do not know the admin's platform, one line should be ok IMHO. 2007-11-10 14:36:36 +00:00
stronk7 42ae2fccb2 New profilefield_ lang files are now supported with
safe fallback to the "old" ones (stored in admin.php)
2007-11-09 20:10:14 +00:00
stronk7 d770f41a00 Adding lang support within profile fields to make them selfcontained.
Merged from MOODLE_18_STABLE
2007-11-09 19:10:08 +00:00
nfreear e9a5857b7d Follow up fixes MDL-12029 "Glossary view needs heading markup..." Merged, 2 days late :(. 2007-11-09 14:35:03 +00:00
toyomoyo 57a676ee7a MDL-12044, adding missing string 2007-11-09 02:55:59 +00:00
toyomoyo a48ae8ec5d MDL-12065, do not force parents to enrol in student courses 2007-11-09 01:39:06 +00:00
fmarier fa9ad7b620 Add missing fields when upgrading/installing on Postgres
mod/exercise, mod/scorm and question/type/rqp
MDL-12023
2007-11-09 01:24:28 +00:00
fmarier c10cac4e4a mod/quiz: Add a link back to the course page after a quiz is completed 2007-11-09 01:14:45 +00:00
poltawski e4e1faa6ab MDL-12070 - PARAM_CLEANHTML strips magic quotes.. 2007-11-08 22:18:33 +00:00
poltawski b72d8a7b98 MDL-12070 - re-enable the use of HTML in choice options,
merged from MOODLE_18_STABLE
2007-11-08 18:29:53 +00:00
sam_marshall fbaf314c87 MDL-12072 Added heading tag for calendar 'blocks' 2007-11-08 16:59:14 +00:00
sam_marshall eb8a6e6c60 MDL-12069 Make calendar events key labels and link titles consistent (also tidy up one bit of duplicated code) 2007-11-08 15:15:59 +00:00
skodak 5bdacd72ef MFC: MDL-10365 grade history can be turned off + lifetime 2007-11-08 09:58:55 +00:00
toyomoyo 46bdf8d1a8 keeping version numbers in sync 2007-11-08 05:53:02 +00:00
toyomoyo 05bab49047 MDL-12061, <p> in html editor breaks xhtml strict 2007-11-08 05:37:22 +00:00
moodler f6b74139d7 Automatic installer.php lang files by installer_builder (20071108) 2007-11-08 05:25:20 +00:00
nicolasconnault 44445b034f MDL-11790 Fixed hard-coded strings. Merci Nicolas! 2007-11-08 05:16:48 +00:00
toyomoyo 85c9758459 1.9 Beta 2 should not be read as 1.9.2 in environment page 2007-11-08 05:12:32 +00:00
toyomoyo f75cf3a13d MDL-11909, putting a unique constrait userid-itemid on grade_grades table 2007-11-08 01:59:49 +00:00
urs_hunkler 41b08f2d96 merged from 1.8 :: In the first table column class="header" was missing. 2007-11-07 18:11:26 +00:00
sam_marshall 366c49848f MDL-12055 Tweaked forum subscribe 'continue' address 2007-11-07 17:31:58 +00:00
sam_marshall 5d735c5281 MDL-12055 Tweaked forum subscribe 'continue' address 2007-11-07 17:05:06 +00:00
ethem f91a5b733a 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:55:09 +00:00
tjhunt 6d3bcb44dd Eliminate duplicate $Id$ tag. 2007-11-07 15:26:29 +00:00
tjhunt 41c88b8cda Eliminate duplicate $Id$ tag. 2007-11-07 15:20:48 +00:00
tjhunt 228d5ecb07 Eliminate duplicate $Id$ tag. 2007-11-07 12:35:09 +00:00
toyomoyo 38161091d6 MDL-12025, enable row markings via javascript to keep track of current row 2007-11-07 07:45:30 +00:00
moodler 67945637f3 Merged a grammar fix from 1.8 2007-11-07 07:15:35 +00:00
toyomoyo 0646497a1e MDL-12048, assignment grades not migrated into 1.9 2007-11-07 04:27:53 +00:00
toyomoyo 69eedfa2fe backup/restore of grade histories should be off by default 2007-11-07 01:10:18 +00:00
nicolasconnault 6c5efa9157 MDL-8853 Applied Ann's Patch 2007-11-06 13:25:22 +00:00
toyomoyo 7d1b0eee29 fixing bogus $scoid 2007-11-06 05:40:58 +00:00
toyomoyo 0cd2561466 fixing a warning 2007-11-06 02:58:28 +00:00
toyomoyo 4e3dad540c MDL-10509, LDAP username to be always in lowercase 2007-11-06 01:00:27 +00:00
sam_marshall 7135ffca51 MDL-12030 Incorrect double quotes in sql 2007-11-05 17:57:10 +00:00
nfreear 6a021d6fc4 Fixes MDL-12029 "Glossary view needs heading markup + other accessibility fixes". Merged. 2007-11-05 15:24:58 +00:00
nicolasconnault 211e9c6d3f 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:29 +00:00
skodak 071aeb9926 MFC: MDL-11399 make sure user context exists 2007-11-05 09:51:52 +00:00
skodak d5defbf5a8 MFC: MDL-11079 detect/prevent email duplicates when uploading users 2007-11-05 09:39:30 +00:00
skodak a17ca7ba09 MFC: MDL-11996 bulk user upload - custom profile fields docs 2007-11-05 09:13:15 +00:00
toyomoyo 31248c5d9c MDL-9552, update the gradebook everytime score is sent 2007-11-05 07:29:59 +00:00
skodak dd861fbc33 new csv import library included ;-) 2007-11-05 00:56:02 +00:00
skodak 3aa5023ef9 new csv import library included ;-) 2007-11-05 00:49:29 +00:00
skodak c92718aa13 file csvlib.class.php was added on branch MOODLE_19_STABLE on 2007-11-05 00:49:29 +0000 2007-11-05 00:43:37 +00:00
moodler f991a28d5c New installer file added to CVS repo. 2007-11-04 17:08:11 +00:00
moodler 76980fca70 file installer.php was added on branch MOODLE_19_STABLE on 2007-11-04 17:08:11 +0000 2007-11-04 17:05:25 +00:00
skodak 481425fadb MFC: MDL-12020 can not bulk delete users with the same email - new username collision 2007-11-04 13:52:30 +00:00
moodler 8453485495 Automatic installer.php lang files by installer_builder (20071103) 2007-11-03 05:09:41 +00:00
tjhunt 5cf2c57a22 Minor whitespace fixups. 2007-11-02 16:19:54 +00:00
stronk7 f2723764f7 There was a mistake in the dir being created. It must be
the backup temp area one. MDL-11912

Merged from MOODLE_18_STABLE
2007-11-02 13:02:37 +00:00
urs_hunkler 2b22a5f423 removed a typo: tabletable > table 2007-11-02 10:40:12 +00:00
stronk7 745a099abf 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

Merged from MOODLE_18_STABLE
2007-11-02 09:52:42 +00:00
skodak b687218970 MFC: MDL-11996 bulk user upload - improvements, fixes and cleanup - part2 2007-11-02 08:42:36 +00:00
donal72 92a1d319fc Propagate additional error info about XML parse failures 2007-11-02 00:14:43 +00:00
donal72 98547f476f More error info about XML parse failures 2007-11-02 00:12:48 +00:00
stronk7 dddcaf6358 Now PHP code generated by the XMLDB editor automatically
adds calls to upgrade_main_savepoint(). MDL-11698
2007-11-01 23:21:41 +00:00
donal72 98a6fc4a3b Initialize the $message variable properly this time. 2007-11-01 21:30:09 +00:00
donal72 7499f511c8 Revert: Initialize the $message variable 2007-11-01 21:26:55 +00:00
stronk7 359ee558f0 Unsetting one white border.
Merged from MOODLE_18_STABLE
2007-11-01 20:07:55 +00:00
skodak 7b5f66308c MFC: MDL-11996 fixed previous speedup commit for user operations in admin tree 2007-11-01 19:44:32 +00:00
skodak 81c9dd751a MFC: MDL-11996 bulk user upload - improvements, fixes and cleanup - part1 2007-11-01 19:39:38 +00:00
skodak 0a48ba0c0b MFC: MDL-11995 prevent deleting of grade items attached to external activities 2007-11-01 15:09:42 +00:00
thepurpleblob 915e268e62 MDL-11977:
Add an an optional forgotten password handling url
2007-11-01 14:36:25 +00:00
nicolasconnault 5fc40f4208 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:40 +00:00
nicolasconnault aa37778ca3 file eolas_fix.js was added on branch MOODLE_19_STABLE on 2007-11-01 13:58:40 +0000 2007-11-01 13:52:15 +00:00
nfreear 482b3d1677 Fixes bug MDL-11994, Accessibility: "Users tagged with ..." should be marked up as a list. Merged. 2007-11-01 12:34:39 +00:00
skodak f018ef4a52 MFC:
MDL-11966 fixed typo in grader report causing fatal errors
MDL-11993 refactored code for item headers and icons
2007-11-01 11:45:03 +00:00
skodak e8fc2358ca file calc_off.gif was added on branch MOODLE_19_STABLE on 2007-11-01 11:45:03 +0000 2007-11-01 11:42:33 +00:00
nicolasconnault 7e33b18807 MDL-11865 upgraded pagelib to using build_navigation() 2007-11-01 08:59:44 +00:00
skodak 219927349a MFC: MDL-11966 implemented dategraded and datesubmitted, tweaked altering of grades depending in hidden grades
MDL-11974 improved gradebook CSS
2007-11-01 08:50:30 +00:00
nicolasconnault f6d8678098 MDL-11912 Creating 1000's layer directory first, then userid directory: no need for recursion 2007-11-01 08:45:57 +00:00
donal72 71494eb0b1 Test for empty dataset to suppress a warning 2007-11-01 06:13:02 +00:00
donal72 3e6e9eaa52 Initialize the $message variable 2007-11-01 05:02:46 +00:00
pichetp 442e308648 MDL-11867 setting real null when response is null in calculated question merged from
head
2007-11-01 00:32:11 +00:00
wildgirl 48f66dd36e MDL-11725 en lang string edit 2007-10-31 21:54:30 +00:00
wildgirl c0d1c8f9cb MDL-11796 help file edit 2007-10-31 21:22:44 +00:00
wildgirl f46a06d08c MDL-11941 help file URL correction 2007-10-31 21:05:23 +00:00
nicolasconnault 6d7ab89b65 MDL-11912 Removed recursive param 2007-10-31 19:04:30 +00:00
tjhunt 2e978de3d1 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. Merged from MOODLE_18_STABLE. 2007-10-31 17:08:51 +00:00
tjhunt a999da51c5 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. Merged from MOODLE_18_STABLE. 2007-10-31 16:42:06 +00:00
nicolasconnault 150692da89 MDL-11912 Removed recursive param 2007-10-31 15:20:58 +00:00
skodak d01930668d MFC: MDL-11966 removed plugin selector when only one plugin available 2007-10-31 09:14:32 +00:00
skodak 809baca60a MFC: fixed numuser regression in overview 2007-10-31 09:00:06 +00:00
moodler 594676271f Automatic installer.php lang files by installer_builder (20071031) 2007-10-31 04:37:58 +00:00
pichetp a8f56ba982 solving MDL-7496 for calculated merged from head 2007-10-31 02:48:30 +00:00
skodak aa4847c757 MFC: MDL-11973 Improved showing of hidden items in ouuser and user report 2007-10-30 21:41:41 +00:00
skodak 29cf643cad MFC: MDL-11951 a little typo - no recursive call intended in has_any_capability() I guess 2007-10-30 20:52:54 +00:00
mattc-catalyst c546706479 Author: Matt Clarkson <mattc@catalyst.net.nz> 2007-10-30 20:45:04 +00:00
tjhunt 3d94c5e08e MDL-6376 - fix minor errors in the previous commit.
More significantly, this patch changes the '1 Students have made 1 attempts' string.

To start with, this code was being produced in five different places, so I made a function to do the work!. Next, as you can see, it is not gramatical. Also, some people find it confusing, as in MDL-6376.

Therefore, it now just says 'Attempts: 1'.
2007-10-30 19:28:05 +00:00
sam_marshall 3724757d96 MDL-11916 Added managegroupevents capability 2007-10-30 16:18:08 +00:00
skodak 11551df2c3 MFC: MDL-11957 improving and cleanup in grade overriding 2007-10-30 11:54:25 +00:00
tjhunt d09ab40142 MDL-11951 - supplemental - need capability checks in the outer if of the file too. 2007-10-30 10:49:25 +00:00
tjhunt 435d7bdba9 Unit tests for MDL-9295 - clean_param with PARAM_URL/PARAM_LOCALURL. Merged from MOODLE_18_STABLE. 2007-10-30 10:46:23 +00:00
tjhunt 7e340b3e8d MDL-9295 - PARAM_URL/PARAM_LOCALURL does not accept http://localhost/ or other hosts on lans. Merged from MOODLE_18_STABLE. 2007-10-30 10:15:27 +00:00
tjhunt 384a9cbda9 Correct misleading comment. Follow-on from the fix to MDL-11462. 2007-10-30 10:10:20 +00:00
toyomoyo 8b405ab59b making multibyte filename appear correctly under IE download 2007-10-30 00:33:45 +00:00
skodak 6543cbde7a MFC: MDL-11955 required scale selection when grade type is scale 2007-10-29 20:36:15 +00:00
skodak 6e0fd47067 MFC: MDL-11954 grader report links to profiles from the same course 2007-10-29 20:25:51 +00:00
skodak 90f36eaf96 MFC: MDL-11904 deny/accept Email settings conflict with text - now .example.com means all subdomains 2007-10-29 20:15:35 +00:00
tjhunt 13beed44aa MDL-11952 - In the course admin block, if the user has moodle/question:managecategory, but no other capabilites, the questions link should go to the manage categories page 2007-10-29 16:58:10 +00:00
tjhunt 1db25b8950 MDL-11951 - Need a link to the Front Page course question bank in the admin tree. 2007-10-29 16:53:41 +00:00
tjhunt 4288cc0e90 MDL-11784 - On the role assign page, list who is assigned the role for roles with only a few assignments. Improved version. Now, it only shows the extra column if some roles have between 1 and 10 assignees, as per Martin D's request. 2007-10-29 15:38:31 +00:00
poltawski fdd91b7098 MDL-11124 - Allowed 'There are no [modulename]' translations. This is currently
hardcoded and can be discovered through the user interface resonably easily.
2007-10-29 10:42:16 +00:00
poltawski 7da47c8128 MDL-11068 - fixed typo 2007-10-29 09:56:21 +00:00
poltawski 2e8b9f7325 MDL-11813 - Use existing group setting strings on course edit form so can be
better translated. Patch from Daniel Miksik
2007-10-29 09:45:38 +00:00
skodak 9a873b571d MFC: MDL-11874 grader report now indicates hidden items (gray title + range) and hidden grades (except when editing) 2007-10-29 08:39:25 +00:00
toyomoyo eab9dead49 MDL-11930, remove lang file for csv export 2007-10-29 02:02:30 +00:00
danmarsden 3a267ca3a0 missed one line.
Fix for MDL-10085  and MDL-8118 Problem with number of Responses in choice wrong, and displayed users incorrect on results. merged from HEAD
2007-10-29 00:22:44 +00:00
poltawski b1e96ca8b2 MDL-11767 SQL error with postgres 2007-10-29 00:20:30 +00:00
danmarsden 360342a41f Fix for MDL-10085 and MDL-8118 Problem with number of Responses in choice wrong, and displayed users incorrect on results. merged from HEAD 2007-10-28 23:28:14 +00:00
poltawski ce249c4de5 MDL-11937 - save 100 database queries in the case of the admin bookmarks block
without bookmarks on non-admin page
2007-10-28 23:03:33 +00:00
skodak a32126839c MFC: MDL-11563 replaced hardcoded permission check from admin_tree_block 2007-10-28 22:36:29 +00:00
skodak 020eae6335 MFC: MDL-11934 grade report in user profile now selectable 2007-10-28 18:11:17 +00:00
skodak d5d95c5e02 MFC: MDL-11927 fixed cookiepaths; patch by Kevin 2007-10-28 14:21:41 +00:00
skodak 038ee13b04 MFC: MDL-11718 report styles moved to report/xx/styles.php - for better consistency with other plugins; other cleanup in user report css; fixed css in user profile 2007-10-28 12:57:17 +00:00
skodak d6beb4690a file styles.php was added on branch MOODLE_19_STABLE on 2007-10-28 12:57:17 +0000 2007-10-28 12:51:16 +00:00
urs_hunkler 893194c625 MDL-11926 :: two comments confused Chameleon. I have deleted the comments and optimized CSS for Chameleon use. 2007-10-28 12:38:44 +00:00
urs_hunkler 55c7250333 MDL-11928 :: calendar width in IE6 && MDL-11730 :: header-home background color fixed 2007-10-28 08:53:46 +00:00
moodler b4f675e1d5 Automatic installer.php lang files by installer_builder (20071028) 2007-10-28 05:14:47 +00:00
skodak 96e3537213 MFC: added groups param to get_numusers() - to be used in oureport; might be handy elsewhere too 2007-10-27 22:06:46 +00:00
skodak 7823acb0c9 MFC: support for styles.php in grade reports 2007-10-27 22:02:47 +00:00
skodak 5e691be585 MFC: MDL-11718 fixed typos in prev commit 2007-10-27 20:38:05 +00:00
skodak b7049c9222 MFC: MDL-11718 minor cleanup 2007-10-27 20:36:34 +00:00
skodak 8941942a02 MFC: MDL-11718 minor fix for grades in user profile 2007-10-27 18:23:38 +00:00
skodak e685d5838d MFC: MDL-11718 partial cleanup in overview report - unfortunately the problems with hidden grades can not be solved here without db changes 2007-10-27 18:00:21 +00:00
skodak 70efa359e2 file settings.php was added on branch MOODLE_19_STABLE on 2007-10-27 18:00:22 +0000 2007-10-27 17:58:36 +00:00
skodak edc0fe896d MFC: MDL-11718 course settings for reports - for now only user report (rank and showing of hidden items) 2007-10-27 15:35:16 +00:00
skodak fbaa57cbf8 MFC: MDL-11718 grader report now does not show column totals if user does not have view hidden grades capability because we can not calculate the totals depending on altered aggregates 2007-10-27 13:15:06 +00:00
skodak 2ee13c5c8b MFC: fixed error when no scale present 2007-10-27 11:42:34 +00:00
nicolasconnault a7212cb9c7 grade_outcome->description doesn't exist 2007-10-27 06:28:39 +00:00
tjhunt e63938ba8a MDL-11917 - Improve the title on the assign/override roles page. 2007-10-26 16:59:49 +00:00
toyomoyo 6597b34eeb MDL-11532, updatesql needs to get run after each 'round' otherwise there's nothing to pull from the context table 2007-10-26 07:56:36 +00:00
toyomoyo c6ed8589e0 MDL-11836, show number of blocks but do not link if no reference to any course 2007-10-26 03:24:29 +00:00
toyomoyo bebdb9b162 MDL-11902, gradebook formula dereferencing problem 2007-10-26 02:06:21 +00:00
tjhunt 677ab5e475 Fix typo. 2007-10-25 14:29:39 +00:00
tjhunt 4a4b110509 MDL-11825 - Force penaltyfactor to 1 for truefalse questions on GIFT import, as is done on the editing form. Merged from MOODLE_18_STABLE. 2007-10-25 09:43:09 +00:00
toyomoyo 5e919c34ee MDL-11893, send email to admin when add_to_log fails 2007-10-25 04:01:38 +00:00
danmarsden 00f65b4e5d MDL-11397 bug with IE 6 not displaying anonymous results correctly.
- also fix for XHTML Strict.

merged from HEAD
2007-10-24 21:29:12 +00:00
toyomoyo 4ad8ec74e7 MDL-11513, adding support for grade letters 2007-10-24 07:38:23 +00:00
whchuang 8e48cb7180 Fixed MDL-10506 Hide/Show Advanced text does not toggle in IE and Safari when edit profile 2007-10-23 22:18:17 +00:00
tjhunt 6a3ba4e585 MDL-11784 - On the role assign page, list who is assigned the role for roles with only a few assignments. 2007-10-23 16:27:06 +00:00
tjhunt b16832dd09 MDL-11881 - User with question permission but not mod/quiz:manage can get a nasty require_capability error. 2007-10-23 16:15:31 +00:00
tjhunt e88133dc12 MDL-11870 - Notices on the quiz view page if the corresponding grade item was deleted. 2007-10-23 07:47:43 +00:00
moodler 841d2ca4c9 Automatic installer.php lang files by installer_builder (20071023) 2007-10-23 05:14:07 +00:00
danmarsden 319e0b83a5 Fix for MDL-9666 totals don't appear when full names are shown. merged from head. 2007-10-22 21:50:47 +00:00
danmarsden 210f57ff8a fix for MDL-11063 - thanks to Wen for the patch. merged from head. 2007-10-22 21:26:16 +00:00
arborrow 7ee7b84e9d MDL-11869 - javascript syntax error was preventing the call to the calc function. Adding in the double slashes around CDATA resolves the problem. (merging into 19STABLE) 2007-10-22 20:37:53 +00:00
tjhunt 7cc3f26d18 MDL-11708 - Zero answers are not allowed in Matching questions - sometimes I hate PHP. Merged from MOODLE_18_STABLE. 2007-10-22 16:57:09 +00:00
tjhunt 8ac54989eb MDL-11824 - Literal asterisk (\*) in shortanswer question not handled correctly by get_correct_responses + Unit tests. Merged from MOODLE_18_STABLE. 2007-10-22 15:37:25 +00:00
urs_hunkler 867354f9ae CSS color "lightgrey" does not exist. I replaced it with the "corresponding" Linux color value #D3D3D3. 2007-10-22 10:35:08 +00:00
nfreear b27db1be63 Fix for reopened bug MDL-7878, "Link identification and skipping" - includes site and course index.php. Merged. 2007-10-22 09:25:52 +00:00
nfreear b39a4fec6a Partial fix for reopened bug MDL-7878, "Link identification and skipping" - affects all course formats + other files. Merged. 2007-10-22 06:51:09 +00:00
toyomoyo a358f9b4e2 fixing some warnings 2007-10-22 03:02:00 +00:00
gbateson cde191082a improve XHTML compatability of HotPot reports; fix termination of <input> tags in JCloze and JQuiz 2007-10-22 01:43:19 +00:00
stronk7 fcad0318e9 Changing some standard colors. Merged from HEAD. 2007-10-21 19:27:30 +00:00
skodak 2f40c9ea94 MFC: MDL-11718 fixed altered aggregation of overridden and locked grades + some speedup and corrections 2007-10-21 13:23:07 +00:00
skodak d5f05bd60e MFC: MDL-11859 student rank and showing of hidden grade items are now configurable + fixed some incorrect include_once 2007-10-21 12:57:35 +00:00
skodak 94707762b5 file settings.php was added on branch MOODLE_19_STABLE on 2007-10-21 12:57:35 +0000 2007-10-21 12:56:20 +00:00
moodler bcdb15f066 Automatic installer.php lang files by installer_builder (20071021) 2007-10-21 04:23:45 +00:00
gbateson 0846150380 improvements to XHTML compatability:
(1) change & to &amp; in URLs;
(2) correctly terminate <input ... /> and <img ... /> tags;
(3) add closing tag for "page" and "content" divs when not using print_footer()
(4) change "<" and ">" to html entities in open text
2007-10-21 02:52:49 +00:00
skodak f39432cafe MFC: MDL-8605 fixed user image restore code 2007-10-20 20:59:20 +00:00
skodak 8809b99a1f MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:34:26 +00:00
skodak aaf277889b MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:26:53 +00:00
skodak f7266dd323 MFC: MDL-11835 proper labels for aggregation coef - weight and extra credit 2007-10-20 19:13:55 +00:00
skodak ee41a6a7c8 MFC: MDL-11718 fixed incorrect bounds when altering aggregates for hidden grades 2007-10-20 15:50:44 +00:00
skodak 8b378edc14 MFC: MDL-11278 improved forced category settings - refactoring + regrading forced + new setting to hide forced settings in UI 2007-10-20 15:11:48 +00:00
mudrd8mz e3dccebf8d Backporting tabindex support from HEAD. Sorry for adding a new feature into the stable but this is quite useful for translators. 2007-10-20 02:06:12 +00:00
stronk7 e21b7f0a57 Booleans are not always transformed to 0 /1. This was preventing install
under mysqli. Define block->multiple if needed.

Merged from MOODLE_18_STABLE
2007-10-19 17:52:03 +00:00
stronk7 74812cb716 Adding support to course/formats from within the editor. MDL-11842
Merged from MOODLE_18_STABLE
2007-10-19 16:52:06 +00:00
poltawski 7931e74e44 MDL-11766 Flickr/Youtube blocks don't respect http proxy vars 2007-10-19 15:07:02 +00:00
poltawski 612f6992c5 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.
2007-10-19 14:45:54 +00:00
poltawski 30a16e7e83 MDL-11766 download_file_content is quite broken with proxies - lacking global
CFG definition, so must never have worked, also incorrectly specified proxyhost..
2007-10-19 11:44:04 +00:00
skodak 8b6f55ee7a 2007-10-19 08:53:54 +00:00
skodak 2b0e9d6ef9 file agg_sum.gif was added on branch MOODLE_19_STABLE on 2007-10-19 08:53:55 +0000 2007-10-19 08:51:53 +00:00
skodak 8336513809 file agg_mean.gif was added on branch MOODLE_19_STABLE on 2007-10-19 08:53:56 +0000 2007-10-19 08:51:53 +00:00
toyomoyo 0b0ff32d3c MDL-11167, admin blocks page should not show blocks not placed on course pages 2007-10-19 07:53:09 +00:00
donal72 45bddb6e6d Enable access to Mahara from testclient.php 2007-10-19 00:44:40 +00:00
stronk7 5a27d062ee Commenting some more debug... 2007-10-18 16:02:47 +00:00
stronk7 551f994986 Commenting out some excess of debug info. 2007-10-18 15:52:16 +00:00
skodak 1e5d9d5d5f MFC: userid must be set in new grade too 2007-10-18 10:09:19 +00:00
toyomoyo 1914e3a8f3 grade_grade does not have itemid initialized in grader report 2007-10-18 07:07:59 +00:00
toyomoyo 650044d9a2 sorry fixing conflict marker 2007-10-18 05:51:39 +00:00
toyomoyo fb38e114e7 MDL-11241, adding logs for roles management 2007-10-18 05:50:41 +00:00
moodler 6d19ce3361 Automatic installer.php lang files by installer_builder (20071018) 2007-10-18 05:43:10 +00:00
mattc-catalyst 2bf84bba09 groups/autogroup: Allocate members to groups more fairly
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-10-18 03:00:23 +00:00
skodak 6bfe184be4 MFC: MDL-11718 aggregated grades which depend on hidden grades are now hidden too + cleanup in grader report 2007-10-17 20:40:19 +00:00
tjhunt b85eb9fa4a MDL-11061 - admin notifications about $CFG->wwwroot, which sometimes lead to obscure errors. 2007-10-17 20:20:17 +00:00
tjhunt c5c60abd3e Fix notice. 2007-10-17 14:35:34 +00:00
urs_hunkler 0c3f1da5b6 removed CSSEdit reference line. 2007-10-17 13:52:10 +00:00
urs_hunkler a27b6c2c52 RTL rendering optimized for IE6, IE7, Oper with CSS and Safari 2 with JavaScript. 2007-10-17 13:37:58 +00:00
skodak cdb4e23f90 MFC: MDL-11718 aggregated grades which depend on hidden grades are now hidden too; cleanup in user report 2007-10-17 10:02:51 +00:00
skodak e19f971389 MDL-11658 shared rdef definition - reduced memory usage in cron; MFC 2007-10-17 09:21:48 +00:00
donal72 47405f9b6f Laying groundwork for more Mnet error reporting 2007-10-17 08:14:32 +00:00
donal72 e04584907b 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:50 +00:00
donal72 3dff7f538b 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:50 +00:00
toyomoyo bef2f86f04 closing this $rs 2007-10-17 07:28:44 +00:00
toyomoyo cf5a890bd6 MDL-11801, chat message not shown 2007-10-17 07:18:14 +00:00
toyomoyo 244d9553ca MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:36:23 +00:00
toyomoyo f8c11d0afc MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:30:32 +00:00
toyomoyo bdd77c8326 MDL-11553, reducing the number of bulk user selection buttons and lang changes 2007-10-17 04:29:16 +00:00
toyomoyo c470dada5b MDL-11770, broken userid in add_to_log 2007-10-17 03:01:38 +00:00
toyomoyo 472bce6d12 MDL-11170, blog tagging code broken 2007-10-17 02:54:43 +00:00
tjhunt aeb50096a1 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. 2007-10-16 21:26:03 +00:00
tjhunt 8af53beeec Fix possible notice. 2007-10-16 20:52:12 +00:00
tjhunt ede4316c01 MDL-11794 - Blocks editing on button is not XHTML Strict when produced by page_generic_activity. 2007-10-16 20:43:28 +00:00
tjhunt 49fa880ef6 MDL-11791 - Custom corners broken on the quiz view page because I missed a global declaration, and PHP empty was hiding the problem. 2007-10-16 20:29:37 +00:00
stronk7 7063eb9fbb Move the update of digestmailtimelast to the end of the
loop to allow digests to be sent over multiple cron
executions if something crash in the middle. MDL-11657
2007-10-16 16:08:34 +00:00
urs_hunkler abbad4af13 Added mod-data-view to the custom corners include list for properly displayed custom corners. They where missing arounfd the contetn area.
Replaced strstr with the faster strpos.
2007-10-16 14:54:46 +00:00
tjhunt 40c6886f95 Fix restore notice when a role has no capabilities. 2007-10-16 14:03:08 +00:00
donal72 49ce7ff03c Log error code and text in mnet_server_fault_xml function. MDL-10196 2007-10-16 14:03:00 +00:00
donal72 a4fbad6e80 Label for wwwroot field 2007-10-16 10:20:12 +00:00
donal72 646a6d9481 MDL-11329: fixed text: "Local courses for external users:" 2007-10-16 09:14:47 +00:00
donal72 936450330a More helpful MNet error messages in debug mode 2007-10-16 09:02:01 +00:00
urs_hunkler ac331d6a4a Updates for IE problems, mainly for RTL language display. IE6 still refuses to work properly :-( 2007-10-16 08:56:06 +00:00
donal72 29858f020e 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:53:16 +00:00
skodak 625faf10a3 MDL-11759 missing RISK_XSS in manage groups capability; merged from MOODLE_18_STABLE 2007-10-16 08:43:54 +00:00
gustav_delius f9144364f4 Fixed yet another error in the same bit of SQL in get_users_by_capability() that made many things not work properly on the course front page. 2007-10-16 08:27:39 +00:00
gustav_delius e19c5c1018 Fixing typo that led to fatal SQL error 2007-10-16 08:20:31 +00:00
donal72 516c425215 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:20 +00:00
toyomoyo 28215f3286 MDL-11679, overview report should only return mycourses 2007-10-16 05:34:10 +00:00
nicolasconnault d815125160 MDL-8605 Upgrade of user folder will not occur if the user folder already exists 2007-10-16 04:54:13 +00:00
toyomoyo 56ce5f0965 fixing a warning 2007-10-16 04:33:23 +00:00
toyomoyo 0e319f934d MDL-9059, admins can't see group events in course 2007-10-16 03:46:43 +00:00
stronk7 35c114a9dc Reverting last commit. This is an EXTERNAL library file and shouldn't
be modified. And it was broken (strange linefeeds). MDL-11779
2007-10-15 22:02:03 +00:00
nfreear 8d62aacbda Follow up for MDL-11430, Flickr & Youtube tag blocks should use list markup - Fix styles. Merged. 2007-10-15 17:01:49 +00:00
nfreear 4a7cd55555 MDL-11775 "Undefined constant 'data_submitted' ..." - it's a function! 2007-10-15 15:02:10 +00:00
nfreear 8608db739d Follow up fix for MDL-11535 "Blog block sql error" - ...MAX(ordering) max_order - adding "AS" 2007-10-15 14:46:34 +00:00
nfreear 4c8aa550dd Follow up fix for MDL-11535 "Blog block sql error" - GROUP BY, added ", tg.name" etc. 2007-10-15 14:20:22 +00:00
thepurpleblob 290084cfdc MDL-11769:
question name is properly truncated to less than 255 characters tom
stop PostGRES choking.
2007-10-15 13:50:16 +00:00
nfreear cc2c883f80 Fixes MDL-11430, Flickr & Youtube tag blocks should use list markup. Merged. 2007-10-15 12:34:13 +00:00
nfreear 7914d49318 Preparation for MDL-11430 - whitespace. 2007-10-15 12:32:42 +00:00
nfreear 4776de0668 Follow up fix for MDL-11436 'Encapsulate "accesshide" HTML class in function', and use. Merged. 2007-10-15 10:06:47 +00:00
tjhunt 478c9e9380 MDL-11762 - Navigation not set up properly for resources - $this->navlinks was not being initialised in the base class. 2007-10-15 07:31:52 +00:00
urs_hunkler 1258810abc removed the javascript to correct the header display :: IE7 hangs. Need to find a different solution. 2007-10-15 07:13:30 +00:00
nicolasconnault ca005e23f7 MDL-10905 iterating properly through readdir() 2007-10-15 05:42:20 +00:00
nicolasconnault ec74fb3501 MDL-8605 putting versions in sync between 1.9 and head 2007-10-15 05:18:09 +00:00
toyomoyo bee3222be8 MDL-10353, adding couse variable to nav bar in calendar preferences 2007-10-15 04:46:05 +00:00
moodler 8241c5e324 Automatic installer.php lang files by installer_builder (20071015) 2007-10-15 04:35:05 +00:00
toyomoyo 47641637e5 MDL-11717, adding dimmed_text a, to dim links as well 2007-10-15 02:02:19 +00:00
gbateson 8ee76d1ffe 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:59:03 +00:00
stronk7 86bea5c65e Improving cron to make digests to use much less memory. MDL-11657 2007-10-14 16:13:16 +00:00
urs_hunkler 7a158dac13 corrected IE calendar display, removed CSS bugs. 2007-10-14 16:06:59 +00:00
stronk7 b782e682f0 Backported from HEAD
Drop one index that shouldn't be there. MDL-11751
2007-10-14 09:57:52 +00:00
tjhunt 94f07cd524 Correct misleading error message in upgrade_activity_modules. Spotted while diagnosing MDL-11732. 2007-10-13 22:00:30 +00:00
mark-nielsen eee9477bfd Mergin fix for MDL-11684 from MOODLE_18_STABLE 2007-10-13 03:07:27 +00:00
mark-nielsen c2325b6ffd Mergin fix for MDL-11696 from MOODLE_18_STABLE 2007-10-13 02:34:14 +00:00
mark-nielsen c09019a4b5 Merging fix for MDL-11636 from MOODLE_18_STABLE 2007-10-13 01:56:37 +00:00
urs_hunkler b1abcbd50a MDL-11664 :: IE6 can't display transparent PNGs. Added not transparent gifs instead and changed the background for IE6 to a solid colour. 2007-10-12 21:46:36 +00:00
urs_hunkler ced48de808 MDL-11664 :: added IE6/UE7 special CSS and because that didn't help at all places added JavaScript to correct some wrong calculated width. 2007-10-12 21:42:04 +00:00
nicolasconnault 01d786178d MDL-8605 Backup and restore implementation 2007-10-12 20:24:00 +00:00
nicolasconnault 46387ff2ae file testbackuplib.php was added on branch MOODLE_19_STABLE on 2007-10-12 20:24:09 +0000 2007-10-12 19:13:19 +00:00
tjhunt b34fc1be24 MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.
This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.

Backported from head. Will update merged tags in a few hours. I am late for orchestra. Sorry.
2007-10-12 16:09:37 +00:00
tjhunt c971067f91 MDL-11699 - Making one more common case a bit nicer for callers. 2007-10-12 15:11:39 +00:00
nfreear 64b0ce50b7 Follow up fix for MDL-11535 "Blog block sql error" - GROUP BY, added ", tg.flag". Merged. 2007-10-12 11:01:18 +00:00
tjhunt 36f4fa0c2d MDL-11699 - Further, backwards-compatible, improvement to the build navigation API to simplify a common case. Also, further improvements to the doc comment, so it is easy to use. 2007-10-12 10:35:55 +00:00
stronk7 a1d04b878b Adding $Id tag 2007-10-12 09:44:16 +00:00
nfreear 3ab263074c Fixes MDL-11695, Skip block links inaccessible for many keyboard-only users. Merged. 2007-10-12 08:49:58 +00:00
urs_hunkler b024b748c7 MDL-11729 :: Removed commenting out loading of the Chameleon files loading. 2007-10-12 07:52:12 +00:00
moodler 22ee674191 Info about version numbers 2007-10-12 07:47:07 +00:00
toyomoyo 0f132d1bee missing context 2007-10-12 07:40:03 +00:00
toyomoyo c58f9a458e MDL-11717, dimmed_text class for hidden grade items in grader report 2007-10-12 07:17:39 +00:00
Martin Langhoff d54a1b6712 cvsimport fixups 2007-10-12 03:14:42 +00:00
toyomoyo 3ffbc9a3e0 MDL-11715, export form should follow sortorder 2007-10-12 03:14:42 +00:00
toyomoyo 0741bdca11 MDL-11714, removing debuging statement 2007-10-12 01:33:32 +00:00
tjhunt ba79369331 MDL-11699 - Addendum - fix typo in fixup code. Sorry. 2007-10-11 16:43:16 +00:00
tjhunt 0a4025eaa5 Small tidy-up in print_header_simple. 2007-10-11 15:25:14 +00:00
nicolasconnault 1ce63d3fc2 MDL-8605 Preventing new user folder from being created when original folder is empty 2007-10-11 14:18:04 +00:00
tjhunt b9ecfd4957 MDL-9542 - Show final grades from new gradebook in Quiz UI - with help from Petr. 2007-10-11 11:42:03 +00:00
nicolasconnault 16ef809654 Small unit test-related fix 2007-10-11 11:14:03 +00:00
2070 changed files with 248910 additions and 125084 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
README $Id$
README $Id$
------
QUICK INSTALL
+11 -223
View File
@@ -11,7 +11,10 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('userauthentication');
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageauths";
$action = optional_param('action', '', PARAM_ACTION);
$auth = optional_param('auth', '', PARAM_SAFEDIR);
@@ -19,13 +22,6 @@ $auth = optional_param('auth', '', PARAM_SAFEDIR);
// get currently installed and enabled auth plugins
$authsavailable = get_list_of_plugins('auth');
//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();
@@ -33,44 +29,18 @@ if (empty($CFG->auth)) {
$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);
print_error('pluginnotinstalled', 'auth', $url, $auth);
}
////////////////////////////////////////////////////////////////////////////////
// process actions
$status = '';
if (!confirm_sesskey()) {
redirect($returnurl);
}
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($auth, $authsenabled);
@@ -97,7 +67,7 @@ switch ($action) {
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
print_error('pluginnotenabled', 'auth', $url, $auth);
}
// move down the list
if ($key < (count($authsenabled) - 1)) {
@@ -112,7 +82,7 @@ switch ($action) {
$key = array_search($auth, $authsenabled);
// check auth is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
print_error('pluginnotenabled', 'auth', $url, $auth);
}
// move up the list
if ($key >= 1) {
@@ -127,188 +97,6 @@ switch ($action) {
break;
}
// display strings
$txt = get_strings(array('authenticationplugins', 'users', 'administration',
'settings', 'edit', 'name', 'enable', 'disable',
'up', 'down', 'none'));
$txt->updown = "$txt->up/$txt->down";
// construct the display array, with enabled auth plugins at the top, in order
$displayauths = array();
$registrationauths = array();
$registrationauths[''] = $txt->disable;
foreach ($authsenabled as $auth) {
$authplugin = get_auth_plugin($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)) {
continue; //already in the list
}
$authplugin = get_auth_plugin($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->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', '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\">";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/hide.gif\" class=\"icon\" alt=\"disable\" /></a>";
// $hideshow = "<a href=\"$url&amp;action=disable&amp;auth=$auth\"><input type=\"checkbox\" checked /></a>";
$enabled = true;
$displayname = "<span>$name</span>";
}
else {
$hideshow = "<a href=\"$url&amp;action=enable&amp;auth=$auth\">";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/show.gif\" class=\"icon\" alt=\"enable\" /></a>";
// $hideshow = "<a href=\"$url&amp;action=enable&amp;auth=$auth\"><input type=\"checkbox\" /></a>";
$enabled = false;
$displayname = "<span class=\"dimmed_text\">$name</span>";
}
// up/down link (only if auth is enabled)
$updown = '';
if ($enabled) {
if ($updowncount > 1) {
$updown .= "<a href=\"$url&amp;action=up&amp;auth=$auth\">";
$updown .= "<img src=\"{$CFG->pixpath}/t/up.gif\" alt=\"up\" /></a>&nbsp;";
}
else {
$updown .= "<img src=\"{$CFG->pixpath}/spacer.gif\" class=\"icon\" alt=\"\" />&nbsp;";
}
if ($updowncount < $authcount) {
$updown .= "<a href=\"$url&amp;action=down&amp;auth=$auth\">";
$updown .= "<img src=\"{$CFG->pixpath}/t/down.gif\" alt=\"down\" /></a>";
}
else {
$updown .= "<img src=\"{$CFG->pixpath}/spacer.gif\" class=\"icon\" alt=\"\" />";
}
++ $updowncount;
}
// settings link
$settings = "<a href=\"auth_config.php?sesskey={$USER->sesskey}&amp;auth=$auth\">{$txt->settings}</a>";
// add a row to the table
$table->add_data(array($displayname, $hideshow, $updown, $settings));
}
// output form
admin_externalpage_print_header();
//print stus messages
if ($status !== '') {
notify($status, 'notifysuccess');
}
print_simple_box(get_string('configauthenticationplugins', 'admin'), 'center', '700');
$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 clearfix">';
print_heading(get_string('auth_common_settings', 'auth'));
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 '<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 '<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 '<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 '<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>';
/// 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 class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges', 'admin').'" /></div>';
echo '</div>';
echo '</form>';
admin_externalpage_print_footer();
redirect ($returnurl);
?>
+16 -19
View File
@@ -6,18 +6,19 @@
require_once '../config.php';
require_once $CFG->libdir.'/adminlib.php';
admin_externalpage_setup('userauthentication');
$auth = required_param('auth', PARAM_SAFEDIR);
$CFG->pagepath = 'auth/' . $auth;
admin_externalpage_setup('authsetting'.$auth);
$authplugin = get_auth_plugin($auth);
$err = array();
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageauths";
// save configuration changes
if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if ($frm = data_submitted() and confirm_sesskey()) {
$frm = stripslashes_recursive($frm);
$authplugin->validate_form($frm, $err);
@@ -37,7 +38,7 @@ if ($frm = data_submitted()) {
}
}
}
redirect("auth.php");
redirect($returnurl);
exit;
}
} else {
@@ -49,18 +50,13 @@ if ($frm = data_submitted()) {
$frm = get_config("auth/$auth");
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
$user_fields = $authplugin->userfields;
//$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");
/// 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}");
}
$authtitle = $authplugin->get_title();
/// 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}");
}
$authdescription = $authplugin->get_description();
// output configuration form
admin_externalpage_print_header();
@@ -140,10 +136,11 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
$fieldname = get_string('language');
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
$fieldname = get_string($fieldname);
}
}
if ($retrieveopts) {
$varname = 'field_map_' . $field;
+5 -10
View File
@@ -6,14 +6,14 @@
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
admin_externalpage_setup('manageblocks');
$blockid = required_param('block', PARAM_INT);
if(($blockrecord = blocks_get_record($blockid)) === false) {
if(!$blockrecord = blocks_get_record($blockid)) {
error('This block does not exist');
}
admin_externalpage_setup('blocksetting'.$blockrecord->name);
$block = block_instance($blockrecord->name);
if($block === false) {
error('Problem in instantiating block object');
@@ -31,7 +31,7 @@
if ($config = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
if(!$block->has_config()) {
error('This block does not support global configuration');
@@ -50,11 +50,6 @@
$strmanageblocks = get_string('manageblocks');
$strblockname = $block->get_title();
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'block/' . $block->name() . '/config';
admin_externalpage_print_header();
print_heading($strblockname);
@@ -70,6 +65,6 @@
echo '</p>';
$block->config_print();
echo '</form>';
admin_externalpage_print_footer();
print_footer();
?>
+30 -28
View File
@@ -29,10 +29,6 @@
$strmultiple = get_string('blockmultiple', 'admin');
$strshowblockcourse = get_string('showblockcourse');
admin_externalpage_print_header();
print_heading($strmanageblocks);
/// If data submitted, then process and store.
if (!empty($hide) && confirm_sesskey()) {
@@ -40,6 +36,7 @@
error("Block doesn't exist!");
}
set_field('block', 'visible', '0', 'id', $block->id); // Hide block
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($show) && confirm_sesskey() ) {
@@ -47,6 +44,7 @@
error("Block doesn't exist!");
}
set_field('block', 'visible', '1', 'id', $block->id); // Show block
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($multiple) && confirm_sesskey()) {
@@ -55,9 +53,12 @@
}
$block->multiple = !$block->multiple;
update_record('block', $block);
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($delete) && confirm_sesskey()) {
admin_externalpage_print_header();
print_heading($strmanageblocks);
if (!$block = blocks_get_record($delete)) {
error("Block doesn't exist!");
@@ -99,25 +100,9 @@
notify("Error occurred while deleting the $strblockname record from blocks table");
}
// Then the tables themselves
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$block->name;
$prefix2 = $CFG->prefix.'block_'.$block->name;
foreach ($tables as $table) {
if (strpos($table, $prefix) === 0 || strpos($table, $prefix2) === 0) {
/// If the match has been due to the 1st condition, debug to developers
if (strpos($table, $prefix) === 0) {
debugging('This block has some wrongly named tables. See Moodle Docs coding guidelines (and MDL-6786)', DEBUG_DEVELOPER);
}
/// Strip prefix from $table
$table = preg_replace("/^{$CFG->prefix}/", '', $table);
$xmldb_table = new XMLDBTable($table);
if (!drop_table($xmldb_table, true, false)) {
notify("ERROR: while trying to drop table $table");
}
}
}
}
drop_plugin_tables($block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false); // old obsoleted table names
drop_plugin_tables('block_'.$block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false);
// Delete the capabilities that were defined by this block
capabilities_cleanup('block/'.$block->name);
@@ -130,6 +115,9 @@
}
}
admin_externalpage_print_header();
print_heading($strmanageblocks);
/// Main display starts here
/// Get and sort the existing blocks
@@ -174,21 +162,35 @@
foreach ($blockbyname as $blockname => $blockid) {
$blockobject = $blockobjects[$blockid];
$block = $blocks[$blockid];
$delete = '<a href="blocks.php?delete='.$blockid.'&amp;sesskey='.$USER->sesskey.'">'.$strdelete.'</a>';
$settings = ''; // By default, no configuration
if($blockobject->has_config()) {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
if ($blockobject->has_config()) {
if (file_exists($CFG->dirroot.'/blocks/'.$block->name.'/settings.php')) {
$settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>';
} else {
$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
$totalcount = count_records('block_instance', 'blockid', $blockid);
$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>";
$blocklist .= "title=\"$strshowblockcourse\" >$totalcount</a>";
}
else {
$blocklist = "$count";
$blocklist = "$totalcount";
}
$class = ''; // Nothing fancy, by default
+71 -56
View File
@@ -100,7 +100,8 @@
/// Run all cron jobs for each module
mtrace("Starting activity modules");
if ($mods = get_records_select("modules", "cron > 0 AND (($timenow - lastcron) > cron)")) {
get_mailer('buffer');
if ($mods = get_records_select("modules", "cron > 0 AND (($timenow - lastcron) > cron) AND visible = 1 ")) {
foreach ($mods as $mod) {
$libfile = "$CFG->dirroot/mod/$mod->name/lib.php";
if (file_exists($libfile)) {
@@ -108,6 +109,7 @@
$cron_function = $mod->name."_cron";
if (function_exists($cron_function)) {
mtrace("Processing module function $cron_function ...", '');
$pre_dbqueries = null;
if (!empty($PERF->dbqueries)) {
$pre_dbqueries = $PERF->dbqueries;
$pre_time = microtime(1);
@@ -128,10 +130,11 @@
}
}
}
get_mailer('close');
mtrace("Finished activity modules");
mtrace("Starting blocks");
if ($blocks = get_records_select("block", "cron > 0 AND (($timenow - lastcron) > cron)")) {
if ($blocks = get_records_select("block", "cron > 0 AND (($timenow - lastcron) > cron) AND visible = 1")) {
// we will need the base class.
require_once($CFG->dirroot.'/blocks/moodleblock.class.php');
foreach ($blocks as $block) {
@@ -157,6 +160,33 @@
}
mtrace('Finished blocks');
mtrace('Starting admin reports');
// Admin reports do not have a database table that lists them. Instead a
// report includes cron.php with function report_reportname_cron() if it wishes
// to be cronned. It is up to cron.php to handle e.g. if it only needs to
// actually do anything occasionally.
$reports = get_list_of_plugins($CFG->admin.'/report');
foreach($reports as $report) {
$cronfile = $CFG->dirroot.'/'.$CFG->admin.'/report/'.$report.'/cron.php';
if (file_exists($cronfile)) {
require_once($cronfile);
$cronfunction = 'report_'.$report.'_cron';
mtrace('Processing cron function for '.$report.'...', '');
$pre_dbqueries = null;
if (!empty($PERF->dbqueries)) {
$pre_dbqueries = $PERF->dbqueries;
$pre_time = microtime(true);
}
$cronfunction();
if (isset($pre_dbqueries)) {
mtrace("... used " . ($PERF->dbqueries - $pre_dbqueries) . " dbqueries");
mtrace("... used " . round(microtime(true) - $pre_time, 2) . " seconds");
}
mtrace('done.');
}
}
mtrace('Finished admin reports');
if (!empty($CFG->langcache)) {
mtrace('Updating languages cache');
get_list_of_languages(true);
@@ -189,9 +219,9 @@
}
mtrace('Starting grade job ...', '');
mtrace('Starting main gradebook job ...');
grade_cron();
mtrace('Done ...');
mtrace('done.');
/// Run all core cron jobs, but not every time since they aren't too important.
@@ -260,8 +290,8 @@
/// Delete users who haven't completed profile within required period
if (!empty($CFG->deleteunconfirmed)) {
$cuttime = $timenow - ($CFG->deleteunconfirmed * 3600);
if (!empty($CFG->deleteincompleteusers)) {
$cuttime = $timenow - ($CFG->deleteincompleteusers * 3600);
$rs = get_recordset_sql ("SELECT id, username
FROM {$CFG->prefix}user
WHERE confirmed = 1
@@ -270,7 +300,7 @@
AND deleted = 0
AND (lastname = '' OR firstname = '' OR email = '')");
while ($user = rs_fetch_next_record($rs)) {
if (delete_records('user', 'id', $user->id)) {
if (delete_user($user)) {
mtrace("Deleted not fully setup user $user->username ($user->id)");
}
}
@@ -334,7 +364,7 @@
}
}
if(!empty($CFG->usetags)){
if (!empty($CFG->usetags)) {
require_once($CFG->dirroot.'/tag/lib.php');
tag_cron();
mtrace ('Executed tag cron');
@@ -428,56 +458,32 @@
}
if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) {
require_once($CFG->dirroot.'/lib/statslib.php');
// check we're not before our runtime
$timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today");
$timetocheck = stats_get_base_daily() + $CFG->statsruntimestarthour*60*60 + $CFG->statsruntimestartminute*60;
if (time() > $timetocheck) {
$time = 60*60*20; // set it to 20 here for first run... (overridden by $CFG)
$clobber = true;
if (!empty($CFG->statsmaxruntime)) {
$time = $CFG->statsmaxruntime+(60*30); // add on half an hour just to make sure (it could take that long to break out of the loop)
}
if (!get_field_sql('SELECT id FROM '.$CFG->prefix.'stats_daily')) {
// first run, set another lock. we'll check for this in subsequent runs to set the timeout to later for the normal lock.
set_cron_lock('statsfirstrunlock',true,$time,true);
$firsttime = true;
}
$time = 60*60*2; // this time set to 2.. (overridden by $CFG)
if (!empty($CFG->statsmaxruntime)) {
$time = $CFG->statsmaxruntime+(60*30); // add on half an hour to make sure (it could take that long to break out of the loop)
}
if ($config = get_record('config','name','statsfirstrunlock')) {
if (!empty($config->value)) {
$clobber = false; // if we're on the first run, just don't clobber it.
}
}
if (set_cron_lock('statsrunning',true,$time, $clobber)) {
require_once($CFG->dirroot.'/lib/statslib.php');
$return = stats_cron_daily();
if (stats_check_runtime() && $return == STATS_RUN_COMPLETE) {
stats_cron_weekly();
}
if (stats_check_runtime() && $return == STATS_RUN_COMPLETE) {
$return = $return && stats_cron_monthly();
}
if (stats_check_runtime() && $return == STATS_RUN_COMPLETE) {
stats_clean_old();
}
set_cron_lock('statsrunning',false);
if (!empty($firsttime)) {
set_cron_lock('statsfirstrunlock',false);
// process configured number of days as max (defaulting to 31)
$maxdays = empty($CFG->statsruntimedays) ? 31 : abs($CFG->statsruntimedays);
if (stats_cron_daily($maxdays)) {
if (stats_cron_weekly()) {
if (stats_cron_monthly()) {
stats_clean_old();
}
}
}
@set_time_limit(0);
} else {
mtrace('Next stats run after:'. userdate($timetocheck));
}
}
// run gradebook import/export/report cron
if ($gradeimports = get_list_of_plugins('grade/import')) {
foreach ($gradeimports as $gradeimport) {
if (file_exists($CFG->dirroot.'/grade/import/lib.php')) {
require_once($CFG->dirroot.'/grade/import/lib.php');
$cron_function = 'gradeimport_'.$gradeimport.'_cron';
if (file_exists($CFG->dirroot.'/grade/import/'.$gradeimport.'/lib.php')) {
require_once($CFG->dirroot.'/grade/import/'.$gradeimport.'/lib.php');
$cron_function = 'grade_import_'.$gradeimport.'_cron';
if (function_exists($cron_function)) {
mtrace("Processing gradebook import function $cron_function ...", '');
$cron_function;
@@ -488,9 +494,9 @@
if ($gradeexports = get_list_of_plugins('grade/export')) {
foreach ($gradeexports as $gradeexport) {
if (file_exists($CFG->dirroot.'/grade/export/lib.php')) {
require_once($CFG->dirroot.'/grade/export/lib.php');
$cron_function = 'gradeexport_'.$gradeexport.'_cron';
if (file_exists($CFG->dirroot.'/grade/export/'.$gradeexport.'/lib.php')) {
require_once($CFG->dirroot.'/grade/export/'.$gradeexport.'/lib.php');
$cron_function = 'grade_export_'.$gradeexport.'_cron';
if (function_exists($cron_function)) {
mtrace("Processing gradebook export function $cron_function ...", '');
$cron_function;
@@ -498,12 +504,12 @@
}
}
}
if ($gradereports = get_list_of_plugins('grade/report')) {
foreach ($gradereports as $gradereport) {
if (file_exists($CFG->dirroot.'/grade/report/lib.php')) {
require_once($CFG->dirroot.'/grade/report/lib.php');
$cron_function = 'gradereport_'.$gradereport.'_cron';
if (file_exists($CFG->dirroot.'/grade/report/'.$gradereport.'/lib.php')) {
require_once($CFG->dirroot.'/grade/report/'.$gradereport.'/lib.php');
$cron_function = 'grade_report_'.$gradereport.'_cron';
if (function_exists($cron_function)) {
mtrace("Processing gradebook report function $cron_function ...", '');
$cron_function;
@@ -511,6 +517,15 @@
}
}
}
// run any customized cronjobs, if any
// looking for functions in lib/local/cron.php
if (file_exists($CFG->dirroot.'/local/cron.php')) {
mtrace('Processing customized cron script ...', '');
include_once($CFG->dirroot.'/local/cron.php');
mtrace('done.');
}
//Unset session variables and destroy it
@session_unset();
@@ -521,7 +536,7 @@
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
/// finishe the IE hack
/// finish the IE hack
if (check_browser_version('MSIE')) {
echo "</xmp>";
}
+1 -1
View File
@@ -12,7 +12,7 @@
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$strdatabaseperformance = get_string("databaseperformance");
$stradministration = get_string("administration");
+2 -2
View File
@@ -13,7 +13,7 @@
$sure = optional_param('sure', 0, PARAM_BOOL);
$reallysure = optional_param('reallysure', 0, PARAM_BOOL);
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$deletedir = $CFG->dataroot; // The directory to delete!
@@ -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') {
+42 -4
View File
@@ -5,20 +5,25 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$enrol = optional_param('enrol', $CFG->enrol, PARAM_SAFEDIR);
$enrol = optional_param('enrol', $CFG->enrol, PARAM_SAFEDIR);
$savesettings = optional_param('savesettings', 0, PARAM_BOOL);
$CFG->pagepath = 'enrol';
admin_externalpage_setup('enrolment');
if (!isset($CFG->sendcoursewelcomemessage)) {
set_config('sendcoursewelcomemessage', 1);
}
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
/// Save settings
if ($frm = data_submitted()) {
if ($frm = data_submitted() and !$savesettings) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
if (empty($frm->enable)) {
$frm->enable = array();
@@ -34,6 +39,12 @@
set_config('enrol_plugins_enabled', implode(',', $frm->enable));
set_config('enrol', $frm->default);
redirect("enrol.php", get_string("changessaved"), 1);
} else if ($frm = data_submitted() and $savesettings) {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', 'error');
}
set_config('sendcoursewelcomemessage', required_param('sendcoursewelcomemessage', PARAM_BOOL));
}
/// Print the form
@@ -101,6 +112,33 @@
echo "</div>";
echo "</form>";
echo '<hr />';
$yesnooptions = array(0=>get_string('no'), 1=>get_string('yes'));
echo '<form '.$CFG->frametarget.' id="adminsettings" method="post" action="enrol.php">';
echo '<div class="settingsform clearfix">';
print_heading(get_string('commonsettings', 'admin'));
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="savesettings" value="1" />';
echo '<fieldset>';
echo '<div class="form-item clearfix" id="admin-sendcoursewelcomemessage">';
echo '<div class="form-label"><label for = "menusendcoursewelcomemessage">' . get_string('sendcoursewelcomemessage', 'admin');
echo '<span class="form-shortname">sendcoursewelcomemessage</span>';
echo '</label></div>';
echo '<div class="form-setting"><div class="form-checkbox defaultsnext">';
choose_from_menu($yesnooptions, 'sendcoursewelcomemessage', $CFG->sendcoursewelcomemessage, '');
echo '</div><div class="form-defaultinfo">'.get_string('defaultsettinginfo', 'admin', get_string('yes')).'</div></div>';
echo '<div class="form-description">' . get_string('configsendcoursewelcomemessage', 'admin') . '</div>';
echo '</div>';
echo '</fieldset>';
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();
?>
?>
+1 -1
View File
@@ -19,7 +19,7 @@
if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
if ($enrolment->process_config($frm)) {
redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
+6 -6
View File
@@ -7,7 +7,7 @@
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// Copyright (C) 1999 onwards 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 //
@@ -65,10 +65,10 @@
if ($cd = new component_installer('http://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
switch ($status) {
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/environment/environment.zip';
$a->dest= $CFG->dataroot.'/';
@@ -77,10 +77,10 @@
print_simple_box(get_string($cd->get_error(), 'error'), 'center', '', '', 5, 'errorbox');
}
break;
case UPTODATE:
case COMPONENT_UPTODATE:
print_simple_box(get_string($cd->get_error(), 'error'), 'center');
break;
case INSTALLED:
case COMPONENT_INSTALLED:
print_simple_box(get_string('componentinstalled', 'admin'), 'center');
break;
}
+46 -6
View File
@@ -117,6 +117,16 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="optional">
<FEEDBACK>
<ON_CHECK message="ctyperecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.9">
@@ -167,6 +177,16 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="optional">
<FEEDBACK>
<ON_CHECK message="ctyperecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
@@ -180,6 +200,11 @@
<ON_OK message="questioncwqpfsok" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_register_globals" level="optional">
<FEEDBACK>
<ON_CHECK message="globalswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.0" requires="1.9">
@@ -200,8 +225,9 @@
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
<VENDOR name="sqlite" version="2.0" />
</DATABASE>
<PHP version="5.2.0" level="required">
<PHP version="5.2.4" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
@@ -214,9 +240,9 @@
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
<ON_CHECK message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -229,12 +255,26 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_register_globals" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
<ON_CHECK message="globalswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
+12 -19
View File
@@ -6,20 +6,15 @@
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('managefilters');
$filterfull = required_param('filter', PARAM_PATH);
$forcereset = optional_param('reset', 0, PARAM_BOOL);
// get parameters
$param = new Object;
$filtername = substr($filterfull, strpos( $filterfull, '/' )+1 ) ;
$param->filter = required_param('filter', PARAM_PATH);
$param->submit = optional_param('submit', 0, PARAM_BOOL);
$param->reset = optional_param('reset', 0, PARAM_BOOL);
admin_externalpage_setup('filtersetting'.str_replace('/', '', $filterfull));
$filtername = substr($param->filter, strpos( $param->filter, '/' )+1 ) ;
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=managefilters";
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'filter/' . $filtername . '/config';
// get translated strings for use on page
$txt = new Object;
@@ -32,12 +27,7 @@
//======================
// if reset pressed let filter config page handle it
$forcereset = false;
if (!empty($param->reset)) {
$forcereset = true;
}
else
if ($config = data_submitted()) {
if ($config = data_submitted() and !$forcereset) {
// check session key
if (!confirm_sesskey()) {
@@ -61,7 +51,10 @@
set_config($name, stripslashes($value));
}
}
redirect("$CFG->wwwroot/$CFG->admin/filters.php");
reset_text_filters_cache();
redirect($returnurl);
exit;
}
@@ -79,11 +72,11 @@
print_simple_box_start("center",'');
?>
<form action="filter.php?filter=<?php echo urlencode($param->filter); ?>" method="post">
<form action="filter.php?filter=<?php echo urlencode($filterfull); ?>" method="post">
<div style="text-align: center">
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
<?php include "$CFG->dirroot/$filterfull/filterconfig.html"; ?>
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
<input type="submit" name="reset" value="<?php echo print_string('resettodefaults'); ?>" />
+41 -215
View File
@@ -1,135 +1,73 @@
<?php // $Id$
// filters.php
// Edit list of available text filters
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// defines
define('FILTER_TABLE','filter_administration_table');
$action = optional_param('action', '', PARAM_ACTION);
$filterpath = optional_param('filterpath', '', PARAM_PATH);
admin_externalpage_setup('managefilters');
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
// get values from page
$params = new object();
$params->action = optional_param('action', '', PARAM_ACTION);
$params->filterpath = optional_param('filterpath', '', PARAM_PATH);
$params->cachetext = optional_param('cachetext', 0, PARAM_INT);
$params->filterall = optional_param('filterall', 0, PARAM_BOOL);
$params->filteruploadedfiles = optional_param('filteruploadedfiles', 0, PARAM_INT);
$params->filtermatchoneperpage = optional_param('filtermatchoneperpage', 0, PARAM_BOOL);
$params->filtermatchonepertext = optional_param('filtermatchonepertext', 0, PARAM_BOOL);
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=managefilters";
// some basic information
$url = 'filters.php';
$myurl = "$url?sesskey=" . sesskey();
$img = "$CFG->pixpath/t";
if (!confirm_sesskey()) {
redirect($returnurl);
}
// get translated strings for use on page
$txt = new object();
$txt->managefilters = get_string('managefilters');
$txt->administration = get_string('administration');
$txt->configuration = get_string('configuration');
$txt->name = get_string('name');
$txt->hide = get_string('hide');
$txt->show = get_string('show');
$txt->hideshow = "$txt->hide/$txt->show";
$txt->settings = get_string('settings');
$txt->up = get_string('up');
$txt->down = get_string('down');
$txt->updown = "$txt->up/$txt->down";
$txt->cachetext = get_string('cachetext', 'admin');
$txt->configcachetext = get_string('configcachetext', 'admin');
$txt->filteruploadedfiles = get_string('filteruploadedfiles','admin');
$txt->configfilteruploadedfiles = get_string('configfilteruploadedfiles','admin');
$txt->filterall = get_string('filterall','admin');
$txt->filtermatchoneperpage = get_string('filtermatchoneperpage','admin');
$txt->filtermatchonepertext = get_string('filtermatchonepertext','admin');
$txt->configfilterall = get_string('configfilterall','admin');
$txt->configfiltermatchoneperpage = get_string('configfiltermatchoneperpage','admin');
$txt->configfiltermatchonepertext = get_string('configfiltermatchonepertext','admin');
$txt->cachecontrols = get_string('cachecontrols');
$txt->yes = get_string('yes');
$txt->no = get_string('no');
$txt->none = get_string('none');
$txt->allfiles = get_string('allfiles');
$txt->htmlfilesonly = get_string('htmlfilesonly');
// get a list of possible filters (and translate name if possible)
// note filters can be in the dedicated filters area OR in their
// associated modules
// get a list of installed filters
$installedfilters = array();
$filtersettings = array();
$filterlocations = array('mod','filter');
foreach ($filterlocations as $filterlocation) {
$plugins = get_list_of_plugins($filterlocation);
foreach ($plugins as $plugin) {
$pluginpath = "$CFG->dirroot/$filterlocation/$plugin/filter.php";
$settingspath = "$CFG->dirroot/$filterlocation/$plugin/filterconfig.html";
if (is_readable($pluginpath)) {
$name = trim(get_string("filtername", $plugin));
if (empty($name) or ($name == '[[filtername]]')) {
$name = ucfirst($plugin);
}
$installedfilters["$filterlocation/$plugin"] = $name;
if (is_readable($settingspath)) {
$filtersettings[] = "$filterlocation/$plugin";
}
$installedfilters["$filterlocation/$plugin"] = "$filterlocation/$plugin";
}
}
}
// get all the currently selected filters
if (!empty($CFG->textfilters)) {
$oldactivefilters = explode(',', $CFG->textfilters);
$oldactivefilters = array_unique($oldactivefilters);
$activefilters = explode(',', $CFG->textfilters);
} else {
$oldactivefilters = array();
}
// take this opportunity to clean up filters
$activefilters = array();
foreach ($oldactivefilters as $oldactivefilter) {
if (!empty($oldactivefilter) and array_key_exists($oldactivefilter, $installedfilters)) {
$activefilters[] = $oldactivefilter;
}
$activefilters = array();
}
//======================
// Process Actions
//======================
if ($params->action=="") {
// store cleaned active filers in db
set_config('textfilters', implode(',', $activefilters));
} elseif (($params->action=="hide") and confirm_sesskey()) {
$key=array_search($params->filterpath, $activefilters);
switch ($action) {
case 'hide':
$key=array_search($filterpath, $activefilters);
// check filterpath is valid
if ($key===false) {
// ignore it - doubleclick??
} else {
// just delete it
unset($activefilters[$key]);
set_config('textfilters', implode(',', $activefilters));
break;
}
} elseif (($params->action=="show") and confirm_sesskey()) {
// just delete it
unset($activefilters[$key]);
break;
case 'show':
// check filterpath is valid
if (!array_key_exists($params->filterpath, $installedfilters)) {
error("Filter $params->filterpath is not currently installed", $url);
} elseif (array_search($params->filterpath,$activefilters)) {
if (!array_key_exists($filterpath, $installedfilters)) {
error("Filter $filterpath is not currently installed", $url);
} elseif (array_search($filterpath,$activefilters)) {
// filterpath is already active - doubleclick??
} else {
// add it to installed filters
$activefilters[] = $params->filterpath;
$activefilters[] = $filterpath;
$activefilters = array_unique($activefilters);
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="down") and confirm_sesskey()) {
$key=array_search($params->filterpath, $activefilters);
break;
case 'down':
$key=array_search($filterpath, $activefilters);
// check filterpath is valid
if ($key===false) {
error("Filter $params->filterpath is not currently active", $url);
error("Filter $filterpath is not currently active", $url);
} elseif ($key>=(count($activefilters)-1)) {
// cannot be moved any further down - doubleclick??
} else {
@@ -137,13 +75,14 @@
$fsave = $activefilters[$key];
$activefilters[$key] = $activefilters[$key+1];
$activefilters[$key+1] = $fsave;
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="up") and confirm_sesskey()) {
$key=array_search($params->filterpath, $activefilters);
break;
case 'up':
$key=array_search($filterpath, $activefilters);
// check filterpath is valid
if ($key===false) {
error("Filter $params->filterpath is not currently active", $url);
error("Filter $filterpath is not currently active", $url);
} elseif ($key<1) {
//cannot be moved any further up - doubleclick??
} else {
@@ -151,126 +90,13 @@
$fsave = $activefilters[$key];
$activefilters[$key] = $activefilters[$key-1];
$activefilters[$key-1] = $fsave;
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="config") and confirm_sesskey()) {
set_config('cachetext', $params->cachetext);
set_config('filteruploadedfiles', $params->filteruploadedfiles);
set_config('filterall', $params->filterall);
set_config('filtermatchoneperpage', $params->filtermatchoneperpage);
set_config('filtermatchonepertext', $params->filtermatchonepertext);
break;
}
//======================
// Build Display Objects
//======================
// construct the display array with installed filters
// at the top in the right order
$displayfilters = array();
foreach ($activefilters as $activefilter) {
$name = $installedfilters[$activefilter];
$displayfilters[$activefilter] = $name;
}
foreach ($installedfilters as $key => $filter) {
if (!array_key_exists($key, $displayfilters)) {
$displayfilters[$key] = $filter;
}
}
// construct the flexible table ready to display
$table = new flexible_table(FILTER_TABLE);
$table->define_columns(array('name', 'hideshow', 'order', 'settings'));
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
$table->set_attribute('id', 'filters');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// iterate through filters adding to display table
$updowncount = 1;
$activefilterscount = count($activefilters);
foreach ($displayfilters as $path => $name) {
$upath = urlencode($path);
// get hide/show link
if (in_array($path, $activefilters)) {
$hideshow = "<a href=\"$myurl&amp;action=hide&amp;filterpath=$upath\">";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/hide.gif\" class=\"icon\" alt=\"$txt->hide\" /></a>";
$hidden = false;
$displayname = "<span>$name</span>";
}
else {
$hideshow = "<a href=\"$myurl&amp;action=show&amp;filterpath=$upath\">";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/show.gif\" class=\"icon\" alt=\"$txt->show\" /></a>";
$hidden = true;
$displayname = "<span class=\"dimmed_text\">$name</span>";
}
// get up/down link (only if not hidden)
$updown = '';
if (!$hidden) {
if ($updowncount>1) {
$updown .= "<a href=\"$myurl&amp;action=up&amp;filterpath=$upath\">";
$updown .= "<img src=\"$img/up.gif\" alt=\"$txt->up\" /></a>&nbsp;";
}
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" class=\"icon\" alt=\"\" />&nbsp;";
}
if ($updowncount<$activefilterscount) {
$updown .= "<a href=\"$myurl&amp;action=down&amp;filterpath=$upath\">";
$updown .= "<img src=\"$img/down.gif\" alt=\"$txt->down\" /></a>";
}
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" class=\"icon\" alt=\"\" />";
}
++$updowncount;
}
// settings link (if defined)
$settings = '';
if (in_array($path, $filtersettings)) {
$settings = "<a href=\"filter.php?filter=" . urlencode($path) . "\">";
$settings .= "{$txt->settings}</a>";
}
// write data into the table object
$table->add_data(array($displayname, $hideshow, $updown, $settings));
}
// build options list for cache lifetime
$seconds = array(604800,86400,43200,10800,7200,3600,2700,1800,900,600,540,480,420,360,300,240,180,120,60,30,0);
unset($lifetimeoptions);
foreach ($seconds as $second) {
if ($second>=86400) {
$options[$second] = get_string('numdays','',$second/86400);
}
elseif ($second>=3600) {
$options[$second] = get_string('numhours','',$second/3600);
}
elseif ($second>=60) {
$options[$second] = get_string('numminutes','',$second/60);
}
elseif ($second>=1) {
$options[$second] = get_string('numseconds','',$second);
}
else {
$options[$second] = get_string('no');
}
}
//==============================
// Display logic
//==============================
admin_externalpage_print_header();
print_heading_with_help($txt->managefilters, 'filters');
// print the table of all the filters
$table->print_html();
// cache control table has been removed
admin_externalpage_print_footer();
// save, reset cache and return
set_config('textfilters', implode(',', $activefilters));
reset_text_filters_cache();
redirect($returnurl);
?>
+291 -2
View File
@@ -24,7 +24,7 @@
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$site = get_site();
@@ -525,11 +525,300 @@ class problem_000011 extends problem_base {
}
return 'Error counter was cleared.';
} else {
return '<p>Session errors can be caused by:<ul><li>unresolved problem in server software (aka random switching of users),</li><li>blocked or modified cookies,</li><li>deleting of active session files.</li></ul></p><p><a href="'.me().'&resetsesserrorcounter=1">Reset counter.</a></p>';
return '<p>Session errors can be caused by:</p><ul>' .
'<li>unresolved problem in server software (aka random switching of users),</li>' .
'<li>blocked or modified cookies,</li>' .
'<li>deleting of active session files.</li>' .
'</ul><p><a href="'.me().'&amp;resetsesserrorcounter=1">Reset counter</a></p>';
}
}
}
class problem_000012 extends problem_base {
function title() {
return 'Random questions data consistency';
}
function exists() {
return record_exists_select('question', "qtype = 'random' AND parent <> id");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
return '<p>For random questions, question.parent should equal question.id. ' .
'There are some questions in your database for which this is not true. ' .
'One way that this could have happened is for random questions restored from backup before ' .
'<a href="http://tracker.moodle.org/browse/MDL-5482">MDL-5482</a> was fixed.</p>';
}
function solution() {
global $CFG;
return '<p>Upgrade to Moodle 1.9.1 or later, or manually execute the SQL</p>' .
'<pre>UPDATE ' . $CFG->prefix . 'question SET parent = id WHERE qtype = \'random\' and parent &lt;> id;</pre>';
}
}
class problem_000013 extends problem_base {
function title() {
return 'Multi-answer questions data consistency';
}
function exists() {
global $CFG;
$positionexpr = sql_position(sql_concat("','", "q.id", "','"),
sql_concat("','", "qma.sequence", "','"));
return record_exists_sql("
SELECT * FROM {$CFG->prefix}question q
JOIN {$CFG->prefix}question_multianswer qma ON $positionexpr > 0
WHERE qma.question <> q.parent") ||
record_exists_sql("
SELECT * FROM {$CFG->prefix}question q
JOIN {$CFG->prefix}question parent_q ON parent_q.id = q.parent
WHERE q.category <> parent_q.category");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
return '<p>For each sub-question whose id is listed in ' .
'question_multianswer.sequence, its question.parent field should equal ' .
'question_multianswer.question; and each sub-question should be in the same ' .
'category as its parent. There are questions in your database for ' .
'which this is not the case. One way that this could have happened is ' .
'for multi-answer questions restored from backup before ' .
'<a href="http://tracker.moodle.org/browse/MDL-14750">MDL-14750</a> was fixed.</p>';
}
function solution() {
return '<p>Upgrade to Moodle 1.9.1 or later, or manually execute the ' .
'code in question_multianswer_fix_subquestion_parents_and_categories in ' .
'<a href="http://cvs.moodle.org/moodle/question/type/multianswer/db/upgrade.php?revision=1.1.10.2&amp;view=markup">/question/type/multianswer/db/upgrade.php' .
'from the 1.9 stable branch</a>.</p>';
}
}
class problem_000014 extends problem_base {
function title() {
return 'Only multianswer and random questions should be the parent of another question';
}
function exists() {
global $CFG;
return record_exists_sql("
SELECT * FROM {$CFG->prefix}question q
JOIN {$CFG->prefix}question parent_q ON parent_q.id = q.parent
WHERE parent_q.qtype NOT IN ('random', 'multianswer')");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
return '<p>You have questions that violate this in your databse. ' .
'You will need to investigate to determine how this happened.</p>';
}
function solution() {
return '<p>It is impossible to give a solution without knowing more about ' .
' how the problem was caused. You may be able to get help from the ' .
'<a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a>.</p>';
}
}
class problem_000015 extends problem_base {
function title() {
return 'Question categories should belong to a valid context';
}
function exists() {
global $CFG;
return record_exists_sql("
SELECT qc.*, (SELECT COUNT(1) FROM {$CFG->prefix}question q WHERE q.category = qc.id) AS numquestions
FROM {$CFG->prefix}question_categories qc
LEFT JOIN {$CFG->prefix}context con ON qc.contextid = con.id
WHERE con.id IS NULL");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
global $CFG;
$problemcategories = get_records_sql("
SELECT qc.id, qc.name, qc.contextid, (SELECT COUNT(1) FROM {$CFG->prefix}question q WHERE q.category = qc.id) AS numquestions
FROM {$CFG->prefix}question_categories qc
LEFT JOIN {$CFG->prefix}context con ON qc.contextid = con.id
WHERE con.id IS NULL
ORDER BY numquestions DESC, qc.name");
$table = '<table><thead><tr><th>Cat id</th><th>Category name</th>' .
"<th>Context id</th><th>Num Questions</th></tr></thead><tbody>\n";
if ($problemcategories) {
foreach ($problemcategories as $cat) {
$table .= "<tr><td>$cat->id</td><td>" . s($cat->name) . "</td><td>" .
$cat->contextid ."</td><td>$cat->numquestions</td></tr>\n";
}
}
$table .= '</tbody></table>';
return '<p>All question categories are linked to a context id, and, ' .
'the context they are linked to must exist. The following categories ' .
'belong to a non-existant category:</p>' . $table . '<p>Any of these ' .
'categories that contain no questions can just be deleted form the database. ' .
'Other categories will require more thought.</p>';
}
function solution() {
global $CFG;
return '<p>You can delete the empty categories by executing the following SQL:</p><pre>
DELETE FROM ' . $CFG->prefix . 'question_categories qc
WHERE
NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'question q WHERE q.category = qc.id)
AND NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'context con WHERE qc.contextid = con.id)
</pre><p>Any remaining categories that contain questions will require more thought. ' .
'People in the <a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a> may be able to help.</p>';
}
}
class problem_000016 extends problem_base {
function title() {
return 'Question categories should belong to the same context as their parent';
}
function exists() {
global $CFG;
return record_exists_sql("
SELECT parent_qc.id AS parent, child_qc.id AS child, child_qc.contextid
FROM {$CFG->prefix}question_categories child_qc
JOIN {$CFG->prefix}question_categories parent_qc ON child_qc.parent = parent_qc.id
WHERE child_qc.contextid <> parent_qc.contextid");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
global $CFG;
$problemcategories = get_records_sql("
SELECT
parent_qc.id AS parentid, parent_qc.name AS parentname, parent_qc.contextid AS parentcon,
child_qc.id AS childid, child_qc.name AS childname, child_qc.contextid AS childcon
FROM {$CFG->prefix}question_categories child_qc
JOIN {$CFG->prefix}question_categories parent_qc ON child_qc.parent = parent_qc.id
WHERE child_qc.contextid <> parent_qc.contextid");
$table = '<table><thead><tr><th colspan="3">Child category</th><th colspan="3">Parent category</th></tr><tr>' .
'<th>Id</th><th>Name</th><th>Context id</th>' .
'<th>Id</th><th>Name</th><th>Context id</th>' .
"</tr></thead><tbody>\n";
if ($problemcategories) {
foreach ($problemcategories as $cat) {
$table .= "<tr><td>$cat->childid</td><td>" . s($cat->childname) .
"</td><td>$cat->childcon</td><td>$cat->parentid</td><td>" . s($cat->parentname) .
"</td><td>$cat->parentcon</td></tr>\n";
}
}
$table .= '</tbody></table>';
return '<p>When one question category is the parent of another, then they ' .
'should both belong to the same context. This is not true for the following categories:</p>' .
$table;
}
function solution() {
return '<p>An automated solution is difficult. It depends whether the ' .
'parent or child category is in the wrong pace.' .
'People in the <a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a> may be able to help.</p>';
}
}
class problem_000017 extends problem_base {
function title() {
return 'Question categories tree structure';
}
function find_problems() {
static $answer = null;
if (is_null($answer)) {
$categories = get_records('question_categories', '', '', 'id');
// Look for missing parents.
$missingparent = array();
foreach ($categories as $category) {
if ($category->parent != 0 && !array_key_exists($category->parent, $categories)) {
$missingparent[$category->id] = $category;
}
}
// Look for loops.
$loops = array();
while (!empty($categories)) {
$current = array_pop($categories);
$thisloop = array($current->id => $current);
while (true) {
if (isset($thisloop[$current->parent])) {
// Loop detected
$loops[$current->id] = $thisloop;
break;
} else if (!isset($categories[$current->parent])) {
// Got to the top level, or a category we already know is OK.
break;
} else {
// Continue following the path.
$current = $categories[$current->parent];
$thisloop[$current->id] = $current;
unset($categories[$current->id]);
}
}
}
$answer = array($missingparent, $loops);
}
return $answer;
}
function exists() {
list($missingparent, $loops) = $this->find_problems();
return !empty($missingparent) || !empty($loops);
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
list($missingparent, $loops) = $this->find_problems();
$description = '<p>The question categories should be arranged into tree ' .
' structures by the question_categories.parent field. Sometimes ' .
' this tree structure gets messed up.</p>';
if (!empty($missingparent)) {
$description .= '<p>The following categories are missing their parents:</p><ul>';
foreach ($missingparent as $cat) {
$description .= "<li>Category $cat->id: " . s($cat->name) . "</li>\n";
}
$description .= "</ul>\n";
}
if (!empty($loops)) {
$description .= '<p>The following categories form a loop of parents:</p><ul>';
foreach ($loops as $loop) {
$description .= "<li><ul>\n";
foreach ($loop as $cat) {
$description .= "<li>Category $cat->id: " . s($cat->name) . " has parent $cat->parent</li>\n";
}
$description .= "</ul></li>\n";
}
$description .= "</ul>\n";
}
return $description;
}
function solution() {
global $CFG;
list($missingparent, $loops) = $this->find_problems();
$solution = '<p>Consider executing the following SQL queries. These fix ' .
'the problem by moving some categories to the top level.</p>';
if (!empty($missingparent)) {
$solution .= "<pre>UPDATE " . $CFG->prefix . "question_categories\n" .
" SET parent = 0\n" .
" WHERE id IN (" . implode(',', array_keys($missingparent)) . ");</pre>\n";
}
if (!empty($loops)) {
$solution .= "<pre>UPDATE " . $CFG->prefix . "question_categories\n" .
" SET parent = 0\n" .
" WHERE id IN (" . implode(',', array_keys($loops)) . ");</pre>\n";
}
return $solution;
}
}
class problem_00000x extends problem_base {
function title() {
+101 -49
View File
@@ -24,13 +24,15 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
require_once($CFG->libdir.'/db/upgradelib.php'); // Upgrade-related functions
$id = optional_param('id', '', PARAM_ALPHANUM);
$id = optional_param('id', '', PARAM_TEXT);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
$autopilot = optional_param('autopilot', 0, PARAM_BOOL);
$ignoreupgradewarning = optional_param('ignoreupgradewarning', 0, PARAM_BOOL);
$confirmplugincheck = optional_param('confirmplugincheck', 0, PARAM_BOOL);
/// check upgrade status first
if ($ignoreupgradewarning and !empty($_SESSION['upgraderunning'])) {
@@ -122,6 +124,7 @@
}
}
}
if (! $maintables) {
/// hide errors from headers in case debug enabled in config.php
$origdebug = $CFG->debug;
@@ -157,6 +160,7 @@
die;
}
$strdatabasesetup = get_string("databasesetup");
$strdatabasesuccess = get_string("databasesuccess");
$navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
@@ -202,27 +206,21 @@
// install core event handlers
events_update_definition();
// Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
// (this should only have any effect during initial install).
$adminroot = admin_get_root();
$adminroot->prune('backups'); // backup settings table not created yet
apply_default_settings($adminroot);
/// This is used to handle any settings that must exist in $CFG but which do not exist in
/// admin_get_root()/$ADMIN as admin_setting objects (there are some exceptions).
apply_default_exception_settings(array('alternateloginurl' => '',
'auth' => 'email',
apply_default_exception_settings(array('auth' => 'email',
'auth_pop3mailbox' => 'INBOX',
'changepassword' => '',
'enrol' => 'manual',
'enrol_plugins_enabled' => 'manual',
'guestloginbutton' => 1,
'registerauth' => 'email',
'style' => 'default',
'template' => 'default',
'theme' => 'standardwhite',
'filter_multilang_converted' => 1));
// Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
// (this should only have any effect during initial install).
admin_apply_default_settings(NULL, true);
notify($strdatabasesuccess, "green");
require_once $CFG->dirroot.'/mnet/lib.php';
} else {
@@ -264,8 +262,9 @@
$CFG->debug = DEBUG_MINIMAL;
error_reporting($CFG->debug);
// logout in case we are upgrading from pre 1.7 version - prevention of weird session problems
if ($CFG->version < 2006050600) {
// logo ut in case we are upgrading from pre 1.9 version in order to prevent
// weird session/role problems caused by incorrect data in USER and SESSION
if ($CFG->version < 2007101500) {
require_logout();
}
@@ -275,6 +274,7 @@
"", "", false, "&nbsp;", "&nbsp;");
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
print_footer('none');
exit;
} else if (empty($confirmrelease)){
@@ -287,22 +287,51 @@
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 '<div class="continuebutton">';
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
}
print_footer('none');
die;
} elseif (empty($confirmplugincheck)) {
$strplugincheck = get_string('plugincheck');
$navigation = build_navigation(array(array('name'=>$strplugincheck, 'link'=>null, 'type'=>'misc')));
print_header($strplugincheck, $strplugincheck, $navigation, "", "", false, "&nbsp;", "&nbsp;");
print_heading($strplugincheck);
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('pluginchecknotice');
print_box_end();
print_plugin_tables();
echo "<br />";
echo '<div class="continuebutton">';
print_single_button('index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1), get_string('reload'), 'get');
echo '</div><br />';
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '<input type="hidden" name="confirmplugincheck" 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 {
$strdatabasesuccess = get_string("databasesuccess");
$navigation = build_navigation(array(array('name'=>$strdatabasesuccess, 'link'=>null, 'type'=>'misc')));
@@ -360,7 +389,7 @@
/// Main upgrade not success
} else {
notify('Main Upgrade failed! See lib/db/upgrade.php');
print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1');
print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1&amp;confirmplugincheck=1');
print_footer('none');
die;
}
@@ -415,6 +444,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");
@@ -424,7 +456,7 @@
upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for changes to RPC functions
require_once($CFG->dirroot.'/admin/mnet/adminlib.php');
require_once("$CFG->dirroot/$CFG->admin/mnet/adminlib.php");
upgrade_RPC_functions("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Upgrade all plugins for gradebook
@@ -435,6 +467,9 @@
/// Check all message output plugins and upgrade if necessary
upgrade_plugins('message','message/output',"$CFG->wwwroot/$CFG->admin/index.php");
/// Check all admin report plugins and upgrade if necessary
upgrade_plugins('report', $CFG->admin.'/report', "$CFG->wwwroot/$CFG->admin/index.php");
/// just make sure upgrade logging is properly terminated
upgrade_log_finish();
@@ -472,6 +507,7 @@
$cat = new object();
$cat->name = get_string('miscellaneous');
$cat->depth = 1;
if (!$catid = insert_record('course_categories', $cat)) {
error("Serious Error! Could not set up a default course category!");
}
@@ -493,9 +529,11 @@
//add admin_tree block to site if not already present
if ($admintree = get_record('block', 'name', 'admin_tree')) {
$page = page_create_object(PAGE_COURSE_VIEW, SITEID);
blocks_execute_action($page, blocks_get_by_page($page), 'add', (int)$admintree->id, false, false);
$pageblocks=blocks_get_by_page($page);
blocks_execute_action($page, $pageblocks, 'add', (int)$admintree->id, false, false);
if ($admintreeinstance = get_record('block_instance', 'pagetype', $page->type, 'pageid', SITEID, 'blockid', $admintree->id)) {
blocks_execute_action($page, blocks_get_by_page($page), 'moveleft', $admintreeinstance, false, false);
$pageblocks=blocks_get_by_page($page); // Needs to be re-got, since has just changed
blocks_execute_action($page, $pageblocks, 'moveleft', $admintreeinstance, false, false);
}
}
@@ -521,16 +559,18 @@
create_admin_user();
}
/// Check for valid admin user
require_login();
/// Check for valid admin user - no guest autologin
require_login(0, false);
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context);
/// check that site is properly customized
if (empty($site->shortname)) {
// probably new installation - lets return to frontpage after this step
// remove settings that we want uninitialised
unset_config('registerauth');
redirect('upgradesettings.php?return=site');
}
@@ -542,10 +582,16 @@
}
}
$adminroot = admin_get_root();
/// setup critical warnings before printing admin tree block
$insecuredataroot = is_dataroot_insecure(true);
$register_globals_enabled = ini_get_bool('register_globals');
$SESSION->admin_critical_warning = ($register_globals_enabled || $insecuredataroot==INSECURE_DATAROOT_ERROR);
$adminroot =& admin_get_root();
/// Check if there are any new admin settings which have still yet to be set
if( any_new_admin_settings( $adminroot ) ){
if (any_new_admin_settings($adminroot)){
redirect('upgradesettings.php');
}
@@ -566,12 +612,26 @@
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'), 'generalbox adminwarning');
if ($register_globals_enabled) {
print_box(get_string('globalswarning', 'admin'), 'generalbox adminerror');
}
if (is_dataroot_insecure()) {
if ($insecuredataroot == INSECURE_DATAROOT_WARNING) {
print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
} else if ($insecuredataroot == INSECURE_DATAROOT_ERROR) {
print_box(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'generalbox adminerror');
}
if (defined('WARN_DISPLAY_ERRORS_ENABLED')) {
print_box(get_string('displayerrorswarning', 'admin'), 'generalbox adminwarning');
}
if (substr($CFG->wwwroot, -1) == '/') {
print_box(get_string('cfgwwwrootslashwarning', 'admin'), 'generalbox adminwarning');
}
if (strpos($ME, $CFG->httpswwwroot.'/') === false) {
print_box(get_string('cfgwwwrootwarning', 'admin'), 'generalbox adminwarning');
}
/// If no recently cron run
@@ -593,38 +653,30 @@
}
/// Print slightly annoying registration button every six months ;-)
/// You can set the "registered" variable to something far in the future
/// if you really want to prevent this. eg 9999999999
if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_box_start('generalbox adminwarning');
print_string('pleaseregister', 'admin');
print_single_button('register.php', $options, get_string('registration'));
print_box_end();
$registrationbuttonshown = true;
/// Print slightly annoying registration button
$options = array();
$options['sesskey'] = $USER->sesskey;
print_box_start('generalbox adminwarning');
if(!isset($CFG->registered)) {
print_string('pleaseregister', 'admin');
}
else { /* if (isset($CFG->registered) && $CFG->registered < (time() - 3600*24*30*6)) { */
print_string('pleaserefreshregistration', 'admin', userdate($CFG->registered));
}
print_single_button('register.php', $options, get_string('registration'));
print_box_end();
//////////////////////////////////////////////////////////////////////////////////////////////////
//// 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>';
print_box($copyrighttext, 'copyright');
//////////////////////////////////////////////////////////////////////////////////////////////////
if (empty($registrationbuttonshown)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_single_button('register.php', $options, get_string('registration'));
}
admin_externalpage_print_footer();
?>
+1 -1
View File
@@ -9,7 +9,7 @@
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
admin_externalpage_print_header();
print_heading('Convert all MySQL tables from MYISAM to InnoDB');
+443 -61
View File
@@ -7,26 +7,35 @@
* @param bool $uselocal save translations into *_local pack?
*/
$dbg = ''; // debug output;
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('langedit');
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
$context = get_context_instance(CONTEXT_SYSTEM);
define('LANG_SUBMIT_REPEAT', 1); // repeat displaying submit button?
define('LANG_SUBMIT_REPEAT_EVERY', 20); // if so, after how many lines?
define('LANG_DISPLAY_MISSING_LINKS', 1); // display "go to first/next missing string" links?
define('LANG_DEFAULT_FILE', ''); // default file to translate. Empty allowed
define('LANG_DEFAULT_HELPFILE', ''); // default helpfile to translate. Empty allowed
define('LANG_LINK_MISSING_STRINGS', 1); // create links from "missing" page to "compare" page?
define('LANG_DEFAULT_USELOCAL', 0); // should *_utf8_local be used by default?
define('LANG_MISSING_TEXT_MAX_LEN', 60); // maximum length of the missing text to display
define('LANG_KEEP_ORPHANS', 1); // keep orphaned strings (i.e. strings w/o English reference)
define('LANG_SEARCH_EXTRA', 1); // search lang files in extra locations
define('LANG_ALWAYS_TEXTAREA', 1); // always use <textarea> even for short strings MDL-15738
$mode = optional_param('mode', '', PARAM_ALPHA);
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
$uselocal = optional_param('uselocal', -1, PARAM_INT);
$mode = optional_param('mode', '', PARAM_ALPHA);
if ($mode == 'helpfiles') {
// use different PARAM_ options according to mode
$currentfile = optional_param('currentfile', LANG_DEFAULT_HELPFILE, PARAM_PATH);
} else {
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
}
$uselocal = optional_param('uselocal', -1, PARAM_INT);
if ($uselocal == -1) {
if (isset($SESSION->langtranslateintolocal)) {
@@ -70,6 +79,9 @@
$strlangpackmaintaining = get_string('langpackmaintaining', 'admin');
$strnomissingstrings = get_string('nomissingstrings', 'admin');
$streditingnoncorelangfile = get_string('editingnoncorelangfile', 'admin');
$strlanglocalpackage = get_string('langlocalpackage', 'admin');
$strlangmasterpackage = get_string('langmasterpackage', 'admin');
$strlangmasterenglish = get_string('langmasterenglish', 'admin');
$currentlang = current_language();
@@ -82,11 +94,13 @@
case "compare":
$title = $streditstrings;
break;
case "helpfiles":
$title = $stredithelpdocs;
default:
$title = $strlanguage;
break;
}
$navlinks[] = array('name' => $strlanguage, 'link' => "$CFG->wwwroot/admin/lang.php", 'type' => 'misc');
$navlinks[] = array('name' => $strlanguage, 'link' => "$CFG->wwwroot/$CFG->admin/lang.php", 'type' => 'misc');
$navigation = build_navigation($navlinks);
admin_externalpage_print_header();
@@ -106,24 +120,23 @@
}
if (has_capability('moodle/site:langeditlocal', $context, $USER->id, false)) {
$firstrow[] = new tabobject('uselocal',
$CFG->wwwroot."/admin/lang.php?mode=$mode&amp;currentfile=$currentfile&amp;uselocal=1",
"$CFG->wwwroot/$CFG->admin/lang.php?mode=$mode&amp;currentfile=$currentfile&amp;uselocal=1",
$strlocalstringcustomization );
}
if (has_capability('moodle/site:langeditmaster', $context, $USER->id, false)) {
$firstrow[] = new tabobject('usemaster',
$CFG->wwwroot."/admin/lang.php?mode=$mode&amp;currentfile=$currentfile&amp;uselocal=0",
"$CFG->wwwroot/$CFG->admin/lang.php?mode=$mode&amp;currentfile=$currentfile&amp;uselocal=0",
$strlangpackmaintaining );
}
$secondrow[] = new tabobject('missing', $CFG->wwwroot.'/admin/lang.php?mode=missing', $strmissingstrings );
$secondrow[] = new tabobject('compare', $CFG->wwwroot.'/admin/lang.php?mode=compare', $streditstrings );
// TODO
// langdoc.php functionality is planned to be merged into lang.php
$secondrow[] = new tabobject('langdoc', $CFG->wwwroot.'/admin/langdoc.php', $stredithelpdocs );
$secondrow[] = new tabobject('missing', "$CFG->wwwroot/$CFG->admin/lang.php?mode=missing", $strmissingstrings );
$secondrow[] = new tabobject('compare', "$CFG->wwwroot/$CFG->admin/lang.php?mode=compare", $streditstrings );
$secondrow[] = new tabobject('helpfiles', "$CFG->wwwroot/$CFG->admin/lang.php?mode=helpfiles", $stredithelpdocs );
$tabs = array($firstrow, $secondrow);
print_tabs($tabs, $currenttab, $inactive, $activated);
if (!$mode) {
// TODO this is a very nice place to put some translation statistics
print_box_start();
$currlang = current_language();
$langs = get_list_of_languages(false, true);
@@ -143,17 +156,30 @@
$langdir = "$langbase/$currentlang";
}
$locallangdir = "$langbase/{$currentlang}_local";
$saveto = $uselocal ? $locallangdir : $langdir;
// get the list of all English stringfiles
$stringfiles = lang_standard_locations();
if (LANG_SEARCH_EXTRA) {
$stringfiles += lang_extra_locations();
}
if (count($stringfiles) == 0) {
error("Could not find English language pack!");
if (($mode == 'missing') || ($mode == 'compare')) {
// get the list of all English stringfiles
$stringfiles = lang_standard_locations();
if (LANG_SEARCH_EXTRA) {
$stringfiles += lang_extra_locations();
}
if (count($stringfiles) == 0) {
error("Could not find English language pack!");
}
} elseif ($mode == 'helpfiles') {
$helpfiles = lang_help_standard_locations();
if (LANG_SEARCH_EXTRA) {
$helpfiles += lang_help_extra_locations();
}
if (count($helpfiles) == 0) {
error("Could not find help files in the English language pack!");
}
}
if ($mode == "missing") {
if ($mode == 'missing') {
if (!file_exists($langdir)) {
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
}
@@ -200,7 +226,7 @@
}
// $enstring = English strings distributed either in the core space or in plugin space
include($enfilepath);
$enstring = $string;
$enstring = isset($string) ? $string : array();
unset($string);
ksort($enstring);
@@ -209,7 +235,7 @@
if (file_exists($lcfilepath)) {
include($lcfilepath);
$localfileismissing = 0;
if (is_array($string)) {
if (isset($string) && is_array($string)) {
$lcstring = $string;
}
unset($string);
@@ -265,8 +291,11 @@
$missingcounter++;
$totalcounter->missing++;
}
if (LANG_LINK_MISSING_STRINGS && $missingstring) {
$missinglinkstart = "<a href=\"lang.php?mode=compare&amp;currentfile=$filename#missing$missingcounter\">";
if ($translationsdiffer) {
$missingcounter++;
}
if (LANG_LINK_MISSING_STRINGS && ($missingstring || $translationsdiffer)) {
$missinglinkstart = "<a href=\"lang.php?mode=compare&amp;currentfile=$filename#$key\">";
$missinglinkend = '</a>';
} else {
$missinglinkstart = '';
@@ -334,7 +363,7 @@
notice(get_string("languagegood"), "lang.php" );
}
} else if ($mode == "compare") {
} else if ($mode == 'compare') {
if (!file_exists($langbase) ){
if (!lang_make_directory($langbase) ){
@@ -410,7 +439,7 @@
if (isset($_POST['currentfile'])){ // Save a file
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
$newstrings = array();
@@ -436,7 +465,7 @@
}
if (lang_save_file($saveinto, $currentfile, $newstrings, $uselocal, $packstring)) {
notify(get_string("changessaved")." ($saveinto/$currentfile)", "green");
notify(get_string("changessaved")." ($saveinto/$currentfile)", "notifysuccess");
} else {
error("Could not save the file '$saveinto/$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
}
@@ -458,20 +487,16 @@
}
$menufiles[$item_key] = $item_label;
}
$selectionlabel = '<code class="path">';
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/</code>';
popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=compare&amp;currentfile=", $menufiles, "choosefile",
$currentfile, $strchoosefiletoedit);
echo '<div class="filestorageinfobox">';
echo $strfilestoredin;
echo '<code class="path">';
echo $uselocal ? "{$currentlang}_local" : $currentlang;
echo '</code>';
$currentfile, $strchoosefiletoedit, '', '', false, 'self', $selectionlabel);
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
echo '</div>';
print_box_end();
if ($currentfile <> '') {
$saveto = $uselocal ? $locallangdir : $langdir;
error_reporting(0);
if (!isset($editable) || $editable) {
if (!file_exists("$saveto/$currentfile")) {
@@ -498,9 +523,9 @@
unset($string);
include($enfilepath);
$enstring = $string;
$enstring = isset($string) ? $string : array();
//
// TODO/FIXME: IMHO following should not be here as the strings have moved into langconfig.php -- mudrd8mz
// Following strings have moved into langconfig.php, but keep the here for backward compatibility
//
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
@@ -531,7 +556,7 @@
$linescounter++ ;
if (LANG_SUBMIT_REPEAT && $editable && $linescounter % LANG_SUBMIT_REPEAT_EVERY == 0) {
$o .= '<tr><td>&nbsp;</td><td><br />';
$o .= '<input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
$o .= '<input type="submit" tabindex="'.$missingcounter.'" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
$o .= '<br />&nbsp;</td></tr>';
}
$envalue = nl2br(htmlspecialchars($envalue));
@@ -547,7 +572,7 @@
}
$o .= '">';
$o .= '<td dir="ltr" lang="en">';
$o .= '<span class="stren">'.$envalue.'</span>';
$o .= '<span id="'.$key.'" class="stren">'.$envalue.'</span>';
$o .= '<br />'."\n";
$o .= '<span class="strkey">'.$key.'</span>';
$o .= '</td>'."\n";
@@ -565,16 +590,19 @@
$value2 = lang_fix_value_from_file($localstring[$key]);
}
error_reporting($CFG->debug);
// Color highlighting:
// red #ef6868 - translation missing in both system and local pack
// yellow #feff7f - translation missing in system pack but is translated in local
// green #AAFFAA - translation present in both system and local but is different
$missingtarget = '';
$missingnext = '';
$missingprev = '';
$cellcolour = '';
$usetabindex = false;
if (!$value) {
// the string is not present in the pack being processed
if (!$value2) {
$cellcolour = 'class="bothmissing"';
$usetabindex = true;
} else {
$cellcolour = 'class="mastermissing"';
$usetabindex = true;
}
$missingcounter++;
if (LANG_DISPLAY_MISSING_LINKS) {
@@ -583,20 +611,21 @@
'<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
} else {
$missingtarget = '';
$missingnext = '';
$missingprev = '';
}
} else {
if ($value <> $value2 && $value2 <> '') {
// the string is translated in the pack being processed
if ($value <> $value2 && ($value2 <> '')) {
$cellcolour = 'class="localdifferent"';
} else {
$cellcolour = '';
$usetabindex = true;
$missingcounter++;
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
'<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
}
}
$missingtarget = '';
$missingnext = '';
$missingprev = '';
}
if ($editable) {
@@ -611,14 +640,23 @@
$valuelen = strlen($envalue);
}
$cols=40;
if ($usetabindex) {
$tabindex = 'tabindex="'.$missingcounter.'"';
} else {
$tabindex = '';
}
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
$o .= '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
$o .= '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="'.$rows.'" '.$tabindex.'>'.$value.'</textarea>'."\n";
} else {
if ($valuelen) {
$cols = $valuelen + 5;
}
$o .= '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" />';
if (LANG_ALWAYS_TEXTAREA) {
$o .= '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="1" '.$tabindex.'>'.$value.'</textarea>'."\n";
} else {
$o .= '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" '.$tabindex.' />';
}
}
if ($value2 <> '' && $value <> $value2) {
$o .= '<br /><span style="font-size:small">'.$value2.'</span>';
@@ -635,7 +673,7 @@
$o .= '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
$o .= '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
$o .= '<input type="hidden" name="mode" value="compare" />';
$o .= '<input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
$o .= '<input type="submit" name="update" tabindex="'.$missingcounter.'" value="'.get_string('savechanges').': '.$currentfile.'" />';
$o .= '</td></tr>';
}
$o .= '</table>';
@@ -660,7 +698,212 @@
// no $currentfile specified
// no useful information to display - maybe some help? instructions?
}
}
} elseif ($mode == 'helpfiles') {
$saveto = $saveto.'/help'; // the edited content will be saved to
$enlangdir = $enlangdir.'/help'; // English master help files localtion
$langdir = $langdir.'/help'; // current language master help files location
$locallangdir = $locallangdir.'/help'; // local modifications of help files location
$altdir = $uselocal ? $langdir : $locallangdir; // alternative to $saveto
$fileeditorrows = 10; // number of textareas' rows
$fileeditorcols = 100; // dtto cols
$filemissingmark = ' (***)'; // mark to add to non-existing or zero-length files
$fileoldmark = ' (old?)'; // mark to add to filenames in selection form if the English version is newer
$filetemplate = ''; // template for new files, e.g. CVS identification
if (isset($_POST['currentfile'])) { // Save a file
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', 'error');
}
if (lang_help_save_file($saveto, $currentfile, $_POST['filedata'])) {
notify(get_string("changessaved")." ($saveto/$currentfile)", "notifysuccess");
} else {
error("Could not save the file '$currentfile'!", "lang.php?mode=helpfiles&amp;currentfile=$currentfile&amp;sesskey=$USER->sesskey");
}
}
print_box_start('generalbox editstrings');
$menufiles = array();
$menufiles_coregrp = 1;
$origlocation = ''; // the location of the currentfile's English source will be stored here
$origplugin = ''; // dtto plugin
foreach ($helpfiles as $helppath => $helpfile) {
$item_key = $helpfile['filename'];
$item_label = $helpfile['filename'];
if ((!file_exists($saveto.'/'.$helpfile['filename'])) || (filesize($saveto.'/'.$helpfile['filename']) == 0)) {
$item_label .= $filemissingmark;
} else {
if (filemtime($saveto.'/'.$helpfile['filename']) < filemtime($helppath)) {
$item_label .= $fileoldmark;
}
if ($helpfile['location'] != '' && $helpfile['plugin'] != '') {
$item_label .= ' ('.$helpfile['location'].'/'.$helpfile['plugin'].')';
if ($menufiles_coregrp == 1) {
$menufiles['extra'] = '------------';
$menufiles_coregrp = 0;
}
}
}
$menufiles[$item_key] = $item_label;
if ($currentfile == $helpfile['filename']) {
$origlocation = $helpfile['location'];
$origplugin = $helpfile['plugin'];
}
}
$selectionlabel = '<code class="path">';
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/help/</code>';
popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=helpfiles&amp;currentfile=", $menufiles, "choosefile",
$currentfile, $strchoosefiletoedit, '', '', false, 'self', $selectionlabel);
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
print_box_end();
if (!empty($currentfile)) {
if (!file_exists("$saveto/$currentfile")) {
$dbg .= "File does not exist: $saveto/$currentfile\n";
//check if directory exist
if (!file_exists(dirname("$saveto/$currentfile"))) {
if(!lang_make_directory(dirname("$saveto/$currentfile"))) {
echo ('Cannot create directory: '.dirname("$saveto/$currentfile"));
}
}
//
// file doesn't exist - let's check webserver's permission to create it
//
if (!@touch("$saveto/$currentfile")) {
//
// webserver is unable to create new file
//
notify(get_string('filemissing', '', "$saveto/$currentfile" ));
notify(get_string('makeeditable', '', "$saveto/$currentfile"));
$editable = false;
} else {
//
// webserver can create new file - we can delete it now and let
// it create again if its filesize() > 0
//
$editable = true;
unlink("$saveto/$currentfile");
}
} elseif (is_writable("$saveto/$currentfile")) {
$editable = true;
} else {
//
// file exists but it is not writeable by web server process :-(
//
$editable = false;
notify(get_string('makeeditable', '', "$saveto/$currentfile"));
}
// master en_utf8 in dataroot is not editable
if ((!$uselocal) && ($currentlang == 'en_utf8')) {
$editable = false;
}
echo '<div>';
if ($uselocal) {
$strsavetotitle = $strlanglocalpackage . helpbutton('langpackages', $strlanglocalpackage, 'moodle', true, false, '', true);
$straltdirtitle = $strlangmasterpackage . helpbutton('langpackages', $strlangmasterpackage, 'moodle', true, false, '', true);
} else {
$straltdirtitle = $strlanglocalpackage . helpbutton('langpackages', $strlanglocalpackage, 'moodle', true, false, '', true);
$strsavetotitle = $strlangmasterpackage . helpbutton('langpackages', $strlangmasterpackage, 'moodle', true, false, '', true);
}
if ($editable) {
// generate an editor for the current help file in $saveto
echo '<fieldset><legend>'.$strsavetotitle.'</legend>';
echo "<form id=\"helpfileeditor\" action=\"lang.php\" method=\"post\">";
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
echo '<input type="hidden" name="mode" value="helpfiles" />';
echo "<div align=\"center\">\n";
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">";
if (file_exists("$saveto/$currentfile")) {
echo htmlspecialchars(file_get_contents("$saveto/$currentfile"));
} else {
echo ($filetemplate);
}
echo "</textarea>\n</div>\n";
echo '<div align="center"><input type="submit" value="'.get_string('savechanges').'" /></div>';
echo '</form>';
$preview_url = lang_help_preview_url($currentfile, !$uselocal);
if ($preview_url) {
link_to_popup_window($preview_url, 'popup', get_string('preview'));
}
echo '</fieldset>';
}
if (is_readable("$altdir/$currentfile")) {
// show the content of the same help file in alternative location
echo '<fieldset><legend>'.$straltdirtitle.'</legend>';
echo "<div align=\"center\">\n";
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
if (file_exists("$altdir/$currentfile")) {
echo htmlspecialchars(file_get_contents("$altdir/$currentfile"));
} else {
echo ($filetemplate);
}
echo "</textarea>\n</div>\n";
$preview_url = lang_help_preview_url($currentfile, $uselocal);
if ($preview_url) {
link_to_popup_window($preview_url, 'popup', get_string('preview'));
}
echo '</fieldset>';
}
// show the content of the original English file either in core space or plugin space
if ($origlocation != '' && $origplugin != '') {
// non-core help file
$ensrc = "$CFG->dirroot/$origlocation/$origplugin/lang/en_utf8/help/$currentfile";
} else {
// core help file
$ensrc = "$enlangdir/$currentfile";
}
if (is_readable($ensrc)) {
echo '<fieldset><legend>'.$strlangmasterenglish;
helpbutton('langpackages', $strlangmasterenglish);
echo '</legend>';
echo "<div align=\"center\">\n<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
echo htmlspecialchars(file_get_contents($ensrc));
echo "</textarea>\n</div>\n";
$preview_url = lang_help_preview_url($currentfile, true, 'en_utf8'); // do not display en_utf8_local
if ($preview_url) {
link_to_popup_window($preview_url, 'popup', get_string('preview'));
}
echo '</fieldset>';
}
echo '</div>'; // translator box
error_reporting($CFG->debug);
}
if (false && $CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) ) {
echo '<hr />';
print_heading('Debugging info');
echo '<pre class="notifytiny">';
print_r($dbg);
print_r("\n\$currentfile = $currentfile");
print_r("\n\$enlangdir = $enlangdir");
print_r("\n\$langdir = $langdir");
print_r("\n\$locallangdir = $locallangdir");
print_r("\n\$saveto = $saveto");
print_r("\n\$altdir = $altdir");
print_r("\n\$origlocation = $origlocation");
print_r("\n\$origplugin = $origplugin");
print_r("\n\$ensrc = $ensrc");
print_r("\n\$helpfiles = ");
print_r($helpfiles);
echo '</pre>';
}
} // fi $mode == 'helpfiles'
admin_externalpage_print_footer();
@@ -781,6 +1024,8 @@ function lang_fix_value_before_save($value='') {
/**
* Try and create a new language directory.
*
* Uses PHP>=5.0 syntax of mkdir and tries to create directories recursively.
*
* @uses $CFG
* @param string $directory full path to the directory under $langbase
* @return string|false Returns full path to directory if successful, false if not
@@ -789,7 +1034,7 @@ function lang_make_directory($dir, $shownotices=true) {
global $CFG;
umask(0000);
if (! file_exists($dir)) {
if (! @mkdir($dir, $CFG->directorypermissions)) {
if (! @mkdir($dir, $CFG->directorypermissions, true)) { // recursive=true; PHP>=5.0 needed
return false;
}
//@chmod($dir, $CFG->directorypermissions); // Just in case mkdir didn't do it
@@ -993,4 +1238,141 @@ function lang_get_file_info($currentfile, $stringfiles) {
}
}
/**
* Returns all English help files in the standard lang/en_utf8/help location.
*
* Core help files should always be stored here and not in the module space (MDL-10920).
* The English version of the file may be found in
* $CFG->dirroot/lang/en_utf8/help/filename
* The localised version of the found file should be saved into
* $CFG->dataroot/lang/currentlang[_local]/help/filename
* where "filename" is returned as a part of the file record.
*
* @return array Array of a file information. Compatible format with {@link lang_extra_locations()}
*/
function lang_help_standard_locations() {
global $CFG;
$files = array();
// Standard location of master English help files.
$places = array($CFG->dirroot.'/lang/en_utf8/help');
foreach ($places as $place) {
foreach (get_directory_list($place, 'CVS') as $file) {
if ((substr($file, -5) == '.html') || (substr($file, -4) == '.txt' )) {
$fullpath = $place.'/'.$file;
$files[$fullpath] = array(
'filename' => $file,
'location' => '',
'plugin' => '',
'prefix' => '',
);
}
}
}
return $files;
}
/**
* Returns all English help files in non-standard location.
*
* Searches for lang/en_utf8/help/* files in various types of plugins (blocks, database presets, question types,
* 3rd party modules etc.) and returns an array of found files details.
*
* The English version of the file may be found in
* $CFG->dirroot/location/plugin/lang/en_utf8/help/filename
* The localised version of the found file should be saved into
* $CFG->dataroot/lang/currentlang[_local]/help/prefix_plugin/filename (XXX is "prefix" here right?)
* where "location", "plugin", "prefix" and "filename" are returned as a part of the file record.
*
* @return array Array of a file information. Compatible format with {@link lang_standard_locations()}
*/
function lang_help_extra_locations() {
global $CFG;
$files = array();
$places = places_to_search_for_lang_strings();
foreach ($places as $prefix => $directories) {
if ($prefix != '__exceptions') {
foreach ($directories as $directory) {
foreach (get_list_of_plugins($directory) as $plugin) {
$enlangdirlocation = $CFG->dirroot.'/'.$directory.'/'.$plugin.'/lang/en_utf8/help';
foreach (get_directory_list($enlangdirlocation, 'CVS') as $file) {
if ((substr($file, -5) == '.html') || (substr($file, -4) == '.txt' )) {
$fullpath = $enlangdirlocation.'/'.$file;
$files[$fullpath] = array(
'filename' => $file,
'location' => $directory,
'plugin' => $plugin,
'prefix' => $prefix,
);
}
}
}
}
}
}
return $files;
}
/**
* Return a preview URL for help file, if available.
*
* @param string $currentfile The relative path to the help file, e.g. "assignment/types.html" - MDL-12291
* @param bool $skiplocal Force displaying the helpfile from a master lang pack
* @param string $forcelang Force language of the help, e.g. "en_utf8"
* @return string $url
*/
function lang_help_preview_url($currentfile, $skiplocal=false, $forcelang = '') {
$currentpathexp = explode('/', $currentfile);
if (count($currentpathexp) > 1) {
$url = '/help.php?module='.implode('/',array_slice($currentpathexp,0,count($currentpathexp)-1)).'&amp;file='.end($currentpathexp);
} else {
$url = '/help.php?module=moodle&amp;file='.$currentfile;
}
if ($skiplocal) {
$url .= '&amp;skiplocal=1';
}
if ($forcelang) {
$url .= '&amp;forcelang='.$forcelang;
}
return $url;
}
/**
* Saves (overwrites) translated help file.
*
* @param string $helproot The path to the "help" folder
* @param string $file The relative path to the html help file
* @param string $content HTML data to be saved
* @return bool False if save failed, true otherwise
*/
function lang_help_save_file($helproot, $file, $content) {
global $CFG, $USER;
$content = str_replace("\r", "",$content); // Remove linefeed characters
$content = preg_replace("/\n{3,}/", "\n\n", $content); // Collapse runs of blank lines
$content = trim($content); // Delete leading/trailing whitespace
if (is_readable("$helproot/$file") && filesize("$helproot/$file") > 0 && $content == '') {
notify(get_string('langrmyourself', 'admin'));
return true;
}
error_reporting(0);
if (!$f = fopen("$helproot/$file","w")) {
error_reporting($CFG->debug);
return false;
}
error_reporting($CFG->debug);
fwrite($f, stripslashes($content));
fclose($f);
// Remove file if its empty
if (filesize("$helproot/$file") == 0) {
unlink("$helproot/$file");
}
return true;
}
?>
+4 -1
View File
@@ -33,6 +33,9 @@
admin_externalpage_print_header();
notify('NOTICE: This interface is obsolete now and will be removed. You should use
improved <a href="lang.php?mode=helpfiles">lang.php</a> interface.');
$currentlang = current_language();
$langdir = "$CFG->dataroot/lang/$currentlang";
$enlangdir = "$CFG->dirroot/lang/en_utf8";
@@ -243,7 +246,7 @@ function langdoc_preview_url($currentfile) {
$currentfile = substr($currentfile, 5);
$currentpathexp = explode('/', $currentfile);
if (count($currentpathexp) > 1) {
$url = '/help.php?module='.$currentpathexp[0].'&amp;file='.$currentpathexp[1];
$url = '/help.php?module='.implode('/',array_slice($currentpathexp,0,count($currentpathexp)-1)).'&amp;file='.end($currentpathexp);
} else {
$url = '/help.php?module=moodle&amp;file='.$currentfile;
}
+254 -214
View File
@@ -6,99 +6,98 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/componentlib.class.php');
admin_externalpage_setup('langimport');
$mode = optional_param('mode', 0, PARAM_INT); //phase
$pack = optional_param('pack', '', PARAM_FILE); //pack to install
$pack = optional_param('pack', array(), PARAM_FILE); //pack to install
$displaylang = $pack;
$uninstalllang = optional_param('uninstalllang', '', PARAM_FILE);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$sitelang = optional_param('sitelangconfig', '', PARAM_FILE);
define('INSTALLATION_OF_SELECTED_LANG', 2);
define('CHANGE_SITE_LANG', 3);
define('DELETION_OF_SELECTED_LANG', 4);
define('UPDATE_ALL_LANG', 5);
$strlang = get_string('langimport','admin');
$strlanguage = get_string("language");
$strthislanguage = get_string("thislanguage");
$title = $strlang;
admin_externalpage_print_header();
$strlang = get_string('langimport','admin');
$strlanguage = get_string('language');
$strthislanguage = get_string('thislanguage');
$title = $strlang;
//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.');
error('Language cache can not be deleted, please fix permissions in dataroot/cache/languages!');
}
get_list_of_languages(true); //refresh lang cache
$notice_ok = array();
$notice_error = array();
switch ($mode){
case INSTALLATION_OF_SELECTED_LANG: ///installation of selected language pack
if (confirm_sesskey()) {
if (confirm_sesskey() and !empty($pack)) {
set_time_limit(0);
@mkdir ($CFG->dataroot.'/temp/'); //make it in case it's a fresh install, it might not be there
@mkdir ($CFG->dataroot.'/lang/');
require_once($CFG->libdir.'/componentlib.class.php');
if ($cd = new component_installer('http://download.moodle.org', 'lang16',
$pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
switch ($status) {
if (is_array($pack)) {
$packs = $pack;
} else {
$packs = array($pack);
}
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
error(get_string($cd->get_error(), 'error'));
}
break;
foreach ($packs as $pack) {
if ($cd = new component_installer('http://download.moodle.org', 'lang16',
$pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
switch ($status) {
case INSTALLED:
get_list_of_languages(true); //refresh lang cache
redirect('langimport.php', get_string('langpackupdated','admin',$pack), -1);
break;
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new object();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
print_error($cd->get_error(), 'error', 'langimport.php', $a);
} else {
print_error($cd->get_error(), 'error', 'langimport.php');
}
break;
case UPTODATE:
break;
case COMPONENT_INSTALLED:
$notice_ok[] = get_string('langpackinstalled','admin',$pack);
break;
case COMPONENT_UPTODATE:
break;
}
} else {
notify('Had an unspecified error with the component installer, sorry.');
}
} else {
notify('Had an unspecified error with the component installer, sorry.');
}
}
break;
case CHANGE_SITE_LANG: //change site language
if (confirm_sesskey()) {
$langconfig = get_record('config','name','lang');
$langconfig->value = $sitelang;
if (!empty($sitelang) && update_record('config',$langconfig)){
redirect('langimport.php', get_string('sitelangchanged','admin'));
} else {
error('Could not update the default site language!');
}
}
break;
case DELETION_OF_SELECTED_LANG: //delete a directory(ies) containing a lang pack completely
if (!$confirm && confirm_sesskey()) {
if ($uninstalllang == 'en_utf8') {
$notice_error[] = 'en_utf8 can not be uninstalled!';
} else if (!$confirm && confirm_sesskey()) {
admin_externalpage_print_header();
notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang),
'langimport.php?mode=4&amp;uninstalllang='.$uninstalllang.'&amp;confirm=1&amp;sesskey='.sesskey(),
'langimport.php?mode='.DELETION_OF_SELECTED_LANG.'&amp;uninstalllang='.$uninstalllang.'&amp;confirm=1&amp;sesskey='.sesskey(),
'langimport.php');
print_footer();
die;
} else if (confirm_sesskey()) {
if ($uninstalllang == 'en_utf8') {
error ('en_utf8 can not be uninstalled!');
}
$dest1 = $CFG->dataroot.'/lang/'.$uninstalllang;
$dest2 = $CFG->dirroot.'/lang/'.$uninstalllang;
$rm1 = false;
@@ -112,18 +111,18 @@
get_list_of_languages(true); //refresh lang cache
//delete the direcotries
if ($rm1 or $rm2) {
redirect('langimport.php', get_string('langpackremoved','admin'), 3);
$notice_ok[] = get_string('langpackremoved','admin');
} else { //nothing deleted, possibly due to permission error
error('An error has occurred, language pack is not completely uninstalled, please check file permissions');
$notice_error[] = 'An error has occurred, language pack is not completely uninstalled, please check file permissions';
}
}
break;
case UPDATE_ALL_LANG: //1 click update for all updatable language packs
set_time_limit(0);
//0th pull a list from download.moodle.org,
//key = langname, value = md5
$source = 'http://download.moodle.org/lang16/languages.md5';
$md5array = array();
$updated = 0; //any packs updated?
$alllangs = array_keys(get_list_of_languages(false, true)); //get all available langs
@@ -131,8 +130,8 @@
$packs = array(); //all the packs that needs updating
if (!$availablelangs = proxy_url($source)) {
error ('can not read from course');
if (!$availablelangs = get_remote_list_of_languages()) {
print_error('cannotdownloadlanguageupdatelist');
}
//and build an associative array
@@ -140,8 +139,12 @@
$md5array[$alang[0]] = $alang[1];
}
//filtering out non-16 packs
//filtering out non-16 and unofficial packs
foreach ($alllangs as $clang) {
if (!array_key_exists($clang, $md5array)) {
$notice_ok[] = get_string('langpackupdateskipped', 'admin', $clang);
continue;
}
$dest1 = $CFG->dataroot.'/lang/'.$clang;
$dest2 = $CFG->dirroot.'/lang/'.$clang;
@@ -163,6 +166,7 @@
if ($pack == 'en_utf8') { // no update for en_utf8
continue;
}
//1. delete old director(ies)
$dest1 = $CFG->dataroot.'/lang/'.$pack;
@@ -170,38 +174,40 @@
$rm1 = false;
$rm2 = false;
if (file_exists($dest1)) {
$rm1 = remove_dir($dest1);
if (!remove_dir($dest1)) {
$notice_error[] = 'Could not delete old directory '.$dest1.', update of '.$pack.' failed, please check permissions.';
continue;
}
}
if (file_exists($dest2)) {
$rm2 = remove_dir($dest2);
}
if (!($rm1 || $rm2)) {
error ('could not delete old directory, update failed');
if (!remove_dir($dest2)) {
$notice_error[] = 'Could not delete old directory '.$dest2.', update of '.$pack.' failed, please check permissions.';
continue;
}
}
//2. copy & unzip into new
require_once($CFG->libdir.'/componentlib.class.php');
if ($cd = new component_installer('http://download.moodle.org', 'lang16',
$pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
switch ($status) {
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
print_error($cd->get_error(), 'error', "", $a); // not probable
} else {
error(get_string($cd->get_error(), 'error'));
print_error($cd->get_error(), 'error'); // not probable
}
break;
case UPTODATE:
case COMPONENT_UPTODATE:
//Print error string or whatever you want to do
break;
case INSTALLED:
notify(get_string('langpackupdated','admin',$pack), 'notifysuccess');
case COMPONENT_INSTALLED:
$notice_ok[] = get_string('langpackupdated', 'admin', $pack);
$updated = true;
//Print/do whatever you want
break;
@@ -213,131 +219,178 @@
}
if ($updated) {
notice(get_string('langupdatecomplete','admin'), 'langimport.php');
$notice_ok[] = get_string('langupdatecomplete','admin');
} else {
notice(get_string('nolangupdateneeded','admin'), 'langimport.php');
$notice_ok[] = get_string('nolangupdateneeded','admin');
}
break;
default: //display choice mode
$source = 'http://download.moodle.org/lang16/languages.md5';
$remote = 0; //flag for reading from remote or local
if ($availablelangs = proxy_url($source)) {
$remote = 1;
} else {
$availablelangs = get_local_list_of_languages();
}
/*
if ($fp = fopen($source, 'r')){ /// attempt to get the list from Moodle.org.
while(!feof ($fp)) {
$availablelangs[] = split(',', fgets($fp,1024));
}
$remote = 1; //can read from download.moodle.org
} else { /// fopen failed, we find local copy of list.
$availablelangs = get_local_list_of_languages();
}
*/
if (!$remote) {
print_box_start();
print_string('remotelangnotavailable','admin',$CFG->dataroot.'/lang/');
print_box_end();
}
print_box_start();
echo '<table summary="">';
echo '<tr><td align="center" valign="top">';
echo '<form id="uninstallform" action="langimport.php?mode=4" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
$installedlangs = get_list_of_languages(false, true);
/// display installed langs here
echo '<label for="uninstalllang">'.get_string('installedlangs','admin')."</label><br />\n";
echo '<select name="uninstalllang" id="uninstalllang" size="15">';
foreach ($installedlangs as $clang =>$ilang){
echo '<option value="'.$clang.'">'.$ilang.'</option>';
}
echo '</select>';
echo '<br /><input type="submit" value="'.get_string('uninstall','admin').'" />';
echo '</fieldset>';
echo '</form>';
echo '<form id="updateform" action="langimport.php?mode=5" method="post">';
echo '<div>';
echo '<br /><input type="submit" value="'.get_string('updatelangs','admin').'" />';
echo '</div>';
echo '</form>';
/// Display option to change site language
/// display to be installed langs here
echo '</td><td align="center" valign="top">';
//availabe langs table
$empty = 1; //something to pring
/// if this language pack is not already installed, then we allow installation
echo '<form id="installform" method="post" action="langimport.php?mode=2">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
echo '<label for="pack">'.get_string('availablelangs','admin')."</label><br />\n";
if ($remote) {
echo '<select name="pack" id="pack" size="15">';
}
foreach ($availablelangs as $alang) {
if (trim($alang[0]) != "en_utf8") {
if ($remote){
if (substr($alang[0], -5) == '_utf8') { //Remove the _utf8 suffix from the lang to show
$shortlang = substr($alang[0], 0, -5);
} else {
$shortlang = $alang[0];
}
if (!is_installed_lang($alang[0], $alang[1])){ //if not already installed
echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$shortlang.')</option>';
}
} else { //print list in local format, and instruction to install
echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a></td></tr>';
}
$empty = 0;
}
}
if ($remote) {
echo '</select>';
echo '<br /><input type="submit" value="'.$THEME->larrow.' '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
if ($empty) {
echo '<br />';
print_string('nolanguagetodownload','admin');
}
//close available langs table
echo '</td></tr></table>';
print_simple_box_end();
break;
} //close of main switch
admin_externalpage_print_header();
$installedlangs = get_list_of_languages(true, true);
$missingparents = array();
$oldlang = isset($SESSION->lang) ? $SESSION->lang : null; // override current lang
foreach($installedlangs as $l=>$unused) {
$SESSION->lang = $l;
$parent = get_string('parentlanguage');
if ($parent == 'en_utf8') {
continue;
}
if (strpos($parent, '[[') !== false) {
continue; // no parent
}
if (!isset($installedlangs[$parent])) {
$missingparents[$l] = $parent;
}
}
if (isset($oldlang)) {
$SESSION->lang = $oldlang;
} else {
unset($SESSION->lang);
}
if ($availablelangs = get_remote_list_of_languages()) {
$remote = 1;
} else {
$remote = 0; //flag for reading from remote or local
$availablelangs = get_local_list_of_languages();
}
if (!$remote) {
print_box_start();
print_string('remotelangnotavailable', 'admin', $CFG->dataroot.'/lang/');
print_box_end();
}
if ($notice_ok) {
$info = implode('<br />', $notice_ok);
notify($info, 'notifysuccess');
}
if ($notice_error) {
$info = implode('<br />', $notice_error);
notify($info, 'notifyproblem');
}
if ($missingparents) {
foreach ($missingparents as $l=>$parent) {
$a = new object();
$a->lang = $installedlangs[$l];
$a->parent = $parent;
foreach ($availablelangs as $alang) {
if ($alang[0] == $parent) {
if (substr($alang[0], -5) == '_utf8') { //Remove the _utf8 suffix from the lang to show
$shortlang = substr($alang[0], 0, -5);
} else {
$shortlang = $alang[0];
}
$a->parent = $alang[2].' ('.$shortlang.')';
}
}
$info = get_string('missinglangparent', 'admin', $a);
notify($info, 'notifyproblem');
}
}
print_box_start();
echo '<table summary="">';
echo '<tr><td align="center" valign="top">';
echo '<form id="uninstallform" action="langimport.php?mode='.DELETION_OF_SELECTED_LANG.'" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
/// display installed langs here
echo '<label for="uninstalllang">'.get_string('installedlangs','admin')."</label><br />\n";
echo '<select name="uninstalllang" id="uninstalllang" size="15">';
foreach ($installedlangs as $clang =>$ilang){
echo '<option value="'.$clang.'">'.$ilang.'</option>';
}
echo '</select>';
echo '<br /><input type="submit" value="'.get_string('uninstall','admin').'" />';
echo '</fieldset>';
echo '</form>';
if ($remote) {
echo '<form id="updateform" action="langimport.php?mode='.UPDATE_ALL_LANG.'" method="post">';
echo '<div>';
echo '<br /><input type="submit" value="'.get_string('updatelangs','admin').'" />';
echo '</div>';
echo '</form>';
}
/// Display option to change site language
/// display to be installed langs here
echo '</td><td align="center" valign="top">';
//availabe langs table
$empty = 1; //something to pring
/// if this language pack is not already installed, then we allow installation
echo '<form id="installform" method="post" action="langimport.php?mode='.INSTALLATION_OF_SELECTED_LANG.'">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
echo '<label for="pack">'.get_string('availablelangs','admin')."</label><br />\n";
if ($remote) {
echo '<select name="pack[]" id="pack" size="15" multiple="multiple">';
}
foreach ($availablelangs as $alang) {
if ($alang[0] == '') {
continue;
}
if (trim($alang[0]) != "en_utf8") {
if ($remote) {
if (substr($alang[0], -5) == '_utf8') { //Remove the _utf8 suffix from the lang to show
$shortlang = substr($alang[0], 0, -5);
} else {
$shortlang = $alang[0];
}
if (!is_installed_lang($alang[0], $alang[1])){ //if not already installed
echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$shortlang.')</option>';
}
} else { //print list in local format, and instruction to install
echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a></td></tr>';
}
$empty = 0;
}
}
if ($remote) {
echo '</select>';
echo '<br /><input type="submit" value="'.$THEME->larrow.' '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
if ($empty) {
echo '<br />';
print_string('nolanguagetodownload','admin');
}
//close available langs table
echo '</td></tr></table>';
print_box_end();
admin_externalpage_print_footer();
/* returns a list of available language packs from a
/**
* Returns a list of available language packs from a
* local copy shipped with standard moodle distro
* this is for site that can't perform fopen
* this is for site that can't download components.
* @return array
*/
function get_local_list_of_languages() {
global $CFG;
$source = $CFG->wwwroot.'/lib/languages.md5';
$source = $CFG->dirroot.'/lib/languages.md5';
$availablelangs = array();
if ($fp = fopen($source, 'r')){
if ($fp = fopen($source, 'r')) {
while(!feof ($fp)) {
$availablelangs[] = split(',', fgets($fp,1024));
}
@@ -345,7 +398,8 @@
return $availablelangs;
}
/* checks the md5 of the zip file, grabbed from download.moodle.org,
/**
* checks the md5 of the zip file, grabbed from download.moodle.org,
* against the md5 of the local language file from last update
* @param string $lang
* @param string $md5check
@@ -360,40 +414,26 @@
return false;
}
//returns an array of languages, or false if can not read from source
//uses a socket if proxy is set as a config variable
function proxy_url($url) {
global $CFG;
/**
* Returns the latest list of available language packs from
* moodle.org
* @return array or false if can not download
*/
function get_remote_list_of_languages() {
$source = 'http://download.moodle.org/lang16/languages.md5';
$availablelangs = array();
if ($CFG->proxyhost && $CFG->proxyport) {
$proxy_fp = fsockopen($CFG->proxyhost, $CFG->proxyport);
if (!$proxy_fp) {
return false; //failed
}
fputs($proxy_fp, "GET $url HTTP/1.0\r\nHost: $CFG->proxyhost\r\n\r\n");
$headers_done = false;
while(!feof($proxy_fp)) {
$string = fgets($proxy_fp, 1024);
if(!$headers_done){
// A new line indicates end of HTTP headers
$headers_done = ("\r\n" == $string);
} else {
$availablelangs[] = split(',', $string);
if ($content = download_file_content($source)) {
$alllines = split("\n", $content);
foreach($alllines as $line) {
if (!empty($line)){
$availablelangs[] = split(',', $line);
}
}
fclose($proxy_fp);
return $availablelangs;
} else { //proxy not in use
if ($fp = fopen($url, 'r')){ /// attempt to get the list from Moodle.org.
while(!feof ($fp)) {
$availablelangs[] = split(',', fgets($fp,1024));
}
} else { /// fopen failed, return false.
return false;
}
} else {
return false;
}
return $availablelangs;
}
?>
+77
View File
@@ -0,0 +1,77 @@
#!/usr/bin/php
<?php
/*
* Utility to debug mailouts - will save the content of emails to a
* logfile instead of sending them out. Use it as a sendmail
* "stand-in" when testing mailouts.
*
* It is not Moodle specific - use it anywhere by setting the php
* "sendmail_path" setting to this file with a logfile parameter.
*
* - Set in php.ini (not settable in config.php):
* sendmail_path=/path-to-moodle/admin/mailout-debugger.php');
* Or from the commandline
* php -d sendmail_path='/path-to-moodle/admin/mailout-debugger.php' /path/to/cron.php
*
* - Create a file in admin called mailout-debugger.enable
* (this is a security check to prevent execution in prod environments)
* touch /path/to/moodle/admin/mailout-debugger.enable
*
* - Mark as executable: chmod ugo+rx mailout-debugger.php
*
* - Run your admin/cron.php
*
* - Read /tmp/moodle-mailout.log
*
*
* This script will create logfiles in /tmp/ or in $TMPDIR if set.
* On windows, use php -r 'print sys_get_temp_dir()' to see where the file is saved.
*/
// Security check.
if (!file_exists(dirname(__FILE__).'/mailout-debugger.enable')) {
mdie("Disabled.");
}
$tmpdir=sys_get_temp_dir(); // default
if (isset($_SERVER['REMOTE_ADDR'])) {
mdie("should not be called from web server!");
}
if (isset($_ENV['TMPDIR']) && is_dir($_ENV['TMPDIR'])) {
$tmpdir = $_ENV['TMPDIR'];
}
$tmpfile = $tmpdir . '/moodle-mailout.log';
$fh = fopen($tmpfile, 'a+', false)
or mdie("Error openning $tmpfile on append\n");
fwrite($fh, "==== ".strftime("%a %b %e %H:%M:%S %Y", time())." ====\n");
fwrite($fh, "==== Commandline: " . implode(' ',$argv) . "\n");
$stdin = fopen('php://stdin', 'r');
while ($line = fgets($stdin)) {
fwrite($fh, $line);
}
fwrite($fh, "\n");
fclose($fh);
fclose($stdin);
/**
* Print an error to STDOUT and exit with a non-zero code. For commandline scripts.
* Default errorcode is 1.
*
* Very useful for perl-like error-handling:
*
* do_somethting() or mdie("Something went wrong");
*
* @param string $msg Error message
* @param integer $errorcode Error code to emit
*
*/
function mdie($msg='', $errorcode=1) {
trigger_error($msg);
exit($errorcode);
}
?>
+6 -6
View File
@@ -19,7 +19,7 @@ admin_externalpage_setup('ssoaccesscontrol');
admin_externalpage_print_header();
if (!extension_loaded('openssl')) {
print_error('requiresopenssl', 'mnet', '', NULL, true);
print_error('requiresopenssl', 'mnet');
}
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
@@ -39,13 +39,13 @@ if (!empty($action) and confirm_sesskey()) {
// boot if insufficient permission
if (!has_capability('moodle/user:delete', $sitecontext)) {
error(get_string('nomodifyacl','mnet'));
print_error('nomodifyacl','mnet');
}
// fetch the record in question
$id = required_param('id', PARAM_INT);
if (!$idrec = get_record('mnet_sso_access_control', 'id', $id)) {
error(get_string('recordnoexists','mnet'), '/admin/mnet/access_control.php');
print_error('recordnoexists','mnet', "$CFG->wwwroot/$CFG->admin/mnet/access_control.php");
}
switch ($action) {
@@ -60,7 +60,7 @@ if (!empty($action) and confirm_sesskey()) {
// require the access parameter, and it must be 'allow' or 'deny'
$accessctrl = trim(strtolower(required_param('accessctrl', PARAM_ALPHA)));
if ($accessctrl != 'allow' and $accessctrl != 'deny') {
error(get_string('invalidaccessparam', 'mnet') , '/admin/mnet/access_control.php');
print_error('invalidaccessparam', 'mnet', "$CFG->wwwroot/$CFG->admin/mnet/access_control.php");
}
if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $accessctrl)) {
@@ -73,7 +73,7 @@ if (!empty($action) and confirm_sesskey()) {
break;
default:
print_error('invalidactionparam', 'mnet', '/admin/mnet/access_control.php');
print_error('invalidactionparam', 'mnet', "$CFG->wwwroot/$CFG->admin/mnet/access_control.php");
}
}
@@ -84,7 +84,7 @@ if ($form = data_submitted() and confirm_sesskey()) {
// check permissions and verify form input
if (!has_capability('moodle/user:delete', $sitecontext)) {
error(get_string('nomodifyacl','mnet'), '/admin/mnet/access_control.php');
print_error('nomodifyacl','mnet', "$CFG->wwwroot/$CFG->admin/mnet/access_control.php");
}
if (empty($form->username)) {
$formerror['username'] = get_string('enterausername','mnet');
+1 -1
View File
@@ -72,7 +72,7 @@ function mnet_get_functions($type, $parentname) {
if (!file_exists($filename)) return false;
if (extension_loaded('tokenizer')) {
include_once $CFG->dirroot.'/admin/mnet/MethodTable.php';
include_once "$CFG->dirroot/$CFG->admin/mnet/MethodTable.php";
$functions = (array)MethodTable::create($filename,false);
}
+3 -3
View File
@@ -1,7 +1,7 @@
<?php
$navlinks = array();
$navlinks[] = array('name' => $stradministration, 'link' => $CFG->wwwroot.'/admin/index.php', 'type' => 'misc');
$navlinks[] = array('name' => get_string('mnetsettings', 'mnet'), 'link' => $CFG->wwwroot.'/admin/mnet/index.php', 'type' => 'misc');
$navlinks[] = array('name' => $stradministration, 'link' => "$CFG->wwwroot/$CFG->admin/index.php", 'type' => 'misc');
$navlinks[] = array('name' => get_string('mnetsettings', 'mnet'), 'link' => "$CFG->wwwroot/$CFG->admin/mnet/index.php", 'type' => 'misc');
$navlinks[] = array('name' => get_string('deletehost', 'mnet'), 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: $strmnetsettings", "$site->fullname", $navigation);
@@ -49,7 +49,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
</table>
</center>
</div>
<?php
print_footer();
?>
+1 -2
View File
@@ -7,7 +7,7 @@
include_once($CFG->dirroot.'/mnet/xmlrpc/client.php');
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
admin_externalpage_setup('mnetenrol');
@@ -243,7 +243,6 @@
$str = get_strings(array('enrolmentplugins', 'configuration', 'users', 'administration'));
/// Get some language strings
$strassignusers = get_string('assignusers', 'role');
$strpotentialusers = get_string('potentialusers', 'role');
$strexistingusers = get_string('existingusers', 'role');
$straction = get_string('assignroles', 'role');
+2 -2
View File
@@ -6,7 +6,7 @@
require_once($CFG->libdir.'/adminlib.php');
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
@@ -37,7 +37,7 @@
" class=\"icon\" alt=\"".get_string("course")."\" />";
foreach ($courses as $course) {
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
$link = "$CFG->wwwroot/$CFG->admin/mnet/enr_course_enrol.php?"
. "host={$mnethost}&amp;courseid={$course->id}&amp;sesskey={$USER->sesskey}";
echo '<tr>'
. "<td>$icon</td>"
+2 -2
View File
@@ -37,7 +37,7 @@
. '</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}";
$coursesurl = "$CFG->wwwroot/$CFG->admin/mnet/enr_courses.php?host={$host->id}&amp;sesskey={$USER->sesskey}";
$coursecount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_course WHERE hostid={$host->id}");
if (empty($coursecount)) {
$coursecount = '?';
@@ -49,7 +49,7 @@
. "<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}">'
// . '<td align="center" ><a href="$CFG->wwwroot/$CFG->admin/report/log/index.php?course_host={$host->id}">'
// . get_string('logs', 'mnet').'</a> </td>'
. '</tr>';
}
+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;
+9 -10
View File
@@ -1,5 +1,7 @@
<?php
admin_externalpage_print_header($adminroot);
admin_externalpage_print_header();
print_heading(get_string('themes'));
$original_theme = fullclone($THEME);
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
@@ -10,13 +12,10 @@ $logurl = $CFG->wwwroot.
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
if ($mnet_peer->id != $CFG->mnet_all_hosts_id) $tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
print_tabs(array($tabs), 'mnetthemes');
print_simple_box_start("center", "");
print_heading($strthemes);
if ($mnet_peer->id != $CFG->mnet_all_hosts_id) {
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
}
print_tabs(array($tabs), 'mnetthemes');
$themes = get_list_of_plugins("theme");
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
@@ -123,6 +122,6 @@ print_simple_box_start("center", "");
}
echo "</table>";
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
$THEME = $original_theme;
admin_externalpage_print_footer();
?>
+7 -6
View File
@@ -4,11 +4,8 @@
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
error_reporting(E_ALL);
ini_set('display_errors', true);
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('mnetpeers', $adminroot);
admin_externalpage_setup('mnetpeers');
$context = get_context_instance(CONTEXT_SYSTEM);
@@ -55,7 +52,9 @@ ini_set('display_errors', true);
if (confirm_sesskey()) {
if ($choose == $unlikely_name) {
$mnet_peer->force_theme = 1;
$mnet_peer->updateparams->force_theme = 1;
$mnet_peer->theme = '';
$mnet_peer->updateparams->theme = '';
if ($mnet_peer->commit()) {
$report = array(get_string('themesaved'), 'informationbox');
} else {
@@ -66,7 +65,8 @@ ini_set('display_errors', true);
$report = array('This theme is not installed!'.'3', 'errorbox');
} else {
$mnet_peer->force_theme = 1;
$mnet_peer->theme = addslashes($choose);
$mnet_peer->theme = $choose;
$mnet_peer->updateparams->theme = addslashes($choose);
if ($mnet_peer->commit()) {
$report = array(get_string('themesaved').'1', 'informationbox');
} else {
@@ -76,5 +76,6 @@ ini_set('display_errors', true);
}
}
include('./mnet_themes.html');
$adminroot = admin_get_root();
require('./mnet_themes.html');
?>
+1 -1
View File
@@ -76,7 +76,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
</th>
</tr>
<tr>
<td class="cell c0"></td>
<td class="cell c0">wwwroot:</td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2">
<select name="applicationid">
+17 -9
View File
@@ -15,17 +15,17 @@ require_capability('moodle/site:config', $context, $USER->id, true, "nopermissio
if (!extension_loaded('openssl')) {
admin_externalpage_print_header();
print_error('requiresopenssl', 'mnet', '', NULL, true);
print_error('requiresopenssl', 'mnet');
}
if (!$site = get_site()) {
admin_externalpage_print_header();
print_error('nosite', '', '', NULL, true);
print_error('nosite', '');
}
if (!function_exists('curl_init') ) {
admin_externalpage_print_header();
print_error('nocurl', 'mnet', '', NULL, true);
print_error('nocurl', 'mnet');
}
/// Initialize variables.
@@ -50,11 +50,16 @@ 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');
print_error('xmlrpc-missing', 'mnet','peers.php');
exit;
}
@@ -77,7 +82,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
$temp_wwwroot = clean_param($form->wwwroot, PARAM_URL);
if ($temp_wwwroot !== $form->wwwroot) {
trigger_error("We now parse the wwwroot with PARAM_URL. Your URL will need to have a valid TLD, etc.");
error(get_string("invalidurl", 'mnet'),'peers.php');
print_error("invalidurl", 'mnet','peers.php');
exit;
}
unset($temp_wwwroot);
@@ -92,25 +97,28 @@ if (($form = data_submitted()) && confirm_sesskey()) {
}
if (isset($form->deleted) && ($form->deleted == '0' || $form->deleted == '1')) {
$mnet_peer->updateparams->deleted = $form->deleted;
$mnet_peer->deleted = $form->deleted;
}
if (isset($form->public_key)) {
$form->public_key = clean_param($form->public_key, PARAM_PEM);
if (empty($form->public_key)) {
error(get_string("invalidpubkey", 'mnet'),'peers.php?step=update&amp;hostid='.$mnet_peer->id);
print_error("invalidpubkey", 'mnet', 'peers.php?step=update&amp;hostid='.$mnet_peer->id);
exit;
} else {
$oldkey = $mnet_peer->public_key;
$mnet_peer->public_key = $form->public_key;
$mnet_peer->public_key_expires = $mnet_peer->check_common_name($form->public_key);
$mnet_peer->updateparams->public_key = addslashes($form->public_key);
$mnet_peer->public_key_expires = $mnet_peer->check_common_name($form->public_key);
$mnet_peer->updateparams->public_key_expires = $mnet_peer->check_common_name($form->public_key);
if ($mnet_peer->public_key_expires == false) {
$mnet_peer->public_key == $oldkey;
$errmsg = '<br />';
foreach ($mnet_peer->error as $err) {
$errmsg .= $err['code'] . ': ' . $err['text'].'<br />';
}
error(get_string("invalidpubkey", 'mnet') . $errmsg ,'peers.php?step=update&amp;hostid='.$mnet_peer->id);
//print_error("invalidpubkey", 'mnet', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $errmsg);
exit;
}
}
@@ -119,7 +127,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
// PREVENT DUPLICATE RECORDS ///////////////////////////////////////////
if ('input' == $form->step) {
if ( isset($mnet_peer->id) && $mnet_peer->id > 0 ) {
error(get_string("hostexists", 'mnet', $mnet_peer->id),'peers.php?step=update&amp;hostid='.$mnet_peer->id);
print_error("hostexists", 'mnet', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $mnet_peer->id);
}
}
+7 -5
View File
@@ -4,19 +4,18 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('managemodules');
/// If data submitted, then process and store.
if ($config = data_submitted()) {
$module = optional_param('module', '', PARAM_SAFEDIR);
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
if ($module != '') {
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
admin_externalpage_setup('modsetting'.$module);
// 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.
@@ -28,6 +27,8 @@
$moduleconfig($config);
}
} else {
admin_externalpage_setup('managemodules');
$moduleprefix = '';
}
@@ -43,7 +44,8 @@
/// 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");
admin_externalpage_setup('modsetting'.$module);
$strmodulename = get_string("modulename", $module);
+44 -22
View File
@@ -5,6 +5,7 @@
require_once('../course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/ddllib.php');
// defines
define('MODULE_TABLE','module_administration_table');
@@ -29,10 +30,6 @@
$stractivitymodule = get_string("activitymodule");
$strshowmodulecourse = get_string('showmodulecourse');
admin_externalpage_print_header();
print_heading($stractivities);
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
@@ -55,6 +52,7 @@
FROM {$CFG->prefix}course_modules
WHERE visibleold=1 AND module={$module->id})";
execute_sql($sql, false);
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($show) and confirm_sesskey()) {
@@ -72,9 +70,12 @@
FROM {$CFG->prefix}course_modules
WHERE visible=1 AND module={$module->id})";
execute_sql($sql, false);
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($delete) and confirm_sesskey()) {
admin_externalpage_print_header();
print_heading($stractivities);
$strmodulename = get_string("modulename", "$delete");
@@ -104,6 +105,11 @@
}
}
// delete calendar events
if (!delete_records("event", "modulename", $delete)) {
notify("Error occurred while deleting all $strmodulename records in calendar event table");
}
// clear course.modinfo for courses
// that used this module...
$sql = "UPDATE {$CFG->prefix}course
@@ -138,30 +144,39 @@
notify("Error occurred while deleting the $strmodulename records from the config table");
}
// Then the tables themselves
// cleanup the gradebook
require_once($CFG->libdir.'/gradelib.php');
grade_uninstalled_module($module->name);
// Then the tables themselves
drop_plugin_tables($module->name, "$CFG->dirroot/mod/$module->name/db/install.xml", false);
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$module->name;
foreach ($tables as $table) {
if (strpos($table, $prefix) === 0) {
if (!execute_sql("DROP TABLE $table", false)) {
notify("ERROR: while trying to drop table $table");
}
}
}
}
// Delete the capabilities that were defined by this module
capabilities_cleanup('mod/'.$module->name);
// remove entent handlers and dequeue pending events
events_uninstall('mod/'.$module->name);
// Perform any custom uninstall tasks
if (file_exists($CFG->dirroot . '/mod/' . $module->name . '/lib.php')) {
require_once($CFG->dirroot . '/mod/' . $module->name . '/lib.php');
$uninstallfunction = $module->name . '_uninstall';
if (function_exists($uninstallfunction)) {
if (! $uninstallfunction() ) {
notify('Encountered a problem running uninstall function for '. $module->name.'!');
}
}
}
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
notice(get_string("moduledeletefiles", "", $a), "modules.php");
}
}
admin_externalpage_print_header();
print_heading($stractivities);
/// Get and sort the existing modules
if (!$modules = get_records("modules")) {
@@ -176,7 +191,7 @@
}
$modulebyname[$strmodulename] = $module;
}
ksort($modulebyname);
ksort($modulebyname, SORT_LOCALE_STRING);
/// Print the table of all modules
// construct the flexible table ready to display
@@ -195,7 +210,9 @@
$delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=$USER->sesskey\">$strdelete</a>";
if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) {
if (file_exists("$CFG->dirroot/mod/$module->name/settings.php")) {
$settings = "<a href=\"settings.php?section=modsetting$module->name\">$strsettings</a>";
} else if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) {
$settings = "<a href=\"module.php?module=$module->name\">$strsettings</a>";
} else {
$settings = "";
@@ -225,12 +242,17 @@
$class = "";
}
$extra = '';
if (!file_exists("$CFG->dirroot/mod/$module->name/lib.php")) {
$extra = ' <span class="notifyproblem">('.get_string('missingfromdisk').')</span>';
}
$table->add_data(array(
'<span'.$class.'>'.$icon.' '.$modulename.'</span>',
$countlink,
'<span'.$class.'>'.$module->version.'</span>',
$visible,
$delete,
'<span'.$class.'>'.$icon.' '.$modulename.$extra.'</span>',
$countlink,
'<span'.$class.'>'.$module->version.'</span>',
$visible,
$delete,
$settings
));
}
+8 -19
View File
@@ -21,7 +21,6 @@ page_map_class(PAGE_ADMIN, 'page_admin');
class page_admin extends page_base {
var $section;
var $pathtosection;
var $visiblepathtosection;
// hack alert!
@@ -34,22 +33,12 @@ class page_admin extends page_base {
return;
}
$adminroot = admin_get_root();
$adminroot =& admin_get_root(false, false); //settings not required - only pages
// fetch the path parameter
$this->section = $section;
$this->visiblepathtosection = array();
// this part is (potentially) processor-intensive... there's gotta be a better way
// of handling this
if ($this->pathtosection = $adminroot->path($this->section)) {
foreach($this->pathtosection as $element) {
if ($pointer = $adminroot->locate($element)) {
array_push($this->visiblepathtosection, $pointer->visiblename);
}
}
}
$current =& $adminroot->locate($section, true);
$this->visiblepathtosection = array_reverse($current->visiblepath);
// all done
$this->full_init_done = true;
@@ -62,7 +51,7 @@ class page_admin extends page_base {
// seems reasonable that the only people that can edit blocks on the admin pages
// are the admins... but maybe we want a role for this?
function user_allowed_editing() {
return has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
return has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM));
}
// has to be fixed. i know there's a "proper" way to do this
@@ -74,9 +63,9 @@ class page_admin extends page_base {
function url_get_path() {
global $CFG;
$adminroot = admin_get_root();
$adminroot =& admin_get_root(false, false); //settings not required - only pages
$root = $adminroot->locate($this->section);
$root =& $adminroot->locate($this->section);
if (is_a($root, 'admin_externalpage')) {
return $root->url;
} else {
@@ -110,7 +99,7 @@ class page_admin extends page_base {
parent::init_quick($data);
}
function print_header($section = '') {
function print_header($section = '', $focus='') {
global $USER, $CFG, $SITE;
$this->init_full($section); // we're trusting that init_full() has already been called by now; it should have.
@@ -132,7 +121,7 @@ class page_admin extends page_base {
}
$navigation = build_navigation($navlinks);
print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname, $navigation,'', '', true, $buttons, '');
print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname, $navigation, $focus, '', true, $buttons, '');
}
function get_type() {
+1 -1
View File
@@ -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
@@ -5,14 +5,14 @@
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
if (!$site = get_site()) {
redirect("index.php");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
if (!$admin = get_admin()) {
+2 -24
View File
@@ -32,32 +32,10 @@ if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Pr
die;
}
if (!$tables = $db->Metatables() ) { // No tables yet at all.
error("no tables");
}
print_simple_box_start('center');
/// Turn off time limits, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_flush());
foreach ($tables as $table) {
if (in_array($table, array($CFG->prefix.'config'))) { // Don't process these
continue;
}
if ($columns = $db->MetaColumns($table, false)) {
foreach ($columns as $column => $data) {
if (in_array($data->type, array('text','mediumtext','longtext','varchar'))) { // Text stuff only
$db->debug = true;
execute_sql("UPDATE $table SET $column = REPLACE($column, '$search', '$replace');");
$db->debug = false;
}
}
}
if (!db_replace($search, $replace)) {
error('An error has occured during this process');
}
print_simple_box_end();
+4 -6
View File
@@ -5,15 +5,13 @@
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/backup/lib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportbackups');
admin_externalpage_setup('reportbackups', $adminroot);
admin_externalpage_print_header($adminroot);
admin_externalpage_print_header();
$courseid = optional_param('courseid', 0, PARAM_INT);
require_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM));
/// Scheduled backups are disabled by the server admin
if (!empty($CFG->disablescheduledbackups)) {
@@ -135,6 +133,6 @@
print_simple_box_end();
}
admin_externalpage_print_footer($adminroot);
print_footer();
?>
+10 -9
View File
@@ -12,13 +12,12 @@
$time = optional_param('time', 0, PARAM_INT);
$numcourses = optional_param('numcourses', 20, PARAM_INT);
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID)); // needed?
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM)); // needed?
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3);
}
$course = get_site();
stats_check_uptodate($course->id);
@@ -44,11 +43,11 @@
$timeoptions = stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth);
if (empty($timeoptions)) {
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id);
print_error('nostatstodisplay', "", $CFG->wwwroot.'/course/view.php?id='.$course->id);
}
echo '<form action="index.php" method="post">'."\n";
echo '<fieldset class="invisiblefieldset">';
echo '<div>';
$table->width = '*';
$table->align = array('left','left','left','left','left','left');
@@ -58,17 +57,19 @@
'<input type="submit" value="'.get_string('view').'" />') ;
print_table($table);
echo '</fieldset>';
echo '</div>';
echo '</form>';
print_heading($reportoptions[$report]);
if (!empty($report) && !empty($time)) {
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." WHERE timeend >= $param->timeafter AND stattype = 'activity' AND roleid = 0"
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby;
@@ -82,9 +83,9 @@
} else {
if (empty($CFG->gdversion)) {
echo '<div class="boxaligncenter">(' . get_string("gdneed") .')</div>';
echo '<div class="graph">(' . get_string("gdneed") .')</div>';
} else {
echo '<div class="boxaligncenter"><img alt="'.get_string('courseoverviewgraph').'" src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
echo '<div class="graph"><img alt="'.get_string('courseoverviewgraph').'" src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
}
$table = new StdClass;
+2 -2
View File
@@ -20,7 +20,7 @@
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." WHERE timeend >= $param->timeafter AND stattype = 'activity' AND roleid = 0"
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby;
@@ -29,7 +29,7 @@
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
print_error('statsnodata', "", $CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
}
+1 -1
View File
@@ -7,7 +7,7 @@
admin_externalpage_setup('reportquestion');
admin_externalpage_print_header();
print_heading(page_doc_link(get_string('adminreport', 'question')));
print_heading(get_string('adminreport', 'question'));
$probstr = '';
$contextupgradeversion = 2007081000;
+1 -1
View File
@@ -17,7 +17,7 @@ require_once('ex_simple_test.php');
require_once('ex_reporter.php');
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
/* The UNITTEST constant can be checked elsewhere if you need to know
* when your code is being run as part of a unit test. */
+1 -1
View File
@@ -47,7 +47,7 @@
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3);
}
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $course->id));
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM));
add_to_log($course->id, "course", "report stats", "report/stats/index.php?course=$course->id", $course->id);
+1 -1
View File
@@ -13,7 +13,7 @@
admin_externalpage_setup('defineroles');
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/role:manage', $sitecontext);
/// form processiong here
+2 -2
View File
@@ -11,7 +11,7 @@
admin_externalpage_setup('defineroles');
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/role:manage', $sitecontext);
/// form processiong here
@@ -74,7 +74,7 @@
$table->data[] = array_merge(array(format_string($role->name)), $beta);
}
print_simple_box(get_string('configallowoverride', 'admin'), 'center');
print_simple_box(get_string('configallowoverride2', 'admin'), 'center');
echo '<form action="allowoverride.php" method="post">';
print_table($table);
+3 -4
View File
@@ -46,9 +46,8 @@
</label>
<?php check_theme_arrows(); ?>
<p class="arrow_button">
<input name="add" id="add" type="submit" value="<?php echo '&nbsp;'.$THEME->larrow.' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
<input name="remove" id="remove" type="submit" value="<?php echo '&nbsp; '.$THEME->rarrow.' &nbsp; &nbsp; '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
<input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
<input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$THEME->rarrow; ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<td valign="top">
@@ -61,7 +60,7 @@
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
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";
+64 -38
View File
@@ -6,6 +6,7 @@
require_once($CFG->libdir.'/adminlib.php');
define("MAX_USERS_PER_PAGE", 5000);
define("MAX_USERS_TO_LIST_PER_ROLE", 10);
$contextid = required_param('contextid',PARAM_INT); // context id
$roleid = optional_param('roleid', 0, PARAM_INT); // required role id
@@ -44,13 +45,11 @@
} else {
error('Invalid course id');
}
$coursecontext = $context;
} else if (!empty($courseid)){ // we need this for user tabs in user context
if (!$course = get_record('course', 'id', $courseid)) {
error('Invalid course id');
}
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
} else {
$courseid = SITEID;
@@ -59,27 +58,19 @@
require_login($course);
if ($context->contextlevel == CONTEXT_COURSE) {
require_login($context->instanceid);
} else {
require_login();
}
require_capability('moodle/role:assign', $context);
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context); // Plain role names, may be altered later
$overridableroles = get_overridable_roles($context, 'name', ROLENAME_BOTH);
$assignableroles = get_assignable_roles($context, 'name', ROLENAME_BOTH);
/// Get some language strings
$strassignusers = get_string('assignusers', 'role');
$strpotentialusers = get_string('potentialusers', 'role');
$strexistingusers = get_string('existingusers', 'role');
$straction = get_string('assignroles', 'role');
$strroletoassign = get_string('roletoassign', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strsearch = get_string('search');
$strshowall = get_string('showall');
$strparticipants = get_string('participants');
@@ -96,7 +87,10 @@
$today = time();
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
$basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
// MDL-12420, preventing course start date showing up as an option at system context and front page roles.
if ($course->startdate > 0) {
$basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
}
if ($course->enrollable != 2 || ($course->enrolstartdate == 0 || $course->enrolstartdate <= $today) && ($course->enrolenddate == 0 || $course->enrolenddate > $today)) {
$basemenu[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
}
@@ -112,7 +106,7 @@
/// Make sure this user can assign that role
if ($roleid) {
if (!user_can_assign($context, $roleid)) {
if (!isset($assignableroles[$roleid])) {
error ('you can not override this role in this context');
}
}
@@ -129,7 +123,9 @@
/// course header
$navlinks = array();
if ($courseid != SITEID) {
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_COURSE, $course->id))) {
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
}
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
@@ -153,27 +149,14 @@
} else if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
admin_externalpage_setup('frontpageroles');
admin_externalpage_print_header();
$currenttab = '';
$tabsmode = 'assign';
$currenttab = 'assign';
include_once('tabs.php');
} else {
$currenttab = '';
$tabsmode = 'assign';
$currenttab = 'assign';
include_once('tabs.php');
}
/// Rename some of the role names if needed
if (isset($coursecontext)) {
if ($aliasnames = get_records('role_names', 'contextid', $coursecontext->id)) {
foreach ($aliasnames as $alias) {
if (isset($assignableroles[$alias->roleid])) {
$assignableroles[$alias->roleid] = $alias->text.' ('.$assignableroles[$alias->roleid].')';
}
}
}
}
/// Process incoming role assignment
@@ -224,7 +207,9 @@
}
}
}
$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);
@@ -258,17 +243,22 @@
}
}
}
$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) {
print_heading_with_help(get_string('frontpageroles', 'admin'), 'assignroles');
} else {
print_heading_with_help(get_string('assignroles', 'role'), 'assignroles');
print_heading_with_help(get_string('assignrolesin', 'role', print_context_name($context)), 'assignroles');
}
if ($context->contextlevel==CONTEXT_SYSTEM) {
@@ -355,7 +345,7 @@
$availableusers = get_recordset_sql($select . $from . $where . $selectsql . $excsql);
}
$usercount = count_records_sql($countselect . $from . $where) - count($contextusers);
$usercount = $availableusers->_numOfRows;
}
} else {
@@ -381,11 +371,11 @@
AND r.roleid = '.$roleid.'
'.$selectsql.')
ORDER BY lastname ASC, firstname ASC');
$usercount = count_records_select('user', $select) - count($contextusers);
$usercount = $availableusers->_numOfRows;
}
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
echo '<div class="selector">';
$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, '', '', '', false, 'self', $strroletoassign);
@@ -413,6 +403,34 @@
sync_metacourse($course);
}
// Get the names of role holders for roles with between 1 and MAX_USERS_TO_LIST_PER_ROLE users,
// and so determine whether to show the extra column.
$rolehodlercount = array();
$rolehodlernames = array();
$strmorethanten = get_string('morethan', 'role', MAX_USERS_TO_LIST_PER_ROLE);
$showroleholders = false;
foreach ($assignableroles as $roleid => $rolename) {
$countusers = count_role_users($roleid, $context);
$rolehodlercount[$roleid] = $countusers;
$roleusers = '';
if (0 < $countusers && $countusers <= MAX_USERS_TO_LIST_PER_ROLE) {
$roleusers = get_role_users($roleid, $context, false, 'u.id, u.lastname, u.firstname');
if (!empty($roleusers)) {
$strroleusers = array();
foreach ($roleusers as $user) {
$strroleusers[] = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $user->id . '" >' . fullname($user) . '</a>';
}
$rolehodlernames[$roleid] = implode('<br />', $strroleusers);
$showroleholders = true;
}
} else if ($countusers > MAX_USERS_TO_LIST_PER_ROLE) {
$rolehodlernames[$roleid] = '<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$strmorethanten.'</a>';
} else {
$rolehodlernames[$roleid] = '';
}
}
// Print overview table
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
@@ -420,11 +438,19 @@
$table->head = array(get_string('roles', 'role'), get_string('description'), get_string('users'));
$table->wrap = array('nowrap', '', 'nowrap');
$table->align = array('right', 'left', 'center');
if ($showroleholders) {
$table->head[] = '';
$table->wrap[] = 'nowrap';
$table->align[] = 'left';
}
foreach ($assignableroles as $roleid => $rolename) {
$countusers = count_role_users($roleid, $context);
$description = format_string(get_field('role', 'description', 'id', $roleid));
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>',$description, $countusers);
$row = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>',$description, $rolehodlercount[$roleid]);
if ($showroleholders) {
$row[] = $rolehodlernames[$roleid];
}
$table->data[] = $row;
}
print_table($table);
+3 -2
View File
@@ -58,7 +58,7 @@
<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).'" />';
echo '<input type="text" id="shortname" name="shortname" maxlength="100" size="15" value="'.s($role->shortname).'" />';
if (isset($errors["shortname"])) formerr($errors["shortname"]);
?>
</td>
@@ -113,7 +113,8 @@ $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)) {
+12 -51
View File
@@ -121,9 +121,12 @@
mark_context_dirty($sitecontext->path);
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':
@@ -233,6 +236,7 @@
// edited a role sitewide...
mark_context_dirty($sitecontext->path);
add_to_log(SITEID, 'role', 'edit', 'admin/roles/manage.php?action=edit&roleid='.$role->id, $role->name, '', $USER->id);
redirect('manage.php');
}
@@ -240,6 +244,7 @@
// edited a role sitewide - with errors, but still...
mark_context_dirty($sitecontext->path);
}
break;
case 'delete':
@@ -344,8 +349,8 @@
$suffixshort = "";
}
$currentfullname = $fullname.$suffixfull;
// Limit the size of shortname - database column accepts <= 15 chars
$currentshortname = substr($shortname, 0, 15 - strlen($suffixshort)).$suffixshort;
// Limit the size of shortname - database column accepts <= 100 chars
$currentshortname = substr($shortname, 0, 100 - strlen($suffixshort)).$suffixshort;
$coursefull = get_record("role","name",addslashes($currentfullname));
$courseshort = get_record("role","shortname",addslashes($currentshortname));
$counter++;
@@ -360,6 +365,8 @@
mark_context_dirty($sitecontext->path);
}
$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;
@@ -374,6 +381,9 @@
// reset a role sitewide...
mark_context_dirty($sitecontext->path);
$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 {
@@ -561,54 +571,5 @@
die;
/// ================ some internal functions ====================////
function switch_roles($first, $second) {
$status = true;
//first find temorary sortorder number
$tempsort = count_records('role') + 3;
while (get_record('role','sortorder', $tempsort)) {
$tempsort += 3;
}
$r1 = new object();
$r1->id = $first->id;
$r1->sortorder = $tempsort;
$r2 = new object();
$r2->id = $second->id;
$r2->sortorder = $first->sortorder;
if (!update_record('role', $r1)) {
debugging("Can not update role with ID $r1->id!");
$status = false;
}
if (!update_record('role', $r2)) {
debugging("Can not update role with ID $r2->id!");
$status = false;
}
$r1->sortorder = $second->sortorder;
if (!update_record('role', $r1)) {
debugging("Can not update role with ID $r1->id!");
$status = false;
}
return $status;
}
// duplicates all the base definitions of a role
function role_cap_duplicate($sourcerole, $targetrole) {
global $CFG;
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$caps = get_records_sql("SELECT * FROM {$CFG->prefix}role_capabilities
WHERE roleid = $sourcerole->id
AND contextid = $systemcontext->id");
// adding capabilities
foreach ($caps as $cap) {
unset($cap->id);
$cap->roleid = $targetrole;
insert_record('role_capabilities', $cap);
}
}
?>
+12 -3
View File
@@ -3,6 +3,7 @@
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
$strsafewarning = get_string('safeoverridenotice', 'role');
?>
<form id="overrideform" action="override.php" method="post">
@@ -30,7 +31,8 @@
$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) {
@@ -66,7 +68,7 @@
$isprohibit = 0;
}
$isdisabled = $isprohibit;
$isdisabled = $isprohibit || $capability->locked;
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
@@ -137,10 +139,17 @@
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
<?php } ?>
</table>
<div class="submit buttons">
<input type="submit" value="<?php print_string('savechanges') ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
</div>
<?php
if ($safeoverridenotice) {
echo '<div class="sefeoverridenotice">'.$strsafewarning.'</div>';
}
?>
</form>
+43 -32
View File
@@ -20,7 +20,9 @@
error('Can not override base role capabilities');
}
if (!has_capability('moodle/role:override', $context)) {
$canoverride = has_capability('moodle/role:override', $context);
if (!$canoverride and !has_capability('moodle/role:safeoverride', $context)) {
error('You do not have permission to change overrides in this context!');
}
@@ -28,9 +30,6 @@
if (!$course = get_record('course', 'id', $courseid)) {
error('Bad course ID');
}
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
} else {
$course = clone($SITE);
$courseid = SITEID;
@@ -51,22 +50,20 @@
}
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
$overridableroles = get_overridable_roles($context, 'name', ROLENAME_BOTH);
$assignableroles = get_assignable_roles($context, 'name', ROLENAME_BOTH);
/// Get some language strings
$strroletooverride = get_string('roletooverride', 'role');
$stroverrideusers = get_string('overrideusers', 'role');
$straction = get_string('overrideroles', 'role');
$strcurrentrole = get_string('currentrole', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strparticipants = get_string('participants');
/// Make sure this user can override that role
if ($roleid) {
if (!user_can_override($context, $roleid)) {
if (!isset($overridableroles[$roleid])) {
error ('you can not override this role in this context');
}
}
@@ -77,7 +74,30 @@
}
/// get all cababilities
$capabilities = fetch_context_capabilities($context);
$safeoverridenotice = false;
if ($roleid) {
if ($capabilities = fetch_context_capabilities($context)) {
// find out if we need to lock some capabilities
foreach ($capabilities as $capname=>$capability) {
$capabilities[$capname]->locked = false;
if ($canoverride) {
//ok no locking at all
continue;
}
//only limited safe overrides - spam only allowed
if ((RISK_DATALOSS & (int)$capability->riskbitmask)
or (RISK_MANAGETRUST & (int)$capability->riskbitmask)
or (RISK_CONFIG & (int)$capability->riskbitmask)
or (RISK_XSS & (int)$capability->riskbitmask)
or (RISK_PERSONAL & (int)$capability->riskbitmask)) {
$capabilities[$capname]->locked = true;
$safeoverridenotice = true;
}
}
}
} else {
$capabilities = null;
}
/// Process incoming role override
if ($data = data_submitted() and $roleid and confirm_sesskey()) {
@@ -87,6 +107,10 @@
'', 'capability, permission, id');
foreach ($capabilities as $cap) {
if ($cap->locked) {
//user not allowed to change this cap
continue;
}
if (!isset($data->{$cap->name})) {
//cap not specified in form
@@ -115,7 +139,8 @@
// force accessinfo refresh for users visiting this context...
mark_context_dirty($context->path);
$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);
}
@@ -126,8 +151,9 @@
$navlinks = array();
/// course header
if ($course->id != SITEID) {
$navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_COURSE, $course->id))) {
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
}
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
@@ -147,33 +173,18 @@
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('frontpageroles');
admin_externalpage_print_header();
$currenttab = '';
$tabsmode = 'override';
$currenttab = 'override';
include_once('tabs.php');
} else {
$currenttab = '';
$tabsmode = 'override';
$currenttab = 'override';
include_once('tabs.php');
}
/// Rename some of the role names if needed
if (isset($coursecontext)) {
if ($aliasnames = get_records('role_names', 'contextid', $coursecontext->id)) {
foreach ($aliasnames as $alias) {
if (isset($overridableroles[$alias->roleid])) {
$overridableroles[$alias->roleid] = $alias->text.' ('.$overridableroles[$alias->roleid].')';
}
}
}
}
print_heading_with_help(get_string('overrides', 'role'), 'overrides');
print_heading_with_help(get_string('overridepermissionsin', 'role', print_context_name($context)), 'overrides');
if ($roleid) {
/// prints a form to swap roles
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, '', '', '', false, 'self', $strroletooverride);
@@ -197,7 +208,7 @@
if (!empty($capabilities)) {
// Print the capabilities overrideable in this context
print_simple_box_start('center');
include_once('override.html');
include('override.html');
print_simple_box_end();
} else {
+55 -55
View File
@@ -19,9 +19,6 @@ if ($currenttab != 'update') {
print_header($SITE->fullname, "$SITE->fullname", $navigation);
break;
case CONTEXT_PERSONAL:
break;
case CONTEXT_USER:
print_header();
break;
@@ -50,8 +47,8 @@ if ($currenttab != 'update') {
$course = get_record('course', 'id', $context->instanceid);
require_login($course);
$navlinks[] = array('name' => $course->shortname,
'link' => "$CFG->wwwroot/course/view.php?id=$course->id",
$navlinks[] = array('name' => get_string('roles'),
'link' => "$CFG->wwwroot/admin/roles/assign.php?contextid=$context->id",
'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($streditcoursesettings, $course->fullname, $navigation);
@@ -78,8 +75,6 @@ if ($currenttab != 'update') {
require_login($course);
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); // for role names later
$fullmodulename = get_string("modulename", $module->name);
$streditinga = get_string("editinga", "moodle", $fullmodulename);
$strmodulenameplural = get_string("modulenameplural", $module->name);
@@ -113,9 +108,6 @@ if ($currenttab != 'update') {
if ($block = get_record('block', 'id', $blockinstance->blockid)) {
$blockname = print_context_name($context);
// Prepare the last part of the breadcrumbs first
$navlinks[98] = array('name' => $blockname, 'link' => null, 'type' => 'misc');
$navlinks[99] = array('name' => $straction, 'link' => null, 'type' => 'misc');
switch ($blockinstance->pagetype) {
case 'course-view':
@@ -123,12 +115,8 @@ if ($currenttab != 'update') {
require_login($course);
if ($course->id != SITEID) {
$navlinks[0] = array('name' => $course->shortname,
'link' => "$CFG->wwwroot/course/view.php?id=$course->id",
'type' => 'misc');
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); // for role names later
}
$navlinks[] = array('name' => $blockname, 'link' => null, 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$straction: $blockname", $course->fullname, $navigation);
}
@@ -136,14 +124,30 @@ if ($currenttab != 'update') {
case 'blog-view':
$strblogs = get_string('blogs','blog');
$navlinks[0] = array('name' => $strblogs,
$navlinks[] = array('name' => $strblogs,
'link' => $CFG->wwwroot.'/blog/index.php',
'type' => 'misc');
$navlinks[] = array('name' => $blockname, 'link' => null, 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$straction: $strblogs", $SITE->fullname, $navigation);
break;
case 'tag-index':
$strtags = get_string('tags');
$navlinks[] = array('name' => $strtags,
'link' => $CFG->wwwroot.'/tag/index.php',
'type' => 'misc');
$navlinks[] = array('name' => $blockname, 'link' => null, 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$straction: $strtags", $SITE->fullname, $navigation);
break;
default:
$navlinks[] = array('name' => $blockname, 'link' => null, 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$straction: $blockname", $SITE->fullname, $navigation);
break;
}
@@ -159,48 +163,41 @@ if ($currenttab != 'update') {
}
$toprow = array();
$inactive = array();
$activetwo = array();
if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything except SYSTEM context
if ($context->contextlevel == CONTEXT_MODULE) { // only show update button if module?
if ($context->contextlevel == CONTEXT_MODULE) { // Only show update button if module
$toprow[] = new tabobject('update', $CFG->wwwroot.'/course/mod.php?update='.
$context->instanceid.'&amp;return=true&amp;sesskey='.sesskey(), get_string('update'));
$context->instanceid.'&amp;return=true&amp;sesskey='.sesskey(), get_string('settings'));
}
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
$context->id, get_string('roles'));
if (!empty($tabsmode)) {
if (!empty($assignableroles)) {
$secondrow[] = new tabobject('assign',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id,
get_string('assignroles', 'role'),
get_string('showallroles', 'role'),
true);
}
if (!empty($overridableroles)) {
$secondrow[] = new tabobject('override',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$context->id,
get_string('overrideroles', 'role'),
get_string('showallroles', 'role'),
true);
}
$inactive[] = 'roles';
$activetwo = array('roles');
$currenttab = $tabsmode;
} else {
$inactive[] = '';
$activetwo = array();
if (!empty($assignableroles)) {
$toprow[] = new tabobject('assign',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id,
get_string('localroles', 'role'),
get_string('showallroles', 'role'),
true);
}
if (!empty($overridableroles)) {
$toprow[] = new tabobject('override',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$context->id,
get_string('overridepermissions', 'role'),
get_string('showallroles', 'role'),
true);
}
}
/// 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.:
/// All the logic to decide what to show must be self-contained in the tabs file
/// eg:
/// include_once($CFG->dirroot . '/grades/tabs.php');
/// Finally, we support adding some 'on-the-fly' tabs here
@@ -209,7 +206,7 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
if ($extratabs = explode(',', $CFG->extratabs)) {
asort($extratabs);
foreach($extratabs as $extratab) {
/// Each extra tab mus be one $CFG->dirroot relative file
/// Each extra tab must be one $CFG->dirroot relative file
if (file_exists($CFG->dirroot . '/' . $extratab)) {
include_once($CFG->dirroot . '/' . $extratab);
}
@@ -217,13 +214,16 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
}
}
if (!empty($secondrow)) {
$tabs = array($toprow, $secondrow);
} else {
$tabs = array($toprow);
$inactive[] = $currenttab;
$tabs = array($toprow);
/// If there are any secondrow defined, let's introduce it
if (isset($secondrow) && is_array($secondrow) && !empty($secondrow)) {
$tabs[] = $secondrow;
}
print_tabs($tabs, $currenttab, $inactive, $activetwo);
}
?>
+27 -121
View File
@@ -5,152 +5,58 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$query = trim(stripslashes_safe(required_param('query', PARAM_NOTAGS))); // Search string
$query = trim(stripslashes(optional_param('query', '', PARAM_NOTAGS))); // Search string
$adminroot =& admin_get_root(); // need all settings here
$adminroot->search = $query; // So we can reference it in search boxes later in this invocation
$statusmsg = '';
$errormsg = '';
$focus = '';
admin_externalpage_setup('search'); // now hidden page
$CFG->adminsearchquery = $query; // So we can reference it in search boxes later in this invocation
// now we'll deal with the case that the admin has submitted the form with changed settings
$statusmsg = '';
if ($data = data_submitted()) {
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$changedsettings = search_settings(admin_get_root(), $query);
$errors = '';
foreach($changedsettings as $changedsetting) {
if (!isset($unslashed['s_' . $changedsetting->name])) {
$unslashed['s_' . $changedsetting->name] = ''; // needed for checkboxes
}
$errors .= $changedsetting->write_setting($unslashed['s_' . $changedsetting->name]);
}
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
}
if (empty($errors)) {
$statusmsg = get_string('changessaved');
} else {
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
if ($data = data_submitted() and confirm_sesskey()) {
if (admin_write_settings($data)) {
$statusmsg = get_string('changessaved');
}
$adminroot =& admin_get_root(true); //reload tree
if (!empty($adminroot->errors)) {
$errormsg = get_string('errorwithsettings', 'admin');
$firsterror = reset($adminroot->errors);
$focus = $firsterror->id;
}
// now update $SITE - it might have been changed
$SITE = get_record('course', 'id', $SITE->id);
$COURSE = clone($SITE);
}
// and finally, if we get here, then there are matching settings and we have to print a form
// to modify them
admin_externalpage_print_header();
admin_externalpage_print_header($focus);
if ($statusmsg != '') {
notify ($statusmsg);
if ($errormsg !== '') {
notify ($errormsg);
} else if ($statusmsg !== '') {
notify ($statusmsg, 'notifysuccess');
}
$resultshtml = search_settings_html(admin_get_root(), $query);
$resultshtml = admin_search_settings_html($query); // case insensitive search only
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 '<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 != '') {
echo $resultshtml;
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
} else {
echo get_string('noresults','admin');
}
echo '</fieldset>';
echo '</form>';
admin_externalpage_print_footer();
/**
* Find settings using a query.
*
* @param string &$node The node at which to start searching. Should be $ADMIN for all external calls to this function.
* @param string $query The search string.
* @return array An array containing admin_setting objects that match $query.
*/
function search_settings(&$node, $query) {
if (is_a($node, 'admin_category')) {
$return = array();
$entries = array_keys($node->children);
foreach ($entries as $entry) {
$return = array_merge($return, search_settings($node->children[$entry], $query));
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$return = array();
foreach ($node->settings as $setting) {
if (stristr($setting->name,$query) || stristr($setting->visiblename,$query) || stristr($setting->description,$query)) {
$return[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
return $return;
}
return array();
}
function search_settings_html(&$node, $query) {
global $CFG;
if ($query == ''){
return '';
}
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
foreach ($entries as $entry) {
$return .= search_settings_html($node->children[$entry], $query);
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$foundsettings = array();
foreach ($node->settings as $setting) {
if (stristr($setting->name,$query) || stristr($setting->visiblename,$query) || stristr($setting->description,$query)) {
$foundsettings[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
$return = '';
if (count($foundsettings) > 0) {
$return .= print_heading(get_string('searchresults','admin').' - '. '<a href="' . $CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $node->name . '">' . $node->visiblename . '</a>', '', 2, 'main', true);
$return .= '<fieldset class="adminsettings">' . "\n";
foreach ($foundsettings as $foundsetting) {
$return .= '<div class="clearer"><!-- --></div>' . "\n";
$return .= highlight($query,$foundsetting->output_html());
}
$return .= '</fieldset>';
}
return $return;
}
return '';
}
print_footer();
?>
+81 -97
View File
@@ -5,25 +5,56 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/pagelib.php');
if (!empty($THEME->customcorners)) {
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
}
if ($site = get_site()) {
require_login();
}
page_map_class(PAGE_ADMIN, 'page_admin');
$PAGE = page_create_object(PAGE_ADMIN, 0); // there must be any constant id number
$section = optional_param('section', '', PARAM_ALPHAEXT);
$PAGE->init_extra($section); // hack alert!
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
$section = required_param('section', PARAM_SAFEDIR);
$return = optional_param('return','', PARAM_ALPHA);
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
/// no guest autologin
require_login(0, false);
$adminroot =& admin_get_root(); // need all settings
$page =& $adminroot->locate($section);
if (empty($page) or !is_a($page, 'admin_settingpage')) {
print_error('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
die;
}
if (!($page->check_access())) {
print_error('accessdenied', 'admin');
die;
}
/// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
$statusmsg = '';
$errormsg = '';
$focus = '';
if ($data = data_submitted() and confirm_sesskey()) {
if (admin_write_settings($data)) {
$statusmsg = get_string('changessaved');
}
if (empty($adminroot->errors)) {
switch ($return) {
case 'site': redirect("$CFG->wwwroot/");
case 'admin': redirect("$CFG->wwwroot/$CFG->admin/");
}
} else {
$errormsg = get_string('errorwithsettings', 'admin');
$firsterror = reset($adminroot->errors);
$focus = $firsterror->id;
}
$adminroot =& admin_get_root(true); //reload tree
$page =& $adminroot->locate($section);
}
/// very hacky page setup
page_map_class(PAGE_ADMIN, 'page_admin');
$PAGE = page_create_object(PAGE_ADMIN, 0); // there must be any constant id number
$PAGE->init_extra($section);
$CFG->pagepath = 'admin/setting/'.$section;
if (!isset($USER->adminediting)) {
$USER->adminediting = false;
@@ -37,86 +68,36 @@ if ($PAGE->user_allowed_editing()) {
}
}
$adminroot = admin_get_root();
$root = $adminroot->locate($PAGE->section);
if (!is_a($root, 'admin_settingpage')) {
error(get_string('sectionerror', 'admin'));
die;
}
if (!($root->check_access())) {
error(get_string('accessdenied', 'admin'));
die;
}
$CFG->pagepath = 'admin/setting/'.$section;
/// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
$statusmsg = '';
if ($data = data_submitted()) {
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$unslashed = (array)stripslashes_recursive($data);
$errors = $root->write_settings($unslashed);
//force logout if dbsession setting changes
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
}
if (empty($errors)) {
switch ($return) {
case 'site':
redirect("$CFG->wwwroot/");
case 'admin':
redirect("$CFG->wwwroot/$CFG->admin/");
default:
$statusmsg = get_string('changessaved');
}
} else {
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
}
// now update $SITE - it might have been changed
$SITE = get_record('course', 'id', $SITE->id);
$COURSE = clone($SITE);
}
/// print header stuff ------------------------------------------------------------
// header must be printed after the redirects and require_logout
if (empty($SITE->fullname)) {
print_header($root->visiblename, $root->visiblename);
print_header($page->visiblename, $page->visiblename, '', $focus);
print_simple_box(get_string('configintrosite', 'admin'), 'center', '50%');
if ($statusmsg != '') {
notify ($statusmsg);
if ($errormsg !== '') {
notify ($errormsg);
} else if ($statusmsg !== '') {
notify ($statusmsg, 'notifysuccess');
}
// ---------------------------------------------------------------------------------------------------------------
echo '<form action="settings.php" method="post" id="adminsettings">';
echo '<div class="settingsform clearfix">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
echo '<input type="hidden" name="section" value="'.$PAGE->section.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
echo $root->output_html();
echo $page->output_html();
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
echo '</div>';
echo '</form>';
}
if (!empty($SITE->fullname)) {
} else {
$pageblocks = blocks_setup($PAGE);
$preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
@@ -124,53 +105,56 @@ if (!empty($SITE->fullname)) {
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
$PAGE->print_header();
$PAGE->print_header('', $focus);
echo '<table id="layout-table"><tr>';
$lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
foreach ($lt as $column) {
switch ($column) {
case 'left':
echo '<td style="width: ' . $preferred_width_left . 'px;" id="left-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
echo '<td style="width: '.$preferred_width_left.'px;" id="left-column">';
print_container_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
break;
case 'middle':
echo '<td id="middle-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
echo '<a name="startofcontent"></a>';
if ($statusmsg != '') {
notify ($statusmsg);
if ($errormsg !== '') {
notify ($errormsg);
} else if ($statusmsg !== '') {
notify ($statusmsg, 'notifysuccess');
}
// ---------------------------------------------------------------------------------------------------------------
echo '<form action="settings.php" method="post" id="adminsettings">';
echo '<div class="settingsform clearfix">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
print_heading($root->visiblename);
echo '<input type="hidden" name="section" value="'.$PAGE->section.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
print_heading($page->visiblename);
echo $root->output_html();
echo $page->output_html();
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
echo '</div>';
echo '</form>';
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
break;
case 'right':
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
echo '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
print_container_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
}
break;
+80 -112
View File
@@ -2,126 +2,94 @@
// This file defines settingpages and externalpages under the "appearance" category
$ADMIN->add('appearance', new admin_category('themes', get_string('themes')));
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', '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_configselect('hideactivitytypenavlink', get_string('hideactivitytypenavlink', 'admin'), get_string('confighideactivitytypenavlink', 'admin'), 0,
array(
0 => get_string('hidefromnone', 'admin'),
1 => get_string('hidefromstudents', 'admin'),
2 => get_string('hidefromall', 'admin')
)));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
# for CALENDAR_TF_12 and CALENDAR_TF_24 ...
require_once($CFG->dirroot . '/calendar/lib.php');
$ADMIN->add('appearance', new admin_category('themes', get_string('themes')));
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', '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_configselect('hideactivitytypenavlink', get_string('hideactivitytypenavlink', 'admin'), get_string('confighideactivitytypenavlink', 'admin'), 0,
array(
0 => get_string('hidefromnone', 'admin'),
1 => get_string('hidefromstudents', 'admin'),
2 => get_string('hidefromall', 'admin')
)));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.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'),
1 => get_string('monday', 'calendar'),
2 => get_string('tuesday', 'calendar'),
3 => get_string('wednesday', 'calendar'),
4 => get_string('thursday', 'calendar'),
5 => get_string('friday', 'calendar'),
6 => get_string('saturday', 'calendar')
)));
$temp->add(new admin_setting_special_calendar_weekend());
$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
$ADMIN->add('appearance', $temp);
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
//this is hacky because we do not want to include the stuff from calendar/lib.php
$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'),
'%I:%M %p' => get_string('timeformat_12', 'calendar'),
'%H:%M' => 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'),
1 => get_string('monday', 'calendar'),
2 => get_string('tuesday', 'calendar'),
3 => get_string('wednesday', 'calendar'),
4 => get_string('thursday', 'calendar'),
5 => get_string('friday', 'calendar'),
6 => get_string('saturday', 'calendar')
)));
$temp->add(new admin_setting_special_calendar_weekend());
$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
$ADMIN->add('appearance', $temp);
// "filtersettings" settingpage
$temp = new admin_settingpage('filtersettings', get_string('filtersettings', 'admin'));
$temp->add(new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
86400 => get_string('numdays','',1),
43200 => get_string('numhours','',12),
10800 => get_string('numhours','',3),
7200 => get_string('numhours','',2),
3600 => get_string('numhours','',1),
2700 => get_string('numminutes','',45),
1800 => get_string('numminutes','',30),
900 => get_string('numminutes','',15),
600 => get_string('numminutes','',10),
540 => get_string('numminutes','',9),
480 => get_string('numminutes','',8),
420 => get_string('numminutes','',7),
360 => get_string('numminutes','',6),
300 => get_string('numminutes','',5),
240 => get_string('numminutes','',4),
180 => get_string('numminutes','',3),
120 => get_string('numminutes','',2),
60 => get_string('numminutes','',1),
30 => get_string('numseconds','',30),
0 => get_string('no'))));
$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
'1' => get_string('allfiles'),
'2' => get_string('htmlfilesonly'))));
$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// "htmleditor" settingpage
$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_special_editorfontlist());
$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
$temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
$temp->add(new admin_setting_special_editordictionary());
}
$temp->add(new admin_setting_special_editorhidebuttons());
$temp->add(new admin_setting_emoticons());
$ADMIN->add('appearance', $temp);
// "htmlsettings" settingpage
$temp = new admin_settingpage('htmlsettings', get_string('htmlsettings', 'admin'));
$temp->add(new admin_setting_configcheckbox('formatstringstriptags', get_string('stripalltitletags', 'admin'), get_string('configstripalltitletags', 'admin'), 1));
$ADMIN->add('appearance', $temp);
// "documentation" settingpage
$temp = new admin_settingpage('documentation', get_string('moodledocs'));
$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
$ADMIN->add('appearance', $temp);
$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// new CFG variable for coursemanager (what roles to display)
$temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin'));
$temp->add(new admin_setting_special_coursemanager());
$ADMIN->add('appearance', $temp);
// "htmleditor" settingpage
$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_special_editorfontlist());
$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
$temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
$temp->add(new admin_setting_special_editordictionary());
}
$temp->add(new admin_setting_special_editorhidebuttons());
$ADMIN->add('appearance', $temp);
$temp = new admin_settingpage('ajax', get_string('ajaxuse'));
$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('disablecourseajax', get_string('disablecourseajax', 'admin'), get_string('configdisablecourseajax', 'admin'),
isset($CFG->disablecourseajax) ? 1 : empty($CFG->enableajax)));
$ADMIN->add('appearance', $temp);
// "documentation" settingpage
$temp = new admin_settingpage('documentation', get_string('moodledocs'));
$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// link to tag management interface
$ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// new CFG variable for gradebook (what roles to display)
$temp = new admin_settingpage('gradebook', get_string('gradebook', 'admin'));
$temp->add(new admin_setting_special_gradebookroles());
$ADMIN->add('appearance', $temp);
// new CFG variable for coursemanager (what roles to display)
$temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin'));
$temp->add(new admin_setting_special_coursemanager());
$ADMIN->add('appearance', $temp);
$ADMIN->add('appearance', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
$temp = new admin_settingpage('ajax', get_string('ajaxuse'));
$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// link to tag management interface
$ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
} // end of speedup
?>
+54 -42
View File
@@ -2,51 +2,63 @@
// 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','moodle/category:update'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
// "courserequests" settingpage
$temp = new admin_settingpage('courserequest', get_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests', get_string('enablecourserequests', 'admin'), get_string('configenablecourserequests', 'admin'), 0));
require_once($CFG->dirroot.'/course/lib.php');
$temp->add(new admin_setting_configselect('defaultrequestcategory', get_string('defaultrequestcategory', 'admin'), get_string('configdefaultrequestcategory', 'admin'), 1, make_categories_options()));
$ADMIN->add('courses', $temp);
if ($hassiteconfig
or has_capability('moodle/site:backup', $systemcontext)
or has_capability('moodle/category:update', $systemcontext)) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on','moodle/category:update'));
// "backups" settingpage
$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));
$temp->add(new admin_setting_backupselect('backup_sche_users', get_string('users'), get_string('backupusershelp'), 0, array(0 => get_string('all'),
1 => get_string('course'))));
$temp->add(new admin_setting_backupcheckbox('backup_sche_logs', get_string('logs'), get_string('backuplogshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_userfiles', get_string('userfiles'), get_string('backupuserfileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_coursefiles', get_string('coursefiles'), get_string('backupcoursefileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_sitefiles', get_string('sitefiles'), get_string('backupsitefileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0));
$temp->add(new admin_setting_backupselect('backup_sche_keep', get_string('keep'), get_string('backupkeephelp'), 1, array(0 => get_string('all'),
1 => '1',
2 => '2',
5 => '5',
10 => '10',
20 => '20',
30 => '30',
40 => '40',
50 => '50',
100 => '100',
200 => '200',
300 => '300',
400 => '400',
500 => '500')));
$temp->add(new admin_setting_backupcheckbox('backup_sche_active', get_string('active'), get_string('backupactivehelp'), 0));
$temp->add(new admin_setting_special_backupdays());
$temp->add(new admin_setting_special_backuptime());
$temp->add(new admin_setting_special_backupsaveto());
$ADMIN->add('courses', $temp);
$ADMIN->add('courses', new admin_enrolment_page());
// "courserequests" settingpage
$temp = new admin_settingpage('courserequest', get_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests', get_string('enablecourserequests', 'admin'), get_string('configenablecourserequests', 'admin'), 0));
$temp->add(new admin_settings_coursecat_select('defaultrequestcategory', get_string('defaultrequestcategory', 'admin'), get_string('configdefaultrequestcategory', 'admin'), 1));
$ADMIN->add('courses', $temp);
// "backups" settingpage
if (!empty($CFG->backup_version)) {
$bi = array();
$bi[] = new admin_setting_configcheckbox('backup_sche_modules', get_string('includemodules'), get_string('backupincludemoduleshelp'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_withuserdata', get_string('includemoduleuserdata'), get_string('backupincludemoduleuserdatahelp'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_metacourse', get_string('metacourse'), get_string('backupmetacoursehelp'), 0);
$bi[] = new admin_setting_configselect('backup_sche_users', get_string('users'), get_string('backupusershelp'),
0, array(0 => get_string('all'), 1 => get_string('course')));
$bi[] = new admin_setting_configcheckbox('backup_sche_logs', get_string('logs'), get_string('backuplogshelp'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_userfiles', get_string('userfiles'), get_string('backupuserfileshelp'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_coursefiles', get_string('coursefiles'), get_string('backupcoursefileshelp'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_sitefiles', get_string('sitefiles'), get_string('backupsitefileshelp'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0);
$bi[] = new admin_setting_configcheckbox('backup_sche_blogs', get_string('blogs', 'blog'), get_string('backupblogshelp','blog'), 0);
$bi[] = new admin_setting_configselect('backup_sche_keep', get_string('keep'),
get_string('backupkeephelp'), 1, array(0 => get_string('all'), 1 => '1',
2 => '2',
5 => '5',
10 => '10',
20 => '20',
30 => '30',
40 => '40',
50 => '50',
100 => '100',
200 => '200',
300 => '300',
400 => '400',
500 => '500'));
$bi[] = new admin_setting_configcheckbox('backup_sche_active', get_string('active'), get_string('backupactivehelp'), 0);
$bi[] = new admin_setting_special_backupdays();
$bi[] = new admin_setting_configtime('backup_sche_hour', 'backup_sche_minute', get_string('executeat'),
get_string('backupexecuteathelp'), array('h' => 0, 'm' => 0));
$bi[] = new admin_setting_configdirectory('backup_sche_destination', get_string('saveto'), get_string('backupsavetohelp'), '');
$temp = new admin_settingpage('backups', get_string('backups','admin'), 'moodle/site:backup');
foreach ($bi as $backupitem) {
$backupitem->plugin = 'backup';
$temp->add($backupitem);
}
$ADMIN->add('courses', $temp);
}
} // end of speedup
?>
+24 -7
View File
@@ -5,13 +5,20 @@
if (get_site()) { //do not use during installation
$frontpagecontext = get_context_instance(CONTEXT_COURSE, SITEID);
if (has_capability('moodle/site:config', $systemcontext)
or has_capability('moodle/course:update', $frontpagecontext)
or has_capability('moodle/role:assign', $frontpagecontext)
or has_capability('moodle/site:restore', $frontpagecontext)
or has_capability('moodle/site:backup', $frontpagecontext)
or has_capability('moodle/course:managefiles', $frontpagecontext)
) {
if ($hassiteconfig or has_any_capability(array(
'moodle/course:update',
'moodle/role:assign',
'moodle/site:restore',
'moodle/site:backup',
'moodle/course:managefiles',
'moodle/question:add',
'moodle/question:editmine',
'moodle/question:editall',
'moodle/question:viewmine',
'moodle/question:viewall',
'moodle/question:movemine',
'moodle/question:moveall'), $frontpagecontext)) {
// "frontpage" settingpage
$temp = new admin_settingpage('frontpagesettings', get_string('frontpagesettings','admin'), 'moodle/course:update', false, $frontpagecontext);
$temp->add(new admin_setting_sitesettext('fullname', get_string('fullsitename'), '', NULL)); // no default
@@ -52,6 +59,16 @@ if (get_site()) { //do not use during installation
$ADMIN->add('frontpage', new admin_externalpage('frontpagerestore', get_string('frontpagerestore', 'admin'), $CFG->wwwroot.'/files/index.php?id='.SITEID.'&amp;wdir=/backupdata', 'moodle/site:restore', false, $frontpagecontext));
$questioncapabilites = array(
'moodle/question:add',
'moodle/question:editmine',
'moodle/question:editall',
'moodle/question:viewmine',
'moodle/question:viewall',
'moodle/question:movemine',
'moodle/question:moveall');
$ADMIN->add('frontpage', new admin_externalpage('frontpagequestions', get_string('frontpagequestions', 'admin'), $CFG->wwwroot.'/question/edit.php?courseid='.SITEID, $questioncapabilites, false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('sitefiles', get_string('sitefiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID, 'moodle/course:managefiles', false, $frontpagecontext));
}
}
+164 -123
View File
@@ -2,153 +2,194 @@
// This file defines settingpages and externalpages under the "grades" section
// General settings
if (has_capability('moodle/grade:manage', $systemcontext)
or has_capability('moodle/grade:manageletters', $systemcontext)) { // speedup for non-admins, add all caps used on this page
require_once $CFG->libdir.'/grade/constants.php';
// General settings
$temp = new admin_settingpage('gradessettings', get_string('gradessettings', 'grades'));
$temp = new admin_settingpage('gradessettings', get_string('generalsettings', 'grades'), 'moodle/grade:manage');
if ($ADMIN->fulltree) {
require_once $CFG->libdir.'/grade/constants.php';
// enable outcomes checkbox
$temp->add(new admin_setting_configcheckbox('enableoutcomes', get_string('enableoutcomes', 'grades'), get_string('configenableoutcomes', 'grades'), 0, PARAM_INT));
// enable publishing in exports/imports
$temp->add(new admin_setting_configcheckbox('gradepublishing', get_string('gradepublishing', 'grades'), get_string('configgradepublishing', 'grades'), 0, PARAM_INT));
// new CFG variable for gradebook (what roles to display)
$temp->add(new admin_setting_special_gradebookroles());
$temp->add(new admin_setting_configselect('grade_aggregationposition', get_string('aggregationposition', 'grades'),
get_string('configaggregationposition', 'grades'), GRADE_REPORT_AGGREGATION_POSITION_LAST,
array(GRADE_REPORT_AGGREGATION_POSITION_FIRST => get_string('positionfirst', 'grades'),
GRADE_REPORT_AGGREGATION_POSITION_LAST => get_string('positionlast', 'grades'))));
// enable outcomes checkbox
$temp->add(new admin_setting_configcheckbox('enableoutcomes', get_string('enableoutcomes', 'grades'), get_string('configenableoutcomes', 'grades'), 0, PARAM_INT));
$temp->add(new admin_setting_configselect('grade_displaytype', get_string('gradedisplaytype', 'grades'),
get_string('configgradedisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
array(GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades'))));
$temp->add(new admin_setting_grade_profilereport());
$temp->add(new admin_setting_configselect('grade_decimalpoints', get_string('decimalpoints', 'grades'),
get_string('configdecimalpoints', 'grades'), 2,
array( '0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5')));
$temp->add(new admin_setting_configselect('grade_aggregationposition', get_string('aggregationposition', 'grades'),
get_string('configaggregationposition', 'grades'), GRADE_REPORT_AGGREGATION_POSITION_LAST,
array(GRADE_REPORT_AGGREGATION_POSITION_FIRST => get_string('positionfirst', 'grades'),
GRADE_REPORT_AGGREGATION_POSITION_LAST => get_string('positionlast', 'grades'))));
$temp->add(new admin_setting_configselect('grade_export_displaytype', get_string('gradeexportdisplaytype', 'grades'),
get_string('configgradeexportdisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
array(GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades'))));
$temp->add(new admin_setting_regradingcheckbox('grade_includescalesinaggregation', get_string('includescalesinaggregation', 'grades'), get_string('configincludescalesinaggregation', 'grades'), 1));
$temp->add(new admin_setting_configselect('grade_export_decimalpoints', get_string('gradeexportdecimalpoints', 'grades'),
get_string('configexportdecimalpoints', 'grades'), 2,
array( '0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5')));
$temp->add(new admin_setting_special_gradeexport());
$ADMIN->add('grades', $temp);
$temp->add(new admin_setting_configcheckbox('grade_hiddenasdate', get_string('hiddenasdate', 'grades'), get_string('confighiddenasdate', 'grades'), 0));
/// Scales and outcomes
// enable publishing in exports/imports
$temp->add(new admin_setting_configcheckbox('gradepublishing', get_string('gradepublishing', 'grades'), get_string('configgradepublishing', 'grades'), 0));
$scales = new admin_externalpage('scales', get_string('scales'), $CFG->wwwroot.'/grade/edit/scale/index.php', 'moodle/grade:manage');
$ADMIN->add('grades', $scales);
$outcomes = new admin_externalpage('outcomes', get_string('outcomes', 'grades'), $CFG->wwwroot.'/grade/edit/outcome/index.php', 'moodle/grade:manage');
$ADMIN->add('grades', $outcomes);
$letters = new admin_externalpage('letters', get_string('letters', 'grades'), $CFG->wwwroot.'/grade/edit/letter/edit.php', 'moodle/grade:manageletters');
$ADMIN->add('grades', $letters);
$temp->add(new admin_setting_configselect('grade_export_displaytype', get_string('gradeexportdisplaytype', 'grades'),
get_string('configgradeexportdisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
array(GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades'))));
/// Grade category settings
$temp = new admin_settingpage('gradecategorysettings', get_string('gradecategorysettings', 'grades'));
$temp->add(new admin_setting_configselect('grade_export_decimalpoints', get_string('gradeexportdecimalpoints', 'grades'),
get_string('configexportdecimalpoints', 'grades'), 2,
array( '0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5')));
$strnoforce = get_string('noforce', 'grades');
// Aggregation type
$options = array(-1 => $strnoforce,
GRADE_AGGREGATE_MEAN =>get_string('aggregatemean', 'grades'),
GRADE_AGGREGATE_MEDIAN =>get_string('aggregatemedian', 'grades'),
GRADE_AGGREGATE_MIN =>get_string('aggregatemin', 'grades'),
GRADE_AGGREGATE_MAX =>get_string('aggregatemax', 'grades'),
GRADE_AGGREGATE_MODE =>get_string('aggregatemode', 'grades'),
GRADE_AGGREGATE_WEIGHTED_MEAN =>get_string('aggregateweightedmean', 'grades'),
GRADE_AGGREGATE_EXTRACREDIT_MEAN=>get_string('aggregateextracreditmean', 'grades'));
$temp->add(new admin_setting_configselect('grade_aggregation', get_string('aggregation', 'grades'), get_string('aggregationhelp', 'grades'), -1, $options));
$options = array(-1 => $strnoforce, 0 => get_string('forceoff', 'grades'), 1 => get_string('forceon', 'grades'));
$temp->add(new admin_setting_configselect('grade_aggregateonlygraded', get_string('aggregateonlygraded', 'grades'),
get_string('aggregateonlygradedhelp', 'grades'), -1, $options));
$temp->add(new admin_setting_configselect('grade_aggregateoutcomes', get_string('aggregateoutcomes', 'grades'),
get_string('aggregateoutcomeshelp', 'grades'), -1, $options));
$temp->add(new admin_setting_configselect('grade_aggregatesubcats', get_string('aggregatesubcats', 'grades'),
get_string('aggregatesubcatshelp', 'grades'), -1, $options));
$options = array(-1 => $strnoforce, 0 => get_string('none'));
for ($i=1; $i<=20; $i++) {
$options[$i] = $i;
}
$temp->add(new admin_setting_configselect('grade_keephigh', get_string('keephigh', 'grades'),
get_string('keephighhelp', 'grades'), -1, $options));
$temp->add(new admin_setting_configselect('grade_droplow', get_string('droplow', 'grades'),
get_string('droplowhelp', 'grades'), -1, $options));
$ADMIN->add('grades', $temp);
// The plugins must implement a settings.php file that adds their admin settings to the $settings object
// Reports
$first = true;
foreach (get_list_of_plugins('grade/report') as $plugin) {
// Include all the settings commands for this plugin if there are any
if ($first) {
$ADMIN->add('grades', new admin_category('gradereports', get_string('reportsettings', 'grades')));
$first = false;
$temp->add(new admin_setting_special_gradeexport());
}
$ADMIN->add('grades', $temp);
if (file_exists($CFG->dirroot.'/grade/report/'.$plugin.'/settings.php')) {
/// Grade category settings
$temp = new admin_settingpage('gradecategorysettings', get_string('gradecategorysettings', 'grades'), 'moodle/grade:manage');
if ($ADMIN->fulltree) {
$temp->add(new admin_setting_configcheckbox('grade_hideforcedsettings', get_string('hideforcedsettings', 'grades'), get_string('confighideforcedsettings', 'grades'), '1'));
$settings = new admin_settingpage('gradereport'.$plugin, get_string('modulename', 'gradereport_'.$plugin));
include_once($CFG->dirroot.'/grade/report/'.$plugin.'/settings.php');
$ADMIN->add('gradereports', $settings);
}
}
$strnoforce = get_string('noforce', 'grades');
// Imports
// Aggregation type
$options = array(GRADE_AGGREGATE_MEAN =>get_string('aggregatemean', 'grades'),
GRADE_AGGREGATE_WEIGHTED_MEAN =>get_string('aggregateweightedmean', 'grades'),
GRADE_AGGREGATE_WEIGHTED_MEAN2 =>get_string('aggregateweightedmean2', 'grades'),
GRADE_AGGREGATE_EXTRACREDIT_MEAN=>get_string('aggregateextracreditmean', 'grades'),
GRADE_AGGREGATE_MEDIAN =>get_string('aggregatemedian', 'grades'),
GRADE_AGGREGATE_MIN =>get_string('aggregatemin', 'grades'),
GRADE_AGGREGATE_MAX =>get_string('aggregatemax', 'grades'),
GRADE_AGGREGATE_MODE =>get_string('aggregatemode', 'grades'),
GRADE_AGGREGATE_SUM =>get_string('aggregatesum', 'grades'));
$defaults = array('value'=>GRADE_AGGREGATE_WEIGHTED_MEAN2, 'forced'=>false, 'adv'=>false);
$temp->add(new admin_setting_gradecat_combo('grade_aggregation', get_string('aggregation', 'grades'), get_string('aggregationhelp', 'grades'), $defaults, $options));
$first = true;
foreach (get_list_of_plugins('grade/import') as $plugin) {
$options = array(0 => get_string('no'), 1 => get_string('yes'));
// Include all the settings commands for this plugin if there are any
if (file_exists($CFG->dirroot.'/grade/import/'.$plugin.'/settings.php')) {
if ($first) {
$ADMIN->add('grades', new admin_category('gradeimports', get_string('imports')));
$first = false;
$defaults = array('value'=>1, 'forced'=>false, 'adv'=>true);
$temp->add(new admin_setting_gradecat_combo('grade_aggregateonlygraded', get_string('aggregateonlygraded', 'grades'),
get_string('aggregateonlygradedhelp', 'grades'), $defaults, $options));
$defaults = array('value'=>0, 'forced'=>false, 'adv'=>true);
$temp->add(new admin_setting_gradecat_combo('grade_aggregateoutcomes', get_string('aggregateoutcomes', 'grades'),
get_string('aggregateoutcomeshelp', 'grades'), $defaults, $options));
$temp->add(new admin_setting_gradecat_combo('grade_aggregatesubcats', get_string('aggregatesubcats', 'grades'),
get_string('aggregatesubcatshelp', 'grades'), $defaults, $options));
$options = array(0 => get_string('none'));
for ($i=1; $i<=20; $i++) {
$options[$i] = $i;
}
$settings = new admin_settingpage('gradeimport'.$plugin, get_string('modulename', 'gradeimport_'.$plugin));
include_once($CFG->dirroot.'/grade/import/'.$plugin.'/settings.php');
$ADMIN->add('gradeimports', $settings);
$defaults['value'] = 0;
$defaults['forced'] = true;
$temp->add(new admin_setting_gradecat_combo('grade_keephigh', get_string('keephigh', 'grades'),
get_string('keephighhelp', 'grades'), $defaults, $options));
$defaults['forced'] = false;
$temp->add(new admin_setting_gradecat_combo('grade_droplow', get_string('droplow', 'grades'),
get_string('droplowhelp', 'grades'), $defaults, $options));
}
}
$ADMIN->add('grades', $temp);
// Exports
/// Grade item settings
$temp = new admin_settingpage('gradeitemsettings', get_string('gradeitemsettings', 'grades'), 'moodle/grade:manage');
if ($ADMIN->fulltree) {
$temp->add(new admin_setting_configselect('grade_displaytype', get_string('gradedisplaytype', 'grades'),
get_string('configgradedisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
array(GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades'))));
$first = true;
foreach (get_list_of_plugins('grade/export') as $plugin) {
// Include all the settings commands for this plugin if there are any
if (file_exists($CFG->dirroot.'/grade/export/'.$plugin.'/settings.php')) {
if ($first) {
$ADMIN->add('grades', new admin_category('gradeexports', get_string('exports')));
$first = false;
$temp->add(new admin_setting_configselect('grade_decimalpoints', get_string('decimalpoints', 'grades'),
get_string('configdecimalpoints', 'grades'), 2,
array( '0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5')));
$temp->add(new admin_setting_configmultiselect('grade_item_advanced', get_string('gradeitemadvanced', 'grades'), get_string('configgradeitemadvanced', 'grades'),
array('iteminfo', 'idnumber', 'gradepass', 'plusfactor', 'multfactor', 'display', 'decimals', 'hiddenuntil', 'locktime'),
array('iteminfo' => get_string('iteminfo', 'grades'),
'idnumber' => get_string('idnumbermod'),
'gradetype' => get_string('gradetype', 'grades'),
'scaleid' => get_string('scale'),
'grademin' => get_string('grademin', 'grades'),
'grademax' => get_string('grademax', 'grades'),
'gradepass' => get_string('gradepass', 'grades'),
'plusfactor' => get_string('plusfactor', 'grades'),
'multfactor' => get_string('multfactor', 'grades'),
'display' => get_string('gradedisplaytype', 'grades'),
'decimals' => get_string('decimalpoints', 'grades'),
'hidden' => get_string('hidden', 'grades'),
'hiddenuntil' => get_string('hiddenuntil', 'grades'),
'locked' => get_string('locked', 'grades'),
'locktime' => get_string('locktime', 'grades'),
'aggregationcoef' => get_string('aggregationcoef', 'grades'),
'parentcategory' => get_string('parentcategory', 'grades'))));
}
$ADMIN->add('grades', $temp);
/// Scales and outcomes
$scales = new admin_externalpage('scales', get_string('scales'), $CFG->wwwroot.'/grade/edit/scale/index.php', 'moodle/grade:manage');
$ADMIN->add('grades', $scales);
$outcomes = new admin_externalpage('outcomes', get_string('outcomes', 'grades'), $CFG->wwwroot.'/grade/edit/outcome/index.php', 'moodle/grade:manage');
$ADMIN->add('grades', $outcomes);
$letters = new admin_externalpage('letters', get_string('letters', 'grades'), $CFG->wwwroot.'/grade/edit/letter/edit.php', 'moodle/grade:manageletters');
$ADMIN->add('grades', $letters);
// The plugins must implement a settings.php file that adds their admin settings to the $settings object
// Reports
$ADMIN->add('grades', new admin_category('gradereports', get_string('reportsettings', 'grades')));
foreach (get_list_of_plugins('grade/report') as $plugin) {
// Include all the settings commands for this plugin if there are any
if (file_exists($CFG->dirroot.'/grade/report/'.$plugin.'/settings.php')) {
$settings = new admin_settingpage('gradereport'.$plugin, get_string('modulename', 'gradereport_'.$plugin), 'moodle/grade:manage');
if ($ADMIN->fulltree) {
include($CFG->dirroot.'/grade/report/'.$plugin.'/settings.php');
}
$ADMIN->add('gradereports', $settings);
}
$settings = new admin_settingpage('gradeexport'.$plugin, get_string('modulename', 'gradeexport_'.$plugin));
include_once($CFG->dirroot.'/grade/export/'.$plugin.'/settings.php');
$ADMIN->add('gradeexports', $settings);
}
}
// Imports
$ADMIN->add('grades', new admin_category('gradeimports', get_string('importsettings', 'grades')));
foreach (get_list_of_plugins('grade/import') as $plugin) {
// Include all the settings commands for this plugin if there are any
if (file_exists($CFG->dirroot.'/grade/import/'.$plugin.'/settings.php')) {
$settings = new admin_settingpage('gradeimport'.$plugin, get_string('modulename', 'gradeimport_'.$plugin), 'moodle/grade:manage');
if ($ADMIN->fulltree) {
include($CFG->dirroot.'/grade/import/'.$plugin.'/settings.php');
}
$ADMIN->add('gradeimports', $settings);
}
}
// Exports
$ADMIN->add('grades', new admin_category('gradeexports', get_string('exportsettings', 'grades')));
foreach (get_list_of_plugins('grade/export') as $plugin) {
// Include all the settings commands for this plugin if there are any
if (file_exists($CFG->dirroot.'/grade/export/'.$plugin.'/settings.php')) {
$settings = new admin_settingpage('gradeexport'.$plugin, get_string('modulename', 'gradeexport_'.$plugin), 'moodle/grade:manage');
if ($ADMIN->fulltree) {
include($CFG->dirroot.'/grade/export/'.$plugin.'/settings.php');
}
$ADMIN->add('gradeexports', $settings);
}
}
} // end of speedup
?>
+19 -12
View File
@@ -2,21 +2,28 @@
// This file defines settingpages and externalpages under the "appearance" category
// "languageandlocation" settingpage
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_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));
if ($hassiteconfig
or has_capability('moodle/site:langeditmaster', $systemcontext)
or has_capability('moodle/site:langeditlocal', $systemcontext)) { // speedup for non-admins, add all caps used on this page
// 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')));
// "languageandlocation" settingpage
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configcheckbox('autolang', get_string('autolang', 'admin'), get_string('configautolang', 'admin'), 1));
$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_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', $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"));
$ADMIN->add('language', new admin_externalpage('langedit', get_string('langedit', 'admin'), "$CFG->wwwroot/$CFG->admin/lang.php", array('moodle/site:langeditmaster', 'moodle/site:langeditlocal') ));
$ADMIN->add('language', new admin_externalpage('langimport', get_string('langpacks', 'admin'), "$CFG->wwwroot/$CFG->admin/langimport.php"));
} // end of speedup
?>
+19 -19
View File
@@ -1,27 +1,27 @@
<?php // $Id$
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', get_string('locationsettings', 'admin'));
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
$options[0] = get_string('choose') .'...';
$temp->add(new admin_setting_configselect('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0, $options));
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$iplookups = array();
if ($plugins = get_list_of_plugins('iplookup')) {
foreach ($plugins as $plugin) {
$iplookups[$plugin] = $plugin;
}
}
$temp->add(new admin_setting_configselect('iplookup', get_string('iplookup', 'admin'), get_string('configiplookup', 'admin'), 'hostip', $iplookups));
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', get_string('locationsettings', 'admin'));
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
$options[0] = get_string('choose') .'...';
$temp->add(new admin_setting_configselect('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0, $options));
$ADMIN->add('location', $temp);
$temp->add(new admin_setting_heading('iplookup', get_string('iplookup', 'admin'), get_string('iplookupinfo', 'admin')));
$temp->add(new admin_setting_configfile('geoipfile', get_string('geoipfile', 'admin'), get_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLiteCity.dat'));
$temp->add(new admin_setting_configtext('googlemapkey', get_string('googlemapkey', 'admin'), get_string('configgooglemapkey', 'admin', $CFG->wwwroot), ''));
$ADMIN->add('location', $temp);
$ADMIN->add('location', new admin_externalpage('timezoneimport', get_string('updatetimezones', 'admin'), "$CFG->wwwroot/$CFG->admin/timezoneimport.php"));
$ADMIN->add('location', new admin_externalpage('timezoneimport', get_string('updatetimezones', 'admin'), "$CFG->wwwroot/$CFG->admin/timezoneimport.php"));
} // end of speedup
?>
+20 -14
View File
@@ -2,23 +2,29 @@
// * Miscellaneous settings
// Experimental settings page
$temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('smartpix', get_string('smartpix', 'admin'), get_string('configsmartpix', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enablehtmlpurifier', get_string('enablehtmlpurifier', 'admin'), get_string('configenablehtmlpurifier', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enablegroupings', get_string('enablegroupings', 'admin'), get_string('configenablegroupings', 'admin'), 0));
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('misc', $temp);
// Experimental settings page
$temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('smartpix', get_string('smartpix', 'admin'), get_string('configsmartpix', 'admin'), 0));
$item = new admin_setting_configcheckbox('enablehtmlpurifier', get_string('enablehtmlpurifier', 'admin'), get_string('configenablehtmlpurifier', 'admin'), 0);
$item->set_updatedcallback('reset_text_filters_cache');
$temp->add($item);
$temp->add(new admin_setting_configcheckbox('enablegroupings', get_string('enablegroupings', 'admin'), get_string('configenablegroupings', 'admin'), 0));
// XMLDB editor
$ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "$CFG->wwwroot/$CFG->admin/xmldb/"));
$ADMIN->add('misc', $temp);
// XMLDB editor
$ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "$CFG->wwwroot/$CFG->admin/xmldb/"));
// hidden scripts linked from elsewhere
$ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot.'/'.$CFG->admin.'/oacleanup.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot.'/'.$CFG->admin.'/upgradeforumread.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradelogs', 'Upgrade logs', $CFG->wwwroot.'/'.$CFG->admin.'/upgradelogs.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('multilangupgrade', get_string('multilangupgrade', 'admin'), $CFG->wwwroot.'/'.$CFG->admin.'/multilangupgrade.php', 'moodle/site:config', !empty($CFG->filter_multilang_converted)));
// hidden scripts linked from elsewhere
$ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot.'/'.$CFG->admin.'/oacleanup.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot.'/'.$CFG->admin.'/upgradeforumread.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradelogs', 'Upgrade logs', $CFG->wwwroot.'/'.$CFG->admin.'/upgradelogs.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('multilangupgrade', get_string('multilangupgrade', 'admin'), $CFG->wwwroot.'/'.$CFG->admin.'/multilangupgrade.php', 'moodle/site:config', !empty($CFG->filter_multilang_converted)));
} // end of speedup
?>
+15 -9
View File
@@ -2,20 +2,26 @@
// This file defines settingpages and externalpages under the "mnet" category
$ADMIN->add('mnet', new admin_externalpage('net', get_string('settings', 'mnet'),
$CFG->wwwroot . '/admin/mnet/index.php',
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('mnet', new admin_externalpage('net', get_string('settings', 'mnet'),
"$CFG->wwwroot/$CFG->admin/mnet/index.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('mnetpeers', 'mnet'),
$CFG->wwwroot . '/admin/mnet/peers.php',
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('mnetpeers', 'mnet'),
"$CFG->wwwroot/$CFG->admin/mnet/peers.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', get_string('ssoaccesscontrol', 'mnet'),
$CFG->wwwroot . '/admin/mnet/access_control.php',
"$CFG->wwwroot/$CFG->admin/mnet/access_control.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol', 'mnet'),
$CFG->wwwroot . '/admin/mnet/enr_hosts.php',
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol', 'mnet'),
"$CFG->wwwroot/$CFG->admin/mnet/enr_hosts.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', get_string('trustedhosts', 'mnet'),
$CFG->wwwroot . '/admin/mnet/trustedhosts.php',
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', get_string('trustedhosts', 'mnet'),
"$CFG->wwwroot/$CFG->admin/mnet/trustedhosts.php",
'moodle/site:config'));
} // end of speedup
?>
+146
View File
@@ -0,0 +1,146 @@
<?php //$Id$
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('modsettings', get_string('activities')));
$ADMIN->add('modsettings', new admin_page_managemods());
if ($modules = get_records('modules')) {
$modulebyname = array();
foreach ($modules as $module) {
$strmodulename = get_string('modulename', $module->name);
// Deal with modules which are lacking the language string
if ($strmodulename == '[[modulename]]') {
$textlib = textlib_get_instance();
$strmodulename = $textlib->strtotitle($module->name);
}
$modulebyname[$strmodulename] = $module;
}
ksort($modulebyname);
foreach ($modulebyname as $strmodulename=>$module) {
$modulename = $module->name;
if (file_exists($CFG->dirroot.'/mod/'.$modulename.'/settingstree.php')) {
include($CFG->dirroot.'/mod/'.$modulename.'/settingstree.php');
} else if (file_exists($CFG->dirroot.'/mod/'.$modulename.'/settings.php')) {
// do not show disabled modules in tree, keep only settings link on manage page
$settings = new admin_settingpage('modsetting'.$modulename, $strmodulename, 'moodle/site:config', !$module->visible);
if ($ADMIN->fulltree) {
include($CFG->dirroot.'/mod/'.$modulename.'/settings.php');
}
$ADMIN->add('modsettings', $settings);
} else if (file_exists($CFG->dirroot.'/mod/'.$modulename.'/config.html')) {
$ADMIN->add('modsettings', new admin_externalpage('modsetting'.$modulename, $strmodulename, "$CFG->wwwroot/$CFG->admin/module.php?module=$modulename", 'moodle/site:config', !$module->visible));
}
}
}
$ADMIN->add('modules', new admin_category('blocksettings', get_string('blocks')));
$ADMIN->add('blocksettings', new admin_page_manageblocks());
$ADMIN->add('blocksettings', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
if (!empty($CFG->blocks_version) and $blocks = get_records('block')) {
$blockbyname = array();
foreach ($blocks as $block) {
if(($blockobject = block_instance($block->name)) === false) {
// Failed to load
continue;
}
$blockbyname[$blockobject->get_title()] = $block;
}
ksort($blockbyname);
foreach ($blockbyname as $strblockname=>$block) {
$blockname = $block->name;
if (file_exists($CFG->dirroot.'/blocks/'.$blockname.'/settings.php')) {
$settings = new admin_settingpage('blocksetting'.$blockname, $strblockname, 'moodle/site:config', !$block->visible);
if ($ADMIN->fulltree) {
include($CFG->dirroot.'/blocks/'.$blockname.'/settings.php');
}
$ADMIN->add('blocksettings', $settings);
} else if (file_exists($CFG->dirroot.'/blocks/'.$blockname.'/config_global.html')) {
$ADMIN->add('blocksettings', new admin_externalpage('blocksetting'.$blockname, $strblockname, "$CFG->wwwroot/$CFG->admin/block.php?block=$block->id", 'moodle/site:config', !$block->visible));
}
}
}
$ADMIN->add('modules', new admin_category('filtersettings', get_string('managefilters')));
// "filtersettings" settingpage
$temp = new admin_settingpage('managefilters', get_string('filtersettings', 'admin'));
if ($ADMIN->fulltree) {
$items = array();
$items[] = new admin_setting_managefilters();
$items[] = new admin_setting_heading('managefilterscommonheading', get_string('commonsettings', 'admin'), '');
$items[] = new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
86400 => get_string('numdays','',1),
43200 => get_string('numhours','',12),
10800 => get_string('numhours','',3),
7200 => get_string('numhours','',2),
3600 => get_string('numhours','',1),
2700 => get_string('numminutes','',45),
1800 => get_string('numminutes','',30),
900 => get_string('numminutes','',15),
600 => get_string('numminutes','',10),
540 => get_string('numminutes','',9),
480 => get_string('numminutes','',8),
420 => get_string('numminutes','',7),
360 => get_string('numminutes','',6),
300 => get_string('numminutes','',5),
240 => get_string('numminutes','',4),
180 => get_string('numminutes','',3),
120 => get_string('numminutes','',2),
60 => get_string('numminutes','',1),
30 => get_string('numseconds','',30),
0 => get_string('no')));
$items[] = new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
'1' => get_string('allfiles'),
'2' => get_string('htmlfilesonly')));
$items[] = new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0);
$items[] = new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0);
$items[] = new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0);
foreach ($items as $item) {
$item->set_updatedcallback('reset_text_filters_cache');
$temp->add($item);
}
}
$ADMIN->add('filtersettings', $temp);
if (empty($CFG->textfilters)) {
$activefilters = array();
} else {
$activefilters = explode(',', $CFG->textfilters);
}
$filterlocations = array('mod','filter');
foreach ($filterlocations as $filterlocation) {
$filters = get_list_of_plugins($filterlocation);
$filterbyname = array();
foreach ($filters as $filter) {
$strfiltername = get_string('filtername', $filter);
// Deal with filters which are lacking the language string
if ($strfiltername == '[[filtername]]') {
$textlib = textlib_get_instance();
$strfiltername = $textlib->strtotitle($filter);
}
$filterbyname[$strfiltername] = "$filterlocation/$filter";
}
ksort($filterbyname);
foreach ($filterbyname as $strfiltername=>$filterfull) {
if (file_exists("$CFG->dirroot/$filterfull/filtersettings.php")) {
$settings = new admin_settingpage('filtersetting'.str_replace('/', '', $filterfull), $strfiltername, 'moodle/site:config', !in_array($filterfull, $activefilters));
if ($ADMIN->fulltree) {
include("$CFG->dirroot/$filterfull/filtersettings.php");
}
$ADMIN->add('filtersettings', $settings);
} else if (file_exists("$CFG->dirroot/$filterfull/filterconfig.html")) {
$ADMIN->add('filtersettings', new admin_externalpage('filtersetting'.str_replace('/', '', $filterfull), $strfiltername, "$CFG->wwwroot/$CFG->admin/filter.php?filter=$filterfull", !in_array($filterfull, $activefilters)));
}
}
}
}
?>
+95 -89
View File
@@ -1,111 +1,117 @@
<?php // $Id$
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// "sitepolicies" settingpage
$temp = new admin_settingpage('sitepolicies', get_string('sitepolicies', 'admin'));
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
// "sitepolicies" settingpage
$temp = new admin_settingpage('sitepolicies', get_string('sitepolicies', 'admin'));
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$max_upload_choices = get_max_upload_sizes();
// maxbytes set to 0 will allow the maxium server lmit for uploads
$max_upload_choices[0] = get_string('serverlimit', 'admin');
$temp->add(new admin_setting_configselect('maxbytes', get_string('maxbytes', 'admin'), get_string('configmaxbytes', 'admin'), 0, $max_upload_choices));
$max_upload_choices = get_max_upload_sizes();
// maxbytes set to 0 will allow the maxium server lmit for uploads
$max_upload_choices[0] = get_string('serverlimit', 'admin');
$temp->add(new admin_setting_configselect('maxbytes', get_string('maxbytes', 'admin'), get_string('configmaxbytes', 'admin'), 0, $max_upload_choices));
$temp->add(new admin_setting_configcheckbox('messaging', get_string('messaging', 'admin'), get_string('configmessaging','admin'), 1));
$temp->add(new admin_setting_configcheckbox('allowobjectembed', get_string('allowobjectembed', 'admin'), get_string('configallowobjectembed', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enabletrusttext', get_string('enabletrusttext', 'admin'), get_string('configenabletrusttext', 'admin'), 0));
$temp->add(new admin_setting_configselect('maxeditingtime', get_string('maxeditingtime','admin'), get_string('configmaxeditingtime','admin'), 1800,
array(60 => get_string('numminutes', '', 1),
300 => get_string('numminutes', '', 5),
900 => get_string('numminutes', '', 15),
1800 => get_string('numminutes', '', 30),
2700 => get_string('numminutes', '', 45),
3600 => get_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnamedisplay', 'admin'), get_string('configfullnamedisplay', 'admin'),
'firstname lastname', array('language' => get_string('language'),
'firstname lastname' => get_string('firstname') . ' + ' . get_string('lastname'),
'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_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 => get_string('groupblogs','blog'),
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('usetags', get_string('usetags','admin'),get_string('configusetags', 'admin'),'1'));
$temp->add(new admin_setting_configcheckbox('keeptagnamecase', get_string('keeptagnamecase','admin'),get_string('configkeeptagnamecase', 'admin'),'0'));
$temp->add(new admin_setting_configcheckbox('cronclionly', get_string('cronclionly', 'admin'), get_string('configcronclionly', 'admin'), 0));
$temp->add(new admin_setting_configpasswordunmask('cronremotepassword', get_string('cronremotepassword', 'admin'), get_string('configcronremotepassword', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configcheckbox('messaging', get_string('messaging', 'admin'), get_string('configmessaging','admin'), 1));
$temp->add(new admin_setting_configcheckbox('allowobjectembed', get_string('allowobjectembed', 'admin'), get_string('configallowobjectembed', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enabletrusttext', get_string('enabletrusttext', 'admin'), get_string('configenabletrusttext', 'admin'), 0));
$temp->add(new admin_setting_configselect('maxeditingtime', get_string('maxeditingtime','admin'), get_string('configmaxeditingtime','admin'), 1800,
array(60 => get_string('numminutes', '', 1),
300 => get_string('numminutes', '', 5),
900 => get_string('numminutes', '', 15),
1800 => get_string('numminutes', '', 30),
2700 => get_string('numminutes', '', 45),
3600 => get_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnamedisplay', 'admin'), get_string('configfullnamedisplay', 'admin'),
'firstname lastname', array('language' => get_string('language'),
'firstname lastname' => get_string('firstname').' + '.get_string('lastname'),
'lastname firstname' => get_string('lastname').' + '.get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_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 => get_string('groupblogs','blog'),
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('usetags', get_string('usetags','admin'),get_string('configusetags', 'admin'),'1'));
$temp->add(new admin_setting_configcheckbox('keeptagnamecase', get_string('keeptagnamecase','admin'),get_string('configkeeptagnamecase', 'admin'),'1'));
$temp->add(new admin_setting_configcheckbox('cronclionly', get_string('cronclionly', 'admin'), get_string('configcronclionly', 'admin'), 0));
$temp->add(new admin_setting_configpasswordunmask('cronremotepassword', get_string('cronremotepassword', 'admin'), get_string('configcronremotepassword', 'admin'), ''));
$temp->add(new admin_setting_configcheckbox('passwordpolicy', get_string('passwordpolicy', 'admin'), get_string('configpasswordpolicy', 'admin'), 0));
$temp->add(new admin_setting_configtext('minpasswordlength', get_string('minpasswordlength', 'admin'), get_string('configminpasswordlength', 'admin'), 8, PARAM_INT));
$temp->add(new admin_setting_configtext('minpassworddigits', get_string('minpassworddigits', 'admin'), get_string('configminpassworddigits', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordlower', get_string('minpasswordlower', 'admin'), get_string('configminpasswordlower', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordupper', get_string('minpasswordupper', 'admin'), get_string('configminpasswordupper', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordnonalphanum', get_string('minpasswordnonalphanum', 'admin'), get_string('configminpasswordnonalphanum', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('disableuserimages', get_string('disableuserimages', 'admin'), get_string('configdisableuserimages', 'admin'), 0));
$ADMIN->add('security', $temp);
$temp->add(new admin_setting_configcheckbox('passwordpolicy', get_string('passwordpolicy', 'admin'), get_string('configpasswordpolicy', 'admin'), 0));
$temp->add(new admin_setting_configtext('minpasswordlength', get_string('minpasswordlength', 'admin'), get_string('configminpasswordlength', 'admin'), 8, PARAM_INT));
$temp->add(new admin_setting_configtext('minpassworddigits', get_string('minpassworddigits', 'admin'), get_string('configminpassworddigits', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordlower', get_string('minpasswordlower', 'admin'), get_string('configminpasswordlower', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordupper', get_string('minpasswordupper', 'admin'), get_string('configminpasswordupper', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordnonalphanum', get_string('minpasswordnonalphanum', 'admin'), get_string('configminpasswordnonalphanum', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('disableuserimages', get_string('disableuserimages', 'admin'), get_string('configdisableuserimages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', get_string('emailchangeconfirmation', 'admin'), get_string('configemailchangeconfirmation', 'admin'), 1));
$ADMIN->add('security', $temp);
// "httpsecurity" settingpage
$temp = new admin_settingpage('httpsecurity', get_string('httpsecurity', 'admin'));
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$ADMIN->add('security', $temp);
// "httpsecurity" settingpage
$temp = new admin_settingpage('httpsecurity', get_string('httpsecurity', 'admin'));
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('cookiesecure', get_string('cookiesecure', 'admin'), get_string('configcookiesecure', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('cookiehttponly', get_string('cookiehttponly', 'admin'), get_string('configcookiehttponly', 'admin'), 0));
$ADMIN->add('security', $temp);
// "modulesecurity" settingpage
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses',
'all' => 'All courses',
'requested' => 'Requested courses')));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
// "modulesecurity" settingpage
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses',
'all' => 'All courses',
'requested' => 'Requested courses')));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
$options = array();
}
$options2 = array();
foreach ($options as $option) {
$options2[$option->id] = $option->name;
}
$temp->add(new admin_setting_configmultiselect('defaultallowedmodules', get_string('defaultallowedmodules', 'admin'), get_string('configdefaultallowedmodules', 'admin'), array(), $options2));
$ADMIN->add('security', $temp);
// "notifications" settingpage
$temp = new admin_settingpage('notifications', get_string('notifications', 'admin'));
$temp->add(new admin_setting_configselect('displayloginfailures', get_string('displayloginfailures', 'admin'), get_string('configdisplayloginfailures', 'admin'), '', array('' => get_string('nobody'),
'admin' => get_string('administrators'),
'teacher' => get_string('administratorsandteachers'),
'everybody' => get_string('everybody'))));
$temp->add(new admin_setting_configselect('notifyloginfailures', get_string('notifyloginfailures', 'admin'), get_string('confignotifyloginfailures', 'admin'), '', array('' => get_string('nobody'),
'mainadmin' => get_string('administrator'),
'alladmins' => get_string('administratorsall'))));
$options = array();
}
$options2 = array();
foreach ($options as $option) {
$options2[$option->id] = $option->name;
}
$temp->add(new admin_setting_configmultiselect('defaultallowedmodules', get_string('defaultallowedmodules', 'admin'), get_string('configdefaultallowedmodules', 'admin'), array(), $options2));
$ADMIN->add('security', $temp);
// "notifications" settingpage
$temp = new admin_settingpage('notifications', get_string('notifications', 'admin'));
$temp->add(new admin_setting_configselect('displayloginfailures', get_string('displayloginfailures', 'admin'), get_string('configdisplayloginfailures', 'admin'), '', array('' => get_string('nobody'),
'admin' => get_string('administrators'),
'teacher' => get_string('administratorsandteachers'),
'everybody' => get_string('everybody'))));
$temp->add(new admin_setting_configselect('notifyloginfailures', get_string('notifyloginfailures', 'admin'), get_string('confignotifyloginfailures', 'admin'), '', array('' => get_string('nobody'),
'mainadmin' => get_string('administrator'),
'alladmins' => get_string('administratorsall'))));
$options = array();
for ($i = 1; $i <= 100; $i++) {
$options[$i] = $i;
}
$temp->add(new admin_setting_configselect('notifyloginthreshold', get_string('notifyloginthreshold', 'admin'), get_string('confignotifyloginthreshold', 'admin'), '10', $options));
$ADMIN->add('security', $temp);
for ($i = 1; $i <= 100; $i++) {
$options[$i] = $i;
}
$temp->add(new admin_setting_configselect('notifyloginthreshold', get_string('notifyloginthreshold', 'admin'), get_string('confignotifyloginthreshold', 'admin'), '10', $options));
$ADMIN->add('security', $temp);
// "antivirus" settingpage
$temp = new admin_settingpage('antivirus', get_string('antivirus', 'admin'));
$temp->add(new admin_setting_configcheckbox('runclamonupload', get_string('runclamavonupload', 'admin'), get_string('configrunclamavonupload', 'admin'), 0));
$temp->add(new admin_setting_configtext('pathtoclam', get_string('pathtoclam', 'admin'), get_string('configpathtoclam', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configselect('clamfailureonupload', get_string('clamfailureonupload', 'admin'), get_string('configclamfailureonupload', 'admin'), 'donothing', array('donothing' => get_string('configclamdonothing', 'admin'),
'actlikevirus' => get_string('configclamactlikevirus', 'admin'))));
$ADMIN->add('security', $temp);
// "antivirus" settingpage
$temp = new admin_settingpage('antivirus', get_string('antivirus', 'admin'));
$temp->add(new admin_setting_configcheckbox('runclamonupload', get_string('runclamavonupload', 'admin'), get_string('configrunclamavonupload', 'admin'), 0));
$temp->add(new admin_setting_configexecutable('pathtoclam', get_string('pathtoclam', 'admin'), get_string('configpathtoclam', 'admin'), ''));
$temp->add(new admin_setting_configdirectory('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), ''));
$temp->add(new admin_setting_configselect('clamfailureonupload', get_string('clamfailureonupload', 'admin'), get_string('configclamfailureonupload', 'admin'), 'donothing', array('donothing' => get_string('configclamdonothing', 'admin'),
'actlikevirus' => get_string('configclamactlikevirus', 'admin'))));
$ADMIN->add('security', $temp);
} // end of speedup
?>
+77 -26
View File
@@ -2,27 +2,29 @@
// This file defines settingpages and externalpages under the "server" category
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// "systempaths" settingpage
$temp = new admin_settingpage('systempaths', get_string('systempaths','admin'));
$temp->add(new admin_setting_configselect('gdversion', get_string('gdversion','admin'), get_string('configgdversion', 'admin'), check_gd_version(), array('0' => get_string('gdnot'),
'1' => get_string('gd1'),
'2' => get_string('gd2'))));
$temp->add(new admin_setting_configtext('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configexecutable('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), ''));
$ADMIN->add('server', $temp, 0);
// "email" settingpage
$temp = new admin_settingpage('mail', get_string('mail','admin'));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), ''));
$temp->add(new admin_setting_configtext('smtpmaxbulk', get_string('smtpmaxbulk', 'admin'), get_string('configsmtpmaxbulk', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . $_SERVER['HTTP_HOST'], PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configselect('digestmailtime', get_string('digestmailtime', 'admin'), get_string('configdigestmailtime', 'admin'), 17, array('00' => '00',
'01' => '01',
'02' => '02',
@@ -50,15 +52,17 @@ $temp->add(new admin_setting_configselect('digestmailtime', get_string('digestma
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']); // not needed here
$options = array();
$options['0'] = get_string('none');
$options['0'] = 'UTF-8';
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '', $options));
$temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '0', $options));
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', get_string('allowusermailcharset', 'admin'), get_string('configallowusermailcharset', 'admin'), 0));
$options = array('LF'=>'LF', 'CRLF'=>'CRLF');
$temp->add(new admin_setting_configselect('mailnewline', get_string('mailnewline', 'admin'), get_string('configmailnewline','admin'), 'LF', $options));
if (isloggedin()) {
global $USER;
$primaryadminemail = $USER->email;
$primaryadminname = fullname($USER, true);
} else {
// no defaults during installation - admin user must be created first
$primaryadminemail = NULL;
@@ -98,10 +102,10 @@ $ADMIN->add('server', $temp);
// "debugging" settingpage
$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_special_debugdisplay());
$temp->add(new admin_setting_configcheckbox('debugdisplay', get_string('debugdisplay', 'admin'), get_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
$temp->add(new admin_setting_configcheckbox('xmlstrictheaders', get_string('xmlstrictheaders', 'admin'), get_string('configxmlstrictheaders', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('debugsmtp', get_string('debugsmtp', 'admin'), get_string('configdebugsmtp', 'admin'), 0));
$temp->add(new admin_setting_special_perfdebug());
$temp->add(new admin_setting_configcheckbox('perfdebug', get_string('perfdebug', 'admin'), get_string('configperfdebug', 'admin'), '7', '15', '7'));
$ADMIN->add('server', $temp);
@@ -119,7 +123,9 @@ $temp->add(new admin_setting_configselect('statsfirstrun', get_string('statsfirs
60*60*24*140 => get_string('nummonths','moodle',5),
60*60*24*168 => get_string('nummonths','moodle',6),
'all' => get_string('all') )));
$temp->add(new admin_setting_configselect('statsmaxruntime', get_string('statsmaxruntime', 'admin'), get_string('configstatsmaxruntime', 'admin'), 0, array(0 => get_string('untilcomplete'),
$temp->add(new admin_setting_configselect('statsmaxruntime', get_string('statsmaxruntime', 'admin'), get_string('configstatsmaxruntime3', 'admin'), 0, array(0 => get_string('untilcomplete'),
60*30 => '10 '.get_string('minutes'),
60*30 => '30 '.get_string('minutes'),
60*60 => '1 '.get_string('hour'),
60*60*2 => '2 '.get_string('hours'),
60*60*3 => '3 '.get_string('hours'),
@@ -128,17 +134,36 @@ $temp->add(new admin_setting_configselect('statsmaxruntime', get_string('statsma
60*60*6 => '6 '.get_string('hours'),
60*60*7 => '7 '.get_string('hours'),
60*60*8 => '8 '.get_string('hours') )));
$temp->add(new admin_setting_configtext('statsruntimedays', get_string('statsruntimedays', 'admin'), get_string('configstatsruntimedays', 'admin'), 31, PARAM_INT));
$temp->add(new admin_setting_configtime('statsruntimestarthour', 'statsruntimestartminute', get_string('statsruntimestart', 'admin'), get_string('configstatsruntimestart', 'admin'), array('h' => 0, 'm' => 0)));
$temp->add(new admin_setting_configtext('statsuserthreshold', get_string('statsuserthreshold', 'admin'), get_string('configstatsuserthreshold', 'admin'), 0, PARAM_INT));
$options = array(0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6);
$temp->add(new admin_setting_configselect('statscatdepth', get_string('statscatdepth', 'admin'), get_string('configstatscatdepth', 'admin'), 1, $options));
$ADMIN->add('server', $temp);
// "http" settingpage
$temp = new admin_settingpage('http', get_string('http', 'admin'));
$temp->add(new admin_setting_configtext('framename', get_string('framename', 'admin'), get_string('configframename', 'admin'), '_top', PARAM_ALPHAEXT));
$temp->add(new admin_Setting_configcheckbox('slasharguments', get_string('slasharguments', 'admin'), get_string('configslasharguments', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('slasharguments', get_string('slasharguments', 'admin'), get_string('configslasharguments', 'admin'), 1));
$temp->add(new admin_setting_heading('reverseproxy', get_string('reverseproxy', 'admin'), '', ''));
$options = array(
0 => 'HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR => 'HTTP_CLIENT, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
$temp->add(new admin_setting_configselect('getremoteaddrconf', get_string('getremoteaddrconf', 'admin'), get_string('configgetremoteaddrconf', 'admin'), 0, $options));
$temp->add(new admin_setting_heading('webproxy', get_string('webproxy', 'admin'), get_string('webproxyinfo', 'admin')));
$temp->add(new admin_setting_configtext('proxyhost', get_string('proxyhost', 'admin'), get_string('configproxyhost', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('proxyport', get_string('proxyport', 'admin'), get_string('configproxyport', 'admin'), 0, PARAM_INT));
$options = array('HTTP'=>'HTTP');
if (defined('CURLPROXY_SOCKS5')) {
$options['SOCKS5'] = 'SOCKS5';
}
$temp->add(new admin_setting_configselect('proxytype', get_string('proxytype', 'admin'), get_string('configproxytype','admin'), 'HTTP', $options));
$temp->add(new admin_setting_configtext('proxyuser', get_string('proxyuser', 'admin'), get_string('configproxyuser', 'admin'), ''));
$temp->add(new admin_setting_configpasswordunmask('proxypassword', get_string('proxypassword', 'admin'), get_string('configproxypassword', 'admin'), ''));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('maintenancemode', get_string('sitemaintenancemode', 'admin'), "$CFG->wwwroot/$CFG->admin/maintenance.php"));
@@ -169,6 +194,15 @@ $temp->add(new admin_setting_configselect('deleteunconfirmed', get_string('delet
6 => get_string('numhours', '', 6),
1 => get_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('deleteincompleteusers', get_string('deleteincompleteusers', 'admin'), get_string('configdeleteincompleteusers', 'admin'), 0, array(0 => get_string('never'),
168 => get_string('numdays', '', 7),
144 => get_string('numdays', '', 6),
120 => get_string('numdays', '', 5),
96 => get_string('numdays', '', 4),
72 => get_string('numdays', '', 3),
48 => get_string('numdays', '', 2),
24 => get_string('numdays', '', 1))));
$temp->add(new admin_setting_configselect('loglifetime', get_string('loglifetime', 'admin'), get_string('configloglifetime', 'admin'), 0, array(0 => get_string('neverdeletelogs'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
@@ -177,7 +211,22 @@ $temp->add(new admin_setting_configselect('loglifetime', get_string('loglifetime
120 => get_string('numdays', '', 120),
90 => get_string('numdays', '', 90),
60 => get_string('numdays', '', 60),
30 => get_string('numdays', '', 30))));
35 => get_string('numdays', '', 35))));
$temp->add(new admin_setting_configcheckbox('disablegradehistory', get_string('disablegradehistory', 'grades'),
get_string('configdisablegradehistory', 'grades'), 0, PARAM_INT));
$temp->add(new admin_setting_configselect('gradehistorylifetime', get_string('gradehistorylifetime', 'grades'),
get_string('configgradehistorylifetime', 'grades'), 0, array(0 => get_string('neverdeletehistory', 'grades'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
180 => get_string('numdays', '', 180),
150 => get_string('numdays', '', 150),
120 => get_string('numdays', '', 120),
90 => get_string('numdays', '', 90),
60 => get_string('numdays', '', 60),
30 => get_string('numdays', '', 30))));
$ADMIN->add('server', $temp);
@@ -189,16 +238,16 @@ $ADMIN->add('server', new admin_externalpage('phpinfo', get_string('phpinfo'), "
// "performance" settingpage
$temp = new admin_settingpage('performance', get_string('performance', 'admin'));
$temp->add(new admin_setting_configselect('cachetype', get_string('cachetype', 'admin'),
get_string('configcachetype', 'admin'), '',
array( '' => get_string('none'),
'internal' => 'internal',
'memcached' => 'memcached',
$temp->add(new admin_setting_special_selectsetup('cachetype', get_string('cachetype', 'admin'),
get_string('configcachetype', 'admin'), '',
array( '' => get_string('none'),
'internal' => 'internal',
'memcached' => 'memcached',
'eaccelerator' => 'eaccelerator')));
// NOTE: $CFG->rcache is forced to bool in lib/setup.php
$temp->add(new admin_setting_configselect('rcache', get_string('rcache', 'admin'),
get_string('configrcache', 'admin'), 0,
array( '0' => get_string('no'),
$temp->add(new admin_setting_special_selectsetup('rcache', get_string('rcache', 'admin'),
get_string('configrcache', 'admin'), 0,
array( '0' => get_string('no'),
'1' => get_string('yes'))));
$temp->add(new admin_setting_configtext('rcachettl', get_string('rcachettl', 'admin'),
get_string('configrcachettl', 'admin'), 10));
@@ -207,8 +256,8 @@ $temp->add(new admin_setting_configtext('intcachemax', get_string('intcachemax',
$temp->add(new admin_setting_configtext('memcachedhosts', get_string('memcachedhosts', 'admin'),
get_string('configmemcachedhosts', 'admin'), ''));
$temp->add(new admin_setting_configselect('memcachedpconn', get_string('memcachedpconn', 'admin'),
get_string('configmemcachedpconn', 'admin'), 0,
array( '0' => get_string('no'),
get_string('configmemcachedpconn', 'admin'), 0,
array( '0' => get_string('no'),
'1' => get_string('yes'))));
$ADMIN->add('server', $temp);
@@ -216,4 +265,6 @@ if (file_exists("$CFG->dirroot/$CFG->admin/mysql/frame.php")) {
$ADMIN->add('server', new admin_externalpage('database', get_string('managedatabase'), "$CFG->wwwroot/$CFG->admin/mysql/frame.php"));
}
} // end of speedup
?>
+17 -8
View File
@@ -6,15 +6,18 @@
// are added to them.
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
if (get_site()) {
$hassiteconfig = has_capability('moodle/site:config', $systemcontext);
} else {
// installation starts - no permission checks
$hassiteconfig = true;
}
$ADMIN->add('root', new admin_externalpage('adminnotifications', get_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
// hidden upgrade script
$ADMIN->add('root', new admin_externalpage('upgradesettings', get_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
// hidden search script
$ADMIN->add('root', new admin_externalpage('search', get_string('search', 'admin'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
$ADMIN->add('root', new admin_category('users', get_string('users','admin')));
$ADMIN->add('root', new admin_category('courses', get_string('courses','admin')));
$ADMIN->add('root', new admin_category('grades', get_string('grades')));
@@ -22,9 +25,6 @@ $ADMIN->add('root', new admin_category('location', get_string('location','admin'
$ADMIN->add('root', new admin_category('language', get_string('language')));
$ADMIN->add('root', new admin_category('modules', get_string('plugins', 'admin')));
$ADMIN->add('modules', new admin_externalpage('managemodules', get_string('activities'), "$CFG->wwwroot/$CFG->admin/modules.php"));
$ADMIN->add('modules', new admin_externalpage('manageblocks', get_string('blocks'), "$CFG->wwwroot/$CFG->admin/blocks.php"));
$ADMIN->add('modules', new admin_externalpage('managefilters', get_string('managefilters'), "$CFG->wwwroot/$CFG->admin/filters.php"));
$ADMIN->add('root', new admin_category('security', get_string('security','admin')));
$ADMIN->add('root', new admin_category('appearance', get_string('appearance','admin')));
@@ -33,7 +33,7 @@ $ADMIN->add('root', new admin_category('server', get_string('server','admin')));
$ADMIN->add('root', new admin_category('mnet', get_string('net','mnet')));
$ADMIN->add('root', new admin_category('reports', get_string('reports')));
foreach (get_list_of_plugins('admin/report') as $plugin) {
foreach (get_list_of_plugins($CFG->admin.'/report') as $plugin) {
/// This snippet is temporary until simpletest can be fixed to use xmldb. See MDL-7377 XXX TODO
if ($plugin == 'simpletest' && $CFG->dbfamily != 'mysql' && $CFG->dbfamily != 'postgres') {
continue;
@@ -43,7 +43,13 @@ foreach (get_list_of_plugins('admin/report') as $plugin) {
if ($reportname[1] == '[') {
$reportname = get_string($plugin, 'admin');
}
$ADMIN->add('reports', new admin_externalpage('report'.$plugin, $reportname, "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php"));
// ugly hack for special access control in reports
switch($plugin) {
case 'backups': $cap = 'moodle/site:backup'; break;
case 'simpletest': $cap = 'moodle/site:config'; break;
default: $cap = 'moodle/site:viewreports';
}
$ADMIN->add('reports', new admin_externalpage('report'.$plugin, $reportname, "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php",$cap));
}
$ADMIN->add('root', new admin_category('misc', get_string('miscellaneous')));
@@ -51,4 +57,7 @@ $ADMIN->add('root', new admin_category('misc', get_string('miscellaneous')));
// hidden unsupported category
$ADMIN->add('root', new admin_category('unsupported', get_string('unsupported', 'admin'), true));
// hidden search script
$ADMIN->add('root', new admin_externalpage('search', get_string('searchresults'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
?>
+7 -4
View File
@@ -2,10 +2,13 @@
// This file defines settingpages and externalpages in the "unsupported" hidden category, use wisely!
$ADMIN->add('unsupported', new admin_externalpage('purgemoodledata', 'Purge moodledata', $CFG->wwwroot.'/'.$CFG->admin.'/delete.php'));
$ADMIN->add('unsupported', new admin_externalpage('healthcenter', get_string('healthcenter'), $CFG->wwwroot.'/'.$CFG->admin.'/health.php'));
$ADMIN->add('unsupported', new admin_externalpage('toinodb', 'Convert to InnoDB', $CFG->wwwroot.'/'.$CFG->admin.'/innodb.php'));
$ADMIN->add('unsupported', new admin_externalpage('replace', 'Search and replace', $CFG->wwwroot.'/'.$CFG->admin.'/replace.php'));
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('unsupported', new admin_externalpage('purgemoodledata', 'Purge moodledata', $CFG->wwwroot.'/'.$CFG->admin.'/delete.php', 'moodle/site:config', true));
$ADMIN->add('unsupported', new admin_externalpage('healthcenter', get_string('healthcenter'), $CFG->wwwroot.'/'.$CFG->admin.'/health.php', 'moodle/site:config', true));
$ADMIN->add('unsupported', new admin_externalpage('toinodb', 'Convert to InnoDB', $CFG->wwwroot.'/'.$CFG->admin.'/innodb.php', 'moodle/site:config', true));
$ADMIN->add('unsupported', new admin_externalpage('replace', 'Search and replace', $CFG->wwwroot.'/'.$CFG->admin.'/replace.php', 'moodle/site:config', true));
} // end of speedup
?>
+155 -94
View File
@@ -2,112 +2,173 @@
// This file defines settingpages and externalpages under the "users" category
if (has_capability('moodle/site:config',$systemcontext)) { // speedup for non-admins
if ($hassiteconfig
or has_capability('moodle/site:uploadusers', $systemcontext)
or has_capability('moodle/user:create', $systemcontext)
or has_capability('moodle/user:update', $systemcontext)
or has_capability('moodle/user:delete', $systemcontext)
or has_capability('moodle/role:manage', $systemcontext)
or has_capability('moodle/role:assign', $systemcontext)) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('users', new admin_externalpage('userauthentication', get_string('authentication','admin'), "$CFG->wwwroot/$CFG->admin/auth.php"));
$ADMIN->add('users', new admin_category('authsettings', get_string('authentication','admin')));
$temp = new admin_settingpage('manageauths', get_string('authsettings', 'admin'));
$temp->add(new admin_setting_manageauths());
$temp->add(new admin_setting_heading('manageauthscommonheading', get_string('commonsettings', 'admin'), ''));
$temp->add(new admin_setting_special_registerauth());
$temp->add(new admin_setting_configselect('guestloginbutton', get_string('guestloginbutton', 'auth'),
get_string('showguestlogin', 'auth'), '1', array('0'=>get_string('hide'), '1'=>get_string('show'))));
$temp->add(new admin_setting_configtext('alternateloginurl', get_string('alternateloginurl', 'auth'),
get_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot.'/login/index.php')), ''));
$temp->add(new admin_setting_configtext('forgottenpasswordurl', get_string('forgottenpasswordurl', 'auth'),
get_string('forgottenpassword', 'auth'), ''));
$temp->add(new admin_setting_configtextarea('auth_instructions', get_string('instructions', 'auth'),
get_string('authinstructions', 'auth'), ''));
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('verifychangedemail', get_string('verifychangedemail', 'admin'), get_string('configverifychangedemail', 'admin'), 1));
$temp->add(new admin_setting_configtext('recaptchapublickey', get_string('recaptchapublickey', 'admin'), get_string('configrecaptchapublickey', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('recaptchaprivatekey', get_string('recaptchaprivatekey', 'admin'), get_string('configrecaptchaprivatekey', 'admin'), '', PARAM_NOTAGS));
$ADMIN->add('authsettings', $temp);
if(empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
// stuff under the "accounts" subcategory
$ADMIN->add('users', new admin_category('accounts', get_string('accounts', 'admin')));
$ADMIN->add('accounts', new admin_externalpage('editusers', get_string('userlist','admin'), "$CFG->wwwroot/$CFG->admin/user.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('userbulk', get_string('userbulk','admin'), "$CFG->wwwroot/$CFG->admin/user/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('addnewuser', get_string('addnewuser'), "$securewwwroot/user/editadvanced.php?id=-1", 'moodle/user:create'));
$ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('uploadusers'), "$CFG->wwwroot/$CFG->admin/uploaduser.php", 'moodle/site:uploadusers'));
$ADMIN->add('accounts', new admin_externalpage('profilefields', get_string('profilefields','admin'), "$CFG->wwwroot/user/profile/index.php", 'moodle/site:config'));
if ($auths = get_list_of_plugins('auth')) {
$authsenabled = get_enabled_auth_plugins();
$authbyname = array();
// stuff under the "roles" subcategory
$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role')));
$ADMIN->add('roles', new admin_externalpage('defineroles', get_string('defineroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/manage.php"));
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
// "userpolicies" settingpage
$temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));
if (!empty($CFG->rolesactive)) {
$context = get_context_instance(CONTEXT_SYSTEM);
if (!$guestrole = get_guest_role()) {
$guestrole->id = 0;
}
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
$studentrole = array_shift($studentroles); /// Take the first one
} else {
$studentrole->id = 0;
}
if ($userroles = get_roles_with_capability('moodle/legacy:user', CAP_ALLOW)) {
$userrole = array_shift($userroles); /// Take the first one
} 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);
foreach ($auths as $auth) {
$strauthname = get_string("auth_{$auth}title", "auth");
if ($strauthname == "[[auth_{$auth}title]]") {
$strauthname = get_string("auth_{$auth}title", "auth_{$auth}");
}
$authbyname[$strauthname] = $auth;
}
}
// 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
$allroles = array();
if ($roles = get_all_roles()) {
foreach ($roles as $role) {
$allroles[$role->id] = strip_tags(format_string($role->name, true));
ksort($authbyname);
foreach ($authbyname as $strauthname=>$authname) {
if (file_exists($CFG->dirroot.'/auth/'.$authname.'/settings.php')) {
// do not show disabled auths in tree, keep only settings link on manage page
$settings = new admin_settingpage('authsetting'.$authname, $strauthname, 'moodle/site:config', !in_array($authname, $authsenabled));
if ($ADMIN->fulltree) {
include($CFG->dirroot.'/auth/'.$authname.'/settings.php');
}
// TODO: finish implementation of common settings - locking, etc.
$ADMIN->add('authsettings', $settings);
} else {
$ADMIN->add('authsettings', new admin_externalpage('authsetting'.$authname, $strauthname, "$CFG->wwwroot/$CFG->admin/auth_config.php?auth=$authname", 'moodle/site:config', !in_array($authname, $authsenabled)));
}
}
}
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
get_string('confignotloggedinroleid', 'admin'), $guestrole->id, $allroles ));
$temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
get_string('configguestroleid', 'admin'), $guestrole->id, $allroles));
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
get_string('configdefaultuserroleid', 'admin'), $userrole->id, $allroles));
}
$temp->add(new admin_setting_configcheckbox('nodefaultuserrolelists', get_string('nodefaultuserrolelists', 'admin'), get_string('confignodefaultuserrolelists', 'admin'), 0));
if (!empty($CFG->rolesactive)) {
$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));
if (!empty($CFG->rolesactive)) {
$temp->add(new admin_setting_configmultiselect('nonmetacoursesyncroleids', get_string('nonmetacoursesyncroleids', 'admin'),
get_string('confignonmetacoursesyncroleids', 'admin'), array(), $allroles));
}
//$temp->add(new admin_setting_configcheckbox('allusersaresitestudents', get_string('allusersaresitestudents', 'admin'), get_string('configallusersaresitestudents','admin'), 1));
$temp->add(new admin_setting_configmultiselect('hiddenuserfields', get_string('hiddenuserfields', 'admin'),
get_string('confighiddenuserfields', 'admin'), array(),
array('none' => get_string('none'),
'description' => get_string('description'),
'city' => get_string('city'),
'country' => get_string('country'),
'webpage' => get_string('webpage'),
'icqnumber' => get_string('icqnumber'),
'skypeid' => get_string('skypeid'),
'yahooid' => get_string('yahooid'),
'aimid' => get_string('aimid'),
'msnid' => get_string('msnid'),
'lastaccess' => get_string('lastaccess'))));
//$temp->add(new admin_setting_special_adminseesall());
if(empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
// stuff under the "accounts" subcategory
$ADMIN->add('users', new admin_category('accounts', get_string('accounts', 'admin')));
$ADMIN->add('accounts', new admin_externalpage('editusers', get_string('userlist','admin'), "$CFG->wwwroot/$CFG->admin/user.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('userbulk', get_string('userbulk','admin'), "$CFG->wwwroot/$CFG->admin/user/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('addnewuser', get_string('addnewuser'), "$securewwwroot/user/editadvanced.php?id=-1", 'moodle/user:create'));
$ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('uploadusers'), "$CFG->wwwroot/$CFG->admin/uploaduser.php", 'moodle/site:uploadusers'));
$ADMIN->add('accounts', new admin_externalpage('uploadpictures', get_string('uploadpictures','admin'), "$CFG->wwwroot/$CFG->admin/uploadpicture.php", 'moodle/site:uploadusers'));
$ADMIN->add('accounts', new admin_externalpage('profilefields', get_string('profilefields','admin'), "$CFG->wwwroot/user/profile/index.php", 'moodle/site:config'));
$ADMIN->add('roles', $temp);
// stuff under the "roles" subcategory
$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role')));
$ADMIN->add('roles', new admin_externalpage('defineroles', get_string('defineroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/manage.php", 'moodle/role:manage'));
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=".$systemcontext->id, 'moodle/role:assign'));
} // end of admin tree capability if
// "userpolicies" settingpage
$temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));
if ($ADMIN->fulltree) {
if (!empty($CFG->rolesactive)) {
$context = get_context_instance(CONTEXT_SYSTEM);
if (!$guestrole = get_guest_role()) {
$guestrole->id = 0;
}
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
$studentrole = array_shift($studentroles); /// Take the first one
} else {
$studentrole->id = 0;
}
if ($userroles = get_roles_with_capability('moodle/legacy:user', CAP_ALLOW)) {
$userrole = array_shift($userroles); /// Take the first one
} 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);
}
}
if (!$guestroles = get_roles_with_capability('moodle/legacy:guest', CAP_ALLOW)) {
$guestroles = array();
}
// 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
$allroles = array();
$nonguestroles = array();
if ($roles = get_all_roles()) {
foreach ($roles as $role) {
$rolename = strip_tags(format_string($role->name, true));
$allroles[$role->id] = $rolename;
if (!isset($guestroles[$role->id])) {
$nonguestroles[$role->id] = $rolename;
}
}
}
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
get_string('confignotloggedinroleid', 'admin'), $guestrole->id, $allroles ));
$temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
get_string('configguestroleid', 'admin'), $guestrole->id, $allroles));
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
get_string('configdefaultuserroleid', 'admin'), $userrole->id, $nonguestroles)); // guest role here breaks a lot of stuff
}
$temp->add(new admin_setting_configcheckbox('nodefaultuserrolelists', get_string('nodefaultuserrolelists', 'admin'), get_string('confignodefaultuserrolelists', 'admin'), 0));
if (!empty($CFG->rolesactive)) {
$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));
if (!empty($CFG->rolesactive)) {
$temp->add(new admin_setting_configmultiselect('nonmetacoursesyncroleids', get_string('nonmetacoursesyncroleids', 'admin'),
get_string('confignonmetacoursesyncroleids', 'admin'), array(), $allroles));
}
$temp->add(new admin_setting_configmultiselect('hiddenuserfields', get_string('hiddenuserfields', 'admin'),
get_string('confighiddenuserfields', 'admin'), array(),
array('description' => get_string('description'),
'city' => get_string('city'),
'country' => get_string('country'),
'webpage' => get_string('webpage'),
'icqnumber' => get_string('icqnumber'),
'skypeid' => get_string('skypeid'),
'yahooid' => get_string('yahooid'),
'aimid' => get_string('aimid'),
'msnid' => get_string('msnid'),
'lastaccess' => get_string('lastaccess'))));
}
$ADMIN->add('roles', $temp);
} // end of speedup
?>
+7 -11
View File
@@ -5,10 +5,6 @@
require_once($CFG->dirroot.'/lib/pagelib.php');
require_once($CFG->dirroot.'/lib/blocklib.php');
if (!empty($THEME->customcorners)) {
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
}
$pt = optional_param('pt', null, PARAM_SAFEDIR); //alhanumeric and -
$pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
@@ -28,7 +24,7 @@
require_login();
require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM));
// first thing to do is print the dropdown menu
@@ -58,12 +54,12 @@
echo '<tr valign="top">';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
blocks_print_group($PAGE, $blocks, BLOCK_POS_LEFT);
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
echo '<td valign="top" id="middle-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
} else {
require_once($CFG->libdir.'/adminlib.php');
@@ -80,12 +76,12 @@
if (!empty($pt)) {
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="right-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
echo '</tr></table>';
print_footer();
+1 -1
View File
@@ -6,7 +6,7 @@
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$strtimezone = get_string("timezone");
$strsavechanges = get_string("savechanges");
+18 -19
View File
@@ -6,7 +6,7 @@
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/olson.php');
admin_externalpage_setup('timezoneimport');
$ok = optional_param('ok', 0, PARAM_BOOL);
@@ -23,9 +23,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);
@@ -53,7 +53,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);
@@ -62,26 +62,22 @@
}
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezones/';
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
fwrite($file, $contents);
fclose($file);
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezones.txt', 'timezone')) { // Parse it
update_timezone_records($timezones);
$importdone = $source;
}
unlink($CFG->dataroot.'/temp/timezones.txt');
$source = 'http://download.moodle.org/timezone/';
if (!$importdone && ($content=download_file_content($source))) {
if ($file = fopen($CFG->dataroot.'/temp/timezone.txt', 'w')) { // Make local copy
fwrite($file, $content);
fclose($file);
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezone.txt', 'timezone')) { // Parse it
update_timezone_records($timezones);
$importdone = $source;
}
unlink($CFG->dataroot.'/temp/timezone.txt');
}
}
/// 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);
@@ -102,6 +98,9 @@
$timezonelist = array();
foreach ($timezones as $timezone) {
if (is_array($timezone)) {
$timezone = (object)$timezone;
}
if (isset($timezonelist[$timezone->name])) {
$timezonelist[$timezone->name]++;
} else {
+32 -113
View File
@@ -8,17 +8,31 @@ require_once($CFG->libdir.'/adminlib.php');
$return = optional_param('return', '', PARAM_ALPHA);
/// no guest autologin
require_login(0, false);
$adminroot =& admin_get_root(); // need all settings
admin_externalpage_setup('upgradesettings'); // now hidden page
// a caveat: we're depending on only having one admin access this page at once. why? the following line
// (the function call to find_new_settings) must have the EXACT SAME RETURN VALUE both times that this
// page is loaded (i.e. both when we're displaying the form and then when we process the form's input).
// if the return values don't match, we could potentially lose changes that the admin is making.
// now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted() and confirm_sesskey()) {
$count = admin_write_settings($data);
$adminroot =& admin_get_root(true); //reload tree
}
$newsettingshtml = output_new_settings_by_page(admin_get_root());
$newsettings = admin_output_new_settings_by_page($adminroot);
if (isset($newsettings['frontpagesettings'])) {
$frontpage = $newsettings['frontpagesettings'];
unset($newsettings['frontpagesettings']);
array_unshift($newsettings, $frontpage);
}
$newsettingshtml = implode($newsettings);
unset($newsettings);
// first we deal with the case where there are no new settings to be set
if ($newsettingshtml == '') {
$focus = '';
if (empty($adminroot->errors) and $newsettingshtml === '') {
// there must be either redirect without message or continue button or else upgrade would be sometimes broken
if ($return == 'site') {
redirect("$CFG->wwwroot/");
} else {
@@ -26,128 +40,33 @@ if ($newsettingshtml == '') {
}
}
// now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted()) {
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$newsettings = find_new_settings(admin_get_root());
$errors = '';
foreach($newsettings as $newsetting) {
if (isset($unslashed['s_' . $newsetting->name])) {
$errors .= $newsetting->write_setting($unslashed['s_' . $newsetting->name]);
} else {
$errors .= $newsetting->write_setting($newsetting->defaultsetting);
}
}
if (empty($errors)) {
// there must be either redirect without message or continue button or else upgrade would be sometimes broken
if ($return == 'site') {
redirect("$CFG->wwwroot/");
} else {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
} else {
$url = "$CFG->wwwroot/$CFG->admin/upgradesettings.php?return=$return";
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors, $url);
}
} else {
error(get_string('confirmsesskeybad', 'error'));
}
if (!empty($adminroot->errors)) {
$firsterror = reset($adminroot->errors);
$focus = $firsterror->id;
}
// and finally, if we get here, then there are new settings and we have to print a form
// to modify them
admin_externalpage_print_header();
admin_externalpage_print_header($focus);
print_simple_box(get_string('upgradesettingsintro','admin'),'','100%','',5,'generalbox','');
print_box(get_string('upgradesettingsintro','admin'), 'generalbox');
echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
echo $newsettingshtml;
echo '</fieldset>';
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></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();
/**
* Find settings that have not been initialized (e.g. during initial install or an upgrade).
*
* Tests each setting's get_setting() method. If the result is NULL, we consider the setting
* to be uninitialized.
*
* @param string &$node The node at which to start searching. Should be $ADMIN for all external calls to this function.
* @return array An array containing admin_setting objects that haven't yet been initialized
*/
function find_new_settings(&$node) {
if (is_a($node, 'admin_category')) {
$return = array();
$entries = array_keys($node->children);
foreach ($entries as $entry) {
$return = array_merge($return, find_new_settings($node->children[$entry]));
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$return = array();
foreach ($node->settings as $setting) {
if ($setting->get_setting() === NULL) {
$return[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
return $return;
}
return array();
if (!empty($CFG->adminusehtmleditor)) {
use_html_editor();
}
function output_new_settings_by_page(&$node) {
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
foreach ($entries as $entry) {
$return .= output_new_settings_by_page($node->children[$entry]);
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$newsettings = array();
foreach ($node->settings as $setting) {
if ($setting->get_setting() === NULL) {
$newsettings[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
$return = '';
if (count($newsettings) > 0) {
$return .= print_heading(get_string('upgradesettings','admin').' - '.$node->visiblename, '', 2, 'main', true);
$return .= '<fieldset class="adminsettings">' . "\n";
foreach ($newsettings as $newsetting) {
$return .= '<div class="clearer"><!-- --></div>' . "\n";
$return .= $newsetting->output_html();
}
$return .= '</fieldset>';
}
return $return;
}
return '';
}
print_footer();
?>
+255
View File
@@ -0,0 +1,255 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2007 Inaki Arenaza //
// //
// Based on .../admin/uploaduser.php and .../lib/gdlib.php //
// //
// 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 //
// //
///////////////////////////////////////////////////////////////////////////
require_once('../config.php');
require_once($CFG->libdir.'/uploadlib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/gdlib.php');
require_once('uploadpicture_form.php');
define ('PIX_FILE_UPDATED', 0);
define ('PIX_FILE_ERROR', 1);
define ('PIX_FILE_SKIPPED', 2);
admin_externalpage_setup('uploadpictures');
require_login();
require_capability('moodle/site:uploadusers', get_context_instance(CONTEXT_SYSTEM));
if (!$site = get_site()) {
error("Could not find site-level course");
}
if (!$adminuser = get_admin()) {
error("Could not find site admin");
}
$strfile = get_string('file');
$struser = get_string('user');
$strusersupdated = get_string('usersupdated');
$struploadpictures = get_string('uploadpictures','admin');
$userfields = array (
0 => 'username',
1 => 'idnumber',
2 => 'id' );
$userfield = optional_param('userfield', 0, PARAM_INT);
$overwritepicture = optional_param('overwritepicture', 0, PARAM_BOOL);
/// Print the header
admin_externalpage_print_header();
print_heading_with_help($struploadpictures, 'uploadpictures');
$mform = new admin_uploadpicture_form();
if ($formdata = $mform->get_data()) {
if (!array_key_exists($userfield, $userfields)) {
notify(get_string('uploadpicture_baduserfield','admin'));
} else {
// Large files are likely to take their time and memory. Let PHP know
// that we'll take longer, and that the process should be recycled soon
// to free up memory.
@set_time_limit(0);
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
@apache_child_terminate();
}
// Create a unique temporary directory, to process the zip file
// contents.
$zipdir = my_mktempdir($CFG->dataroot.'/temp/', 'usrpic');
if (!$mform->save_files($zipdir)) {
notify(get_string('uploadpicture_cannotmovezip','admin'));
@remove_dir($zipdir);
} else {
$dstfile = $zipdir.'/'.$mform->get_new_filename();
if(!unzip_file($dstfile, $zipdir, false)) {
notify(get_string('uploadpicture_cannotunzip','admin'));
@remove_dir($zipdir);
} else {
// We don't need the zip file any longer, so delete it to make
// it easier to process the rest of the files inside the directory.
@unlink($dstfile);
$results = array ('errors' => 0,'updated' => 0);
process_directory($zipdir, $userfields[$userfield], $overwritepicture, $results);
// Finally remove the temporary directory with all the user images and print some stats.
remove_dir($zipdir);
notify(get_string('usersupdated', 'admin') . ": " . $results['updated']);
notify(get_string('errors', 'admin') . ": " . $results['errors']);
echo '<hr />';
}
}
}
}
$mform->display();
admin_externalpage_print_footer();
exit;
// ----------- Internal functions ----------------
/**
* Create a unique temporary directory with a given prefix name,
* inside a given directory, with given permissions. Return the
* full path to the newly created temp directory.
*
* @param string $dir where to create the temp directory.
* @param string $prefix prefix for the temp directory name (default '')
* @param string $mode permissions for the temp directory (default 700)
*
* @return string The full path to the temp directory.
*/
function my_mktempdir($dir, $prefix='', $mode=0700) {
if (substr($dir, -1) != '/') {
$dir .= '/';
}
do {
$path = $dir.$prefix.mt_rand(0, 9999999);
} while (!mkdir($path, $mode));
return $path;
}
/**
* Recursively process a directory, picking regular files and feeding
* them to process_file().
*
* @param string $dir the full path of the directory to process
* @param string $userfield the prefix_user table field to use to
* match picture files to users.
* @param bool $overwrite overwrite existing picture or not.
* @param array $results (by reference) accumulated statistics of
* users updated and errors.
*
* @return nothing
*/
function process_directory ($dir, $userfield, $overwrite, &$results) {
if(!($handle = opendir($dir))) {
notify(get_string('uploadpicture_cannotprocessdir','admin'));
return;
}
while (false !== ($item = readdir($handle))) {
if ($item != '.' && $item != '..') {
if (is_dir($dir.'/'.$item)) {
process_directory($dir.'/'.$item, $userfield, $overwrite, $results);
} else if (is_file($dir.'/'.$item)) {
$result = process_file($dir.'/'.$item, $userfield, $overwrite);
switch ($result) {
case PIX_FILE_ERROR:
$results['errors']++;
break;
case PIX_FILE_UPDATED:
$results['updated']++;
break;
}
}
// Ignore anything else that is not a directory or a file (e.g.,
// symbolic links, sockets, pipes, etc.)
}
}
closedir($handle);
}
/**
* Given the full path of a file, try to find the user the file
* corresponds to and assign him/her this file as his/her picture.
* Make extensive checks to make sure we don't open any security holes
* and report back any success/error.
*
* @param string $file the full path of the file to process
* @param string $userfield the prefix_user table field to use to
* match picture files to users.
* @param bool $overwrite overwrite existing picture or not.
*
* @return integer either PIX_FILE_UPDATED, PIX_FILE_ERROR or
* PIX_FILE_SKIPPED
*/
function process_file ($file, $userfield, $overwrite) {
// Add additional checks on the filenames, as they are user
// controlled and we don't want to open any security holes.
$path_parts = pathinfo(cleardoubleslashes($file));
$basename = $path_parts['basename'];
$extension = $path_parts['extension'];
if ($basename != clean_param($basename, PARAM_CLEANFILE)) {
// The original picture file name has invalid characters
notify(get_string('uploadpicture_invalidfilename', 'admin',
clean_param($basename, PARAM_CLEANHTML)));
return PIX_FILE_ERROR;
}
// The picture file name (without extension) must match the
// userfield attribute.
$uservalue = substr($basename, 0,
strlen($basename) -
strlen($extension) - 1);
// userfield names are safe, so don't quote them.
if (!($user = get_record('user', $userfield, addslashes($uservalue)))) {
$a = new Object();
$a->userfield = clean_param($userfield, PARAM_CLEANHTML);
$a->uservalue = clean_param($uservalue, PARAM_CLEANHTML);
notify(get_string('uploadpicture_usernotfound', 'admin', $a));
return PIX_FILE_ERROR;
}
$haspicture = get_field('user', 'picture', 'id', $user->id);
if ($haspicture && !$overwrite) {
notify(get_string('uploadpicture_userskipped', 'admin', $user->username));
return PIX_FILE_SKIPPED;
}
if (my_save_profile_image($user->id, $file)) {
set_field('user', 'picture', 1, 'id', $user->id);
notify(get_string('uploadpicture_userupdated', 'admin', $user->username));
return PIX_FILE_UPDATED;
} else {
notify(get_string('uploadpicture_cannotsave', 'admin', $user->username));
return PIX_FILE_ERROR;
}
}
/**
* Try to save the given file (specified by its full path) as the
* picture for the user with the given id.
*
* @param integer $id the internal id of the user to assign the
* picture file to.
* @param string $originalfile the full path of the picture file.
*
* @return bool
*/
function my_save_profile_image($id, $originalfile) {
$destination = create_profile_image_destination($id, 'user');
if ($destination === false) {
return false;
}
return process_profile_image($originalfile, $destination);
}
?>
+29
View File
@@ -0,0 +1,29 @@
<?php // $Id$
require_once $CFG->libdir.'/formslib.php';
class admin_uploadpicture_form extends moodleform {
function definition (){
global $CFG, $USER;
global $userfields;
$mform =& $this->_form;
$this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
$mform->addElement('header', 'settingsheader', get_string('upload'));
$mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
$mform->addRule('userpicturesfile', null, 'required');
$choices = $userfields;
$mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
$mform->setType('userfield', PARAM_INT);
$choices = array( 0 => get_string('no'), 1 => get_string('yes') );
$mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
$mform->setType('overwritepicture', PARAM_INT);
$this->add_action_buttons(false, get_string('uploadpictures', 'admin'));
}
}
?>
+932 -351
View File
File diff suppressed because it is too large Load Diff
+264 -64
View File
@@ -1,91 +1,225 @@
<?php // $Id$
require_once $CFG->libdir.'/formslib.php';
class admin_uploaduser_form extends moodleform {
class admin_uploaduser_form1 extends moodleform {
function definition (){
global $CFG;
$templateuser = $this->_customdata;
if(empty($templateuser)) {
if (!$templateuser = get_admin()) {
error('Could not find site admin');
}
}
global $CFG, $USER;
$mform =& $this->_form;
$mform->addElement('file', 'userfile', get_string('file'));
$this->set_upload_manager(new upload_manager('userfile', false, false, null, false, 0, true, true, false));
$mform->addElement('header', 'settingsheader', get_string('upload'));
$mform->addElement('file', 'userfile', get_string('file'), 'size="40"');
$mform->addRule('userfile', null, 'required');
$mform->addElement('header', 'defaultheader', get_string('defaultvalues', 'admin'));
$mform->addElement('text', 'username', get_string('username'), 'size="20"');
$modules = get_list_of_plugins('auth');
$auth_options = array();
foreach ($modules as $module) {
$auth_options[$module] = get_string("auth_$module"."title", "auth");
$choices = csv_import_reader::get_delimiter_list();
$mform->addElement('select', 'delimiter_name', get_string('csvdelimiter', 'admin'), $choices);
if (array_key_exists('cfg', $choices)) {
$mform->setDefault('delimiter_name', 'cfg');
} else if (get_string('listsep') == ';') {
$mform->setDefault('delimiter_name', 'semicolon');
} else {
$mform->setDefault('delimiter_name', 'comma');
}
$mform->addElement('select', 'auth', get_string('chooseauthmethod','auth'), $auth_options);
$mform->setDefault('auth', $templateuser->auth);
$textlib = textlib_get_instance();
$choices = $textlib->get_encodings();
$mform->addElement('select', 'encoding', get_string('encoding', 'admin'), $choices);
$mform->setDefault('encoding', 'UTF-8');
$choices = array('10'=>10, '20'=>20, '100'=>100, '1000'=>1000, '100000'=>100000);
$mform->addElement('select', 'previewrows', get_string('rowpreviewnum', 'admin'), $choices);
$mform->setType('previewrows', PARAM_INT);
$this->add_action_buttons(false, get_string('uploadusers'));
}
}
class admin_uploaduser_form2 extends moodleform {
function definition (){
global $CFG, $USER;
//no editors here - we need proper empty fields
$CFG->htmleditor = null;
$mform =& $this->_form;
$columns =& $this->_customdata;
// I am the template user, why should it be the administrator? we have roles now, other ppl may use this script ;-)
$templateuser = $USER;
// upload settings and file
$mform->addElement('header', 'settingsheader', get_string('settings'));
$choices = array(UU_ADDNEW => get_string('uuoptype_addnew', 'admin'),
UU_ADDINC => get_string('uuoptype_addinc', 'admin'),
UU_ADD_UPDATE => get_string('uuoptype_addupdate', 'admin'),
UU_UPDATE => get_string('uuoptype_update', 'admin'));
$mform->addElement('select', 'uutype', get_string('uuoptype', 'admin'), $choices);
$choices = array(0 => get_string('infilefield', 'auth'), 1 => get_string('createpasswordifneeded', 'auth'));
$mform->addElement('select', 'uupasswordnew', get_string('uupasswordnew', 'admin'), $choices);
$mform->setDefault('uupasswordnew', 0);
$mform->disabledIf('uupasswordnew', 'uutype', 'eq', UU_UPDATE);
$choices = array(0 => get_string('nochanges', 'admin'),
1 => get_string('uuupdatefromfile', 'admin'),
2 => get_string('uuupdateall', 'admin'),
3 => get_string('uuupdatemissing', 'admin'));
$mform->addElement('select', 'uuupdatetype', get_string('uuupdatetype', 'admin'), $choices);
$mform->setDefault('uuupdatetype', 0);
$mform->disabledIf('uuupdatetype', 'uutype', 'eq', UU_ADDNEW);
$mform->disabledIf('uuupdatetype', 'uutype', 'eq', UU_ADDINC);
$choices = array(0 => get_string('nochanges', 'admin'), 1 => get_string('update'));
$mform->addElement('select', 'uupasswordold', get_string('uupasswordold', 'admin'), $choices);
$mform->setDefault('uupasswordold', 0);
$mform->disabledIf('uupasswordold', 'uutype', 'eq', UU_ADDNEW);
$mform->disabledIf('uupasswordold', 'uutype', 'eq', UU_ADDINC);
$mform->disabledIf('uupasswordold', 'uuupdatetype', 'eq', 0);
$mform->disabledIf('uupasswordold', 'uuupdatetype', 'eq', 3);
$mform->addElement('selectyesno', 'uuallowrenames', get_string('allowrenames', 'admin'));
$mform->setDefault('uuallowrenames', 0);
$mform->disabledIf('uuallowrenames', 'uutype', 'eq', UU_ADDNEW);
$mform->disabledIf('uuallowrenames', 'uutype', 'eq', UU_ADDINC);
$mform->addElement('selectyesno', 'uuallowdeletes', get_string('allowdeletes', 'admin'));
$mform->setDefault('uuallowdeletes', 0);
$mform->disabledIf('uuallowdeletes', 'uutype', 'eq', UU_ADDNEW);
$mform->disabledIf('uuallowdeletes', 'uutype', 'eq', UU_ADDINC);
$mform->addElement('selectyesno', 'uunoemailduplicates', get_string('uunoemailduplicates', 'admin'));
$mform->setDefault('uunoemailduplicates', 0);
$choices = array(0 => get_string('no'),
1 => get_string('uubulknew', 'admin'),
2 => get_string('uubulkupdated', 'admin'),
3 => get_string('uubulkall', 'admin'));
$mform->addElement('select', 'uubulk', get_string('uubulk', 'admin'), $choices);
$mform->setDefault('uubulk', 0);
// roles selection
$showroles = false;
foreach ($columns as $column) {
if (preg_match('/^type\d+$/', $column)) {
$showroles = true;
break;
}
}
if ($showroles) {
$mform->addElement('header', 'rolesheader', get_string('roles'));
$choices = uu_allowed_roles(true);
$choices[0] = get_string('uucoursedefaultrole', 'admin');
$mform->addElement('select', 'uulegacy1', get_string('uulegacy1role', 'admin'), $choices);
$mform->setDefault('uulegacy1', 0);
unset($choices[0]);
$mform->addElement('select', 'uulegacy2', get_string('uulegacy2role', 'admin'), $choices);
if ($editteacherroles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW)) {
$editteacherrole = array_shift($editteacherroles); /// Take the first one
$mform->setDefault('uulegacy2', $editteacherrole->id);
unset($editteacherroles);
} else {
$mform->setDefault('uulegacy2', $CFG->defaultcourseroleid);
}
$mform->addElement('select', 'uulegacy3', get_string('uulegacy3role', 'admin'), $choices);
if ($teacherroles = get_roles_with_capability('moodle/legacy:teacher', CAP_ALLOW)) {
$teacherrole = array_shift($teacherroles); /// Take the first one
$mform->setDefault('uulegacy3', $teacherrole->id);
unset($teacherroles);
} else {
$mform->setDefault('uulegacy3', $CFG->defaultcourseroleid);
}
}
// default values
$mform->addElement('header', 'defaultheader', get_string('defaultvalues', 'admin'));
$mform->addElement('text', 'username', get_string('username'), 'size="20"');
$mform->addRule('username', get_string('requiredtemplate', 'admin'), 'required', null, 'client');
// only enabled and known to work plugins
$choices = uu_allowed_auths();
$mform->addElement('select', 'auth', get_string('chooseauthmethod','auth'), $choices);
$mform->setDefault('auth', 'manual'); // manual is a sensible backwards compatible default
$mform->setHelpButton('auth', array('authchange', get_string('chooseauthmethod','auth')));
$mform->setAdvanced('auth');
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
$choices = array(
get_string('emaildisplayno'),
get_string('emaildisplayyes'),
get_string('emaildisplaycourse'),
);
$choices = array(0 => get_string('emaildisplayno'), 1 => get_string('emaildisplayyes'), 2 => get_string('emaildisplaycourse'));
$mform->addElement('select', 'maildisplay', get_string('emaildisplay'), $choices);
$mform->setDefault('maildisplay', 2);
$choices = array(
get_string('emailenable'),
get_string('emaildisable'),
);
$choices = array(0 => get_string('emailenable'), 1 => get_string('emaildisable'));
$mform->addElement('select', 'emailstop', get_string('emailactive'), $choices);
$choices = array(
get_string('textformat'),
get_string('htmlformat'),
);
$choices = array(0 => get_string('textformat'), 1 => get_string('htmlformat'));
$mform->addElement('select', 'mailformat', get_string('emailformat'), $choices);
$mform->setDefault('mailformat', 1);
$mform->setAdvanced('mailformat');
$choices = array(
get_string('autosubscribeyes'),
get_string('autosubscribeno'),
);
$choices = array(0 => get_string('emaildigestoff'), 1 => get_string('emaildigestcomplete'), 2 => get_string('emaildigestsubjects'));
$mform->addElement('select', 'maildigest', get_string('emaildigest'), $choices);
$mform->setDefault('maildigest', 0);
$mform->setAdvanced('maildigest');
$choices = array(0 => get_string('autosubscribeyes'), 1 => get_string('autosubscribeno'));
$mform->addElement('select', 'autosubscribe', get_string('autosubscribe'), $choices);
$mform->setDefault('autosubscribe', 1);
if ($CFG->htmleditor) {
$choices = array(
get_string('texteditor'),
get_string('htmleditor'),
);
$choices = array(0 => get_string('texteditor'), 1 => get_string('htmleditor'));
$mform->addElement('select', 'htmleditor', get_string('textediting'), $choices);
$mform->setDefault('htmleditor', 1);
} else {
$mform->addElement('static', 'htmleditor', get_string('textediting'), get_string('texteditor'));
}
$mform->setAdvanced('htmleditor');
if (empty($CFG->enableajax)) {
$mform->addElement('static', 'ajax', get_string('ajaxuse'), get_string('ajaxno'));
} else {
$choices = array( 0 => get_string('ajaxno'), 1 => get_string('ajaxyes'));
$mform->addElement('select', 'ajax', get_string('ajaxuse'), $choices);
$mform->setDefault('ajax', 1);
}
$mform->setAdvanced('ajax');
$mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"');
$mform->setType('city', PARAM_MULTILANG);
$mform->setDefault('city', $templateuser->city);
$mform->addElement('select', 'country', get_string('selectacountry'), get_list_of_countries());
$mform->setDefault('country', $templateuser->country);
$mform->setAdvanced('country');
$choices = get_list_of_timezones();
$choices['99'] = get_string('serverlocaltime');
$mform->addElement('select', 'timezone', get_string('timezone'), $choices);
$mform->setDefault('timezone', $templateuser->timezone);
$mform->setAdvanced('timezone');
$mform->addElement('select', 'lang', get_string('preferredlanguage'), get_list_of_languages());
$mform->setDefault('lang', $templateuser->lang);
$mform->setAdvanced('lang');
$mform->addElement('htmleditor', 'description', get_string('userdescription'));
$mform->setType('description', PARAM_CLEAN);
$mform->setHelpButton('description', array('text', get_string('helptext')));
$mform->setAdvanced('description');
$mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"');
$mform->setAdvanced('url');
$mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="64" size="25"');
$mform->setType('idnumber', PARAM_CLEAN);
$mform->addElement('text', 'institution', get_string('institution'), 'maxlength="40" size="25"');
$mform->setType('institution', PARAM_MULTILANG);
@@ -97,40 +231,106 @@ class admin_uploaduser_form extends moodleform {
$mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"');
$mform->setType('phone1', PARAM_CLEAN);
$mform->setAdvanced('phone1');
$mform->addElement('text', 'phone2', get_string('phone'), 'maxlength="20" size="25"');
$mform->addElement('text', 'phone2', get_string('phone2'), 'maxlength="20" size="25"');
$mform->setType('phone2', PARAM_CLEAN);
$mform->setAdvanced('phone2');
$mform->addElement('text', 'address', get_string('address'), 'maxlength="70" size="25"');
$mform->setType('address', PARAM_MULTILANG);
$mform->addElement('header', 'settingsheader', get_string('settings'));
$mform->setAdvanced('address');
$choices = array(
get_string('infilefield', 'auth'),
get_string('createpasswordifneeded', 'auth'),
);
$mform->addElement('select', 'createpassword', get_string('passwordhandling', 'auth'), $choices);
/// Next the profile defaults
profile_definition($mform);
$mform->addElement('selectyesno', 'updateaccounts', get_string('updateaccounts', 'admin'));
$mform->addElement('selectyesno', 'allowrenames', get_string('allowrenames', 'admin'));
// hidden fields
$mform->addElement('hidden', 'iid');
$mform->setType('iid', PARAM_INT);
$choices = array(
get_string('addcounter', 'admin'),
get_string('skipuser', 'admin'),
);
$mform->addElement('select', 'duplicatehandling', get_string('newusernamehandling', 'admin'), $choices);
$mform->addElement('hidden', 'previewrows');
$mform->setType('previewrows', PARAM_INT);
$this->add_action_buttons(false, get_string('uploadusers'));
$mform->addElement('hidden', 'readcount');
$mform->setType('readcount', PARAM_INT);
$this->add_action_buttons(true, get_string('uploadusers'));
}
function get_userfile_name(){
if ($this->is_submitted() and $this->is_validated()) {
// return the temporary filename to process
return $this->_upload_manager->files['userfile']['tmp_name'];
}else{
return NULL;
/**
* Form tweaks that depend on current data.
*/
function definition_after_data() {
$mform =& $this->_form;
$columns =& $this->_customdata;
foreach ($columns as $column) {
if ($mform->elementExists($column)) {
$mform->removeElement($column);
}
}
}
/**
* Server side validation.
*/
function validation($data, $files) {
$errors = parent::validation($data, $files);
$columns =& $this->_customdata;
$optype = $data['uutype'];
// detect if password column needed in file
if (!in_array('password', $columns)) {
switch ($optype) {
case UU_UPDATE:
if (!empty($data['uupasswordold'])) {
$errors['uupasswordold'] = get_string('missingfield', 'error', 'password');
}
break;
case UU_ADD_UPDATE:
if (empty($data['uupasswordnew'])) {
$errors['uupasswordnew'] = get_string('missingfield', 'error', 'password');
}
if (!empty($data['uupasswordold'])) {
$errors['uupasswordold'] = get_string('missingfield', 'error', 'password');
}
break;
case UU_ADDNEW:
case UU_ADDINC:
if (empty($data['uupasswordnew'])) {
$errors['uupasswordnew'] = get_string('missingfield', 'error', 'password');
}
break;
}
}
// look for other required data
if ($optype != UU_UPDATE) {
if (!in_array('firstname', $columns)) {
$errors['uutype'] = get_string('missingfield', 'error', 'firstname');
}
if (!in_array('lastname', $columns)) {
if (isset($errors['uutype'])) {
$errors['uutype'] = '';
} else {
$errors['uutype'] = ' ';
}
$errors['uutype'] .= get_string('missingfield', 'error', 'lastname');
}
if (!in_array('email', $columns) and empty($data['email'])) {
$errors['email'] = get_string('requiredtemplate', 'admin');
}
if (!in_array('city', $columns) and empty($data['city'])) {
$errors['city'] = get_string('required');
}
}
return $errors;
}
}
?>
+31 -137
View File
@@ -2,6 +2,7 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/user/filters/lib.php');
$delete = optional_param('delete', 0, PARAM_INT);
$confirm = optional_param('confirm', '', PARAM_ALPHANUM); //md5 confirmation hash
@@ -10,9 +11,6 @@
$dir = optional_param('dir', 'ASC', PARAM_ALPHA);
$page = optional_param('page', 0, PARAM_INT);
$perpage = optional_param('perpage', 30, PARAM_INT); // how many per page
$search = trim(optional_param('search', '', PARAM_RAW));
$lastinitial = optional_param('lastinitial', '', PARAM_CLEAN); // only show students with this last initial
$firstinitial = optional_param('firstinitial', '', PARAM_CLEAN); // only show students with this first initial
$ru = optional_param('ru', '2', PARAM_INT); // show remote users
$lu = optional_param('lu', '2', PARAM_INT); // show local users
$acl = optional_param('acl', '0', PARAM_INT); // id of user to tweak mnet ACL (requires $access)
@@ -20,37 +18,7 @@
admin_externalpage_setup('editusers');
// Let's see if we have *any* mnet users. Just ask for a single record
$mnet_users = get_records_select('user', " auth='mnet' AND mnethostid != '{$CFG->mnet_localhost_id}' ", '', '*', '0', '1');
if(is_array($mnet_users) && count($mnet_users) > 0) {
$mnet_auth_users = true;
} else {
$mnet_auth_users = false;
}
if($mnet_auth_users) {
// Determine which users we are looking at (local, remote, or both). Start with both.
if (!isset($_SESSION['admin-user-remoteusers'])) {
$_SESSION['admin-user-remoteusers'] = 1;
$_SESSION['admin-user-localusers'] = 1;
}
if ($ru == 0 or $ru == 1) {
$_SESSION['admin-user-remoteusers'] = $ru;
}
if ($lu == 0 or $lu == 1) {
$_SESSION['admin-user-localusers'] = $lu;
}
$remoteusers = $_SESSION['admin-user-remoteusers'];
$localusers = $_SESSION['admin-user-localusers'];
// if neither remote nor local, set to sensible local only
if (!$remoteusers and !$localusers) {
$_SESSION['admin-user-localusers'] = 1;
$localusers = 1;
}
}
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$site = get_site();
if (!has_capability('moodle/user:update', $sitecontext) and !has_capability('moodle/user:delete', $sitecontext)) {
@@ -60,7 +28,6 @@
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strdeletecheck = get_string('deletecheck');
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');
if (empty($CFG->loginhttps)) {
@@ -96,8 +63,7 @@
error("No such user!", '', true);
}
$primaryadmin = get_admin();
if ($user->id == $primaryadmin->id) {
if (is_primary_admin($user->id)) {
error("You are not allowed to delete the primary admin user!", '', true);
}
@@ -151,6 +117,9 @@
. "' access now set to '$accessctrl'.");
}
// create the user filter form
$ufiltering = new user_filtering();
// Carry on with the user listing
$columns = array("firstname", "lastname", "email", "city", "country", "lastaccess");
@@ -174,28 +143,19 @@
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" alt=\"\" />";
}
$$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir&amp;search=".urlencode(stripslashes($search))."&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial\">".$string[$column]."</a>$columnicon";
$$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir\">".$string[$column]."</a>$columnicon";
}
if ($sort == "name") {
$sort = "firstname";
}
// tell the query which users we are looking at (local, remote, or both)
$remotewhere = '';
if($mnet_auth_users && ($localusers XOR $remoteusers)) {
if ($localusers) {
$remotewhere .= " and mnethostid = {$CFG->mnet_localhost_id} ";
} else {
$remotewhere .= " and mnethostid <> {$CFG->mnet_localhost_id} ";
}
}
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere);
$usercount = get_users(false);
$usersearchcount = get_users(false, $search, true, "", "", $firstinitial, $lastinitial);
if ($search or $firstinitial or $lastinitial) {
$extrasql = $ufiltering->get_sql_filter();
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, '', '', '', $extrasql);
$usercount = get_users(false);
$usersearchcount = get_users(false, '', true, "", "", '', '', '', '', '*', $extrasql);
if ($extrasql !== '') {
print_heading("$usersearchcount / $usercount ".get_string('users'));
$usercount = $usersearchcount;
} else {
@@ -205,65 +165,15 @@
$alphabet = explode(',', get_string('alphabet'));
$strall = get_string('all');
/// Bar of first initials
echo "<p style=\"text-align:center\">";
echo get_string("firstname")." : ";
if ($firstinitial) {
echo " <a href=\"user.php?sort=firstname&amp;dir=ASC&amp;".
"perpage=$perpage&amp;lastinitial=$lastinitial\">$strall</a> ";
} else {
echo " <b>$strall</b> ";
}
foreach ($alphabet as $letter) {
if ($letter == $firstinitial) {
echo " <b>$letter</b> ";
} else {
echo " <a href=\"user.php?sort=firstname&amp;dir=ASC&amp;".
"perpage=$perpage&amp;lastinitial=$lastinitial&amp;firstinitial=$letter\">$letter</a> ";
}
}
echo "<br />";
/// Bar of last initials
echo get_string("lastname")." : ";
if ($lastinitial) {
echo " <a href=\"user.php?sort=lastname&amp;dir=ASC&amp;".
"perpage=$perpage&amp;firstinitial=$firstinitial\">$strall</a> ";
} else {
echo " <b>$strall</b> ";
}
foreach ($alphabet as $letter) {
if ($letter == $lastinitial) {
echo " <b>$letter</b> ";
} else {
echo " <a href=\"user.php?sort=lastname&amp;dir=ASC&amp;".
"perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$letter\">$letter</a> ";
}
}
echo "</p>";
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;");
flush();
if (!$users) {
$match = array();
if ($search !== '') {
$match[] = s($search);
}
if ($firstinitial) {
$match[] = get_string('firstname').": $firstinitial"."___";
}
if ($lastinitial) {
$match[] = get_string('lastname').": $lastinitial"."___";
}
$matchstring = implode(", ", $match);
print_heading(get_string('nousersmatching', '', $matchstring));
print_heading(get_string('nousersfound'));
$table = NULL;
@@ -292,7 +202,18 @@
$mainadmin = get_admin();
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$override = new object();
$override->firstname = 'firstname';
$override->lastname = 'lastname';
$fullnamelanguage = get_string('fullnamedisplay', '', $override);
if (($CFG->fullnamedisplay == 'firstname lastname') or
($CFG->fullnamedisplay == 'firstname') or
($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname' )) {
$fullnamedisplay = "$firstname / $lastname";
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
$fullnamedisplay = "$lastname / $firstname";
}
$table->head = array ($fullnamedisplay, $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {
@@ -367,34 +288,9 @@
}
}
if($mnet_auth_users) {
echo "<p style=\"text-align:center\">";
if ($localusers == 1 && $remoteusers == 1) {
echo '<a href="?lu=0">'.get_string('hidelocal','mnet').'</a> | ';
} elseif ($localusers == 0) {
echo '<a href="?lu=1">'.get_string('showlocal','mnet').'</a> | ';
} else {
echo get_string('hidelocal','mnet').' | ';
}
if ($localusers == 1 && $remoteusers == 1) {
echo '<a href="?ru=0">'.get_string('hideremote','mnet').'</a>';
} elseif ($remoteusers == 0) {
echo '<a href="?ru=1">'.get_string('showremote','mnet').'</a>';
} else {
echo get_string('hideremote','mnet');
}
echo "</p>";
}
echo "<table class=\"searchbox\" style=\"margin-left:auto;margin-right:auto\" cellpadding=\"10\"><tr><td>";
echo "<form action=\"user.php\" method=\"get\"><fieldset class=\"invisiblefieldset\">";
echo "<input type=\"text\" name=\"search\" value=\"".s($search, true)."\" size=\"20\" />";
echo "<input type=\"submit\" value=\"$strsearch\" />";
if ($search) {
echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"$strshowallusers\" />";
}
echo "</fieldset></form>";
echo "</td></tr></table>";
// add filters
$ufiltering->display_add();
$ufiltering->display_active();
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
@@ -402,14 +298,12 @@
if (!empty($table)) {
print_table($table);
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
}
admin_externalpage_print_footer();
+53
View File
@@ -0,0 +1,53 @@
<?php //$Id$
require_once($CFG->dirroot.'/user/filters/lib.php');
if (!defined('MAX_BULK_USERS')) {
define('MAX_BULK_USERS', 2000);
}
function add_selection_all($ufiltering) {
global $SESSION;
$guest = get_guest();
$sqlwhere = $ufiltering->get_sql_filter("id<>{$guest->id} AND deleted <> 1");
if ($rs = get_recordset_select('user', $sqlwhere, 'fullname', 'id,'.sql_fullname().' AS fullname')) {
while ($user = rs_fetch_next_record($rs)) {
if (! isset($SESSION->bulk_users[$user->id])) {
$SESSION->bulk_users[$user->id] = $user->id;
}
}
rs_close($rs);
}
}
function get_selection_data($ufiltering) {
global $SESSION;
// get the SQL filter
$guest = get_guest();
$sqlwhere = $ufiltering->get_sql_filter("id<>{$guest->id} AND deleted <> 1");
$total = count_records_select('user', "id<>{$guest->id} AND deleted <> 1");
$acount = count_records_select('user', $sqlwhere);
$scount = count($SESSION->bulk_users);
$userlist = array('acount'=>$acount, 'scount'=>$scount, 'ausers'=>false, 'susers'=>false, 'total'=>$total);
$userlist['ausers'] = get_records_select_menu('user', $sqlwhere, 'fullname', 'id,'.sql_fullname().' AS fullname', 0, MAX_BULK_USERS);
if ($scount) {
if ($scount < MAX_BULK_USERS) {
$in = implode(',', $SESSION->bulk_users);
} else {
$bulkusers = array_slice($SESSION->bulk_users, 0, MAX_BULK_USERS, true);
$in = implode(',', $bulkusers);
}
$userlist['susers'] = get_records_select_menu('user', "id IN ($in)", 'fullname', 'id,'.sql_fullname().' AS fullname');
}
return $userlist;
}
?>
+77 -74
View File
@@ -1,82 +1,85 @@
<?php //$Id$
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/dmllib.php');
require_once($CFG->dirroot.'/user/filters/text.php');
require_once($CFG->dirroot.'/user/filters/date.php');
require_once($CFG->dirroot.'/user/filters/select.php');
require_once($CFG->dirroot.'/user/filters/courserole.php');
require_once($CFG->dirroot.'/user/filters/globalrole.php');
require_once($CFG->dirroot.'/user/filters/profilefield.php');
require_once($CFG->dirroot.'/user/filters/yesno.php');
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/user/lib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/user/user_bulk_forms.php');
require_once($CFG->dirroot.'/admin/user/user_bulk_form.php');
define("MAX_USERS_PER_PAGE", 5000);
admin_externalpage_setup('userbulk');
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (!isset($SESSION->bulk_users)) {
$SESSION->bulk_users = array();
}
// create the user filter form
$ufiltering = new user_filtering();
// array of bulk operations
$actions = array();
$actions[1] = get_string('confirm');
if (has_capability('moodle/site:readallmessages', $sitecontext) && !empty($CFG->messaging)) {
$actions[2] = get_string('messageselectadd');
}
$actions[3] = get_string('delete');
$actions[4] = get_string('displayonpage');
// create the bulk operations form
$user_bulk_form =& new user_bulk_form(null, $actions);
// array of bulk operations
// create the bulk operations form
$action_form = new user_bulk_action_form();
if ($data = $action_form->get_data(false)) {
// check if an action should be performed and do so
switch ($user_bulk_form->getAction()) {
case 1:
redirect($CFG->wwwroot . '/admin/user/user_bulk_confirm.php');
break;
case 2:
redirect($CFG->wwwroot . '/admin/user/user_bulk_message.php');
break;
case 3:
redirect($CFG->wwwroot . '/admin/user/user_bulk_delete.php');
break;
case 4:
redirect($CFG->wwwroot . '/admin/user/user_bulk_display.php');
break;
default:
break;
switch ($data->action) {
case 1: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_confirm.php');
case 2: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_message.php');
case 3: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_delete.php');
case 4: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_display.php');
case 5: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_download.php');
}
}
$user_bulk_form = new user_bulk_form(null, get_selection_data($ufiltering));
if ($data = $user_bulk_form->get_data(false)) {
if (!empty($data->addall)) {
add_selection_all($ufiltering);
} else if (!empty($data->addsel)) {
if (!empty($data->ausers)) {
if (in_array(0, $data->ausers)) {
add_selection_all($ufiltering);
} else {
foreach($data->ausers as $userid) {
if ($userid == -1) {
continue;
}
if (!isset($SESSION->bulk_users[$userid])) {
$SESSION->bulk_users[$userid] = $userid;
}
}
}
}
} else if (!empty($data->removeall)) {
$SESSION->bulk_users= array();
} else if (!empty($data->removesel)) {
if (!empty($data->susers)) {
if (in_array(0, $data->susers)) {
$SESSION->bulk_users= array();
} else {
foreach($data->susers as $userid) {
if ($userid == -1) {
continue;
}
unset($SESSION->bulk_users[$userid]);
}
}
}
}
// prepare user filter types
$filters[] = new user_filter_text('username', get_string('username'), 'username');
$filters[] = new user_filter_text('realname', get_string('fullname'), sql_fullname());
$filters[] = new user_filter_text('email', get_string('email'), 'email');
$filters[] = new user_filter_text('city', get_string('city'), 'city');
$filters[] = new user_filter_select('country', get_string('country'), 'country', get_list_of_countries());
$filters[] = new user_filter_yesno('confirmed', get_string('confirm'), 'confirmed');
$filters[] = new user_filter_profilefield('profile', get_string('profile'));
$filters[] = new user_filter_courserole('course', get_string('courserole', 'filters'));
$filters[] = new user_filter_globalrole('system', get_string('globalrole', 'role'));
$filters[] = new user_filter_date('date', get_string('date'), 'lastaccess', array('lastlogin'=> get_string('lastlogin'), 'firstaccess' => get_string('firstaccess', 'filters'), 'lastaccess' => get_string('lastaccess'), 'timemodified' => get_string('lastmodified')));
// create the user filter form
$user_filter_form =& new user_filter_form(null, $filters);
// do output
admin_externalpage_setup('userbulk');
admin_externalpage_print_header();
// put the user filter form first
$user_filter_form->display();
// get the SQL filter
$where =& $user_filter_form->getSQLFilter('id<>1 AND NOT deleted');
$ausercount = count_records_select('user', $where);
// limit the number of options
$comment = null;
if($ausercount <= MAX_USERS_PER_PAGE) {
$user_bulk_form->setAvailableUsersSQL($where);
} else {
$comment = get_string('toomanytoshow');
}
$user_bulk_form->setUserCount($ausercount, $comment);
// display the bulk user form
$user_bulk_form->display();
admin_externalpage_print_footer();
?>
// reset the form selections
unset($_POST);
$user_bulk_form = new user_bulk_form(null, get_selection_data($ufiltering));
}
// do output
admin_externalpage_print_header();
$ufiltering->display_add();
$ufiltering->display_active();
$user_bulk_form->display();
$action_form->display();
admin_externalpage_print_footer();
?>
+33 -31
View File
@@ -6,46 +6,48 @@
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/user:update', $sitecontext);
// clean-up users list
$primaryadmin = get_admin();
$userlist = array();
foreach ($SESSION->bulk_susers as $k => $v) {
$user = get_record('user', 'id', $v, null, null, null, null, 'id,firstname,lastname,username,secret,confirmed,mnethostid,auth');
if (!empty($user) && $user->id != $primaryadmin->id && !$user->confirmed && !is_mnet_remote_user($user)) {
$userlist[$k] = $user;
}
}
if (empty($userlist)) {
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
}
$confirm = optional_param('confirm', 0, PARAM_BOOL);
admin_externalpage_setup('userbulk');
require_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM));
$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
if (empty($SESSION->bulk_users)) {
redirect($return);
}
admin_externalpage_print_header();
if (empty($confirm)) {
$usernames = array();
foreach ($userlist as $user) {
$usernames[] =& fullname($user, true);
//TODO: add support for large number of users
if ($confirm and confirm_sesskey()) {
$in = implode(',', $SESSION->bulk_users);
if ($rs = get_recordset_select('user', "id IN ($in)", '', 'id, username, secret, confirmed, auth, firstname, lastname')) {
while ($user = rs_fetch_next_record($rs)) {
if ($user->confirmed) {
continue;
}
$auth = get_auth_plugin($user->auth);
$result = $auth->user_confirm(addslashes($user->username), addslashes($user->secret));
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
}
rs_close($rs);
}
$usernames = implode(', ', $usernames);
redirect($return, get_string('changessaved'));
} else {
$in = implode(',', $SESSION->bulk_users);
$userlist = get_records_select_menu('user', "id IN ($in)", 'fullname', 'id,'.sql_fullname().' AS fullname');
$usernames = implode(', ', $userlist);
$optionsyes = array();
$optionsyes['confirm'] = 1;
$optionsyes['sesskey'] = sesskey();
print_heading(get_string('confirmation', 'admin'));
notice_yesno(get_string('confirmcheckfull', '', $usernames), 'user_bulk_confirm.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
} else {
foreach ($userlist as $k => $user) {
$auth = get_auth_plugin($user->auth);
$result = $auth->user_confirm(addslashes($user->username), addslashes($user->secret));
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
}
redirect($CFG->wwwroot . '/admin/user/user_bulk.php', get_string('changessaved'));
}
admin_externalpage_print_footer();
?>
+33 -32
View File
@@ -6,46 +6,47 @@
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/user:delete', $sitecontext);
// clean-up users list
$primaryadmin = get_admin();
$userlist = array();
foreach ($SESSION->bulk_susers as $k => $v) {
$user = get_record('user', 'id', $v, null, null, null, null, 'id,firstname,lastname,email,auth');
if (!empty($user) && $user->id != $primaryadmin->id) {
$userlist[$k] = $user;
}
}
if (empty($userlist)) {
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
}
$confirm = optional_param('confirm', 0, PARAM_BOOL);
admin_externalpage_setup('userbulk');
require_capability('moodle/user:delete', get_context_instance(CONTEXT_SYSTEM));
$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
if (empty($SESSION->bulk_users)) {
redirect($return);
}
admin_externalpage_print_header();
if (empty($confirm)) {
$usernames = array();
foreach ($userlist as $user) {
$usernames[] =& fullname($user, true);
//TODO: add support for large number of users
if ($confirm and confirm_sesskey()) {
$primaryadmin = get_admin();
$in = implode(',', $SESSION->bulk_users);
if ($rs = get_recordset_select('user', "id IN ($in)")) {
while ($user = rs_fetch_next_record($rs)) {
if ($primaryadmin->id != $user->id and $USER->id != $user->id and delete_user($user)) {
unset($SESSION->bulk_users[$user->id]);
} else {
notify(get_string('deletednot', '', fullname($user, true)));
}
}
rs_close($rs);
}
$usernames = implode(', ', $usernames);
redirect($return, get_string('changessaved'));
} else {
$in = implode(',', $SESSION->bulk_users);
$userlist = get_records_select_menu('user', "id IN ($in)", 'fullname', 'id,'.sql_fullname().' AS fullname');
$usernames = implode(', ', $userlist);
$optionsyes = array();
$optionsyes['confirm'] = 1;
$optionsyes['sesskey'] = sesskey();
print_heading(get_string('confirmation', 'admin'));
notice_yesno(get_string('deletecheckfull', '', $usernames), 'user_bulk_delete.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
} else {
foreach ($userlist as $k => $user) {
if (delete_user($user)) {
unset($SESSION->bulk_susers[$k]);
} else {
notify(get_string('deletednot', '', fullname($user, true)));
}
}
redirect($CFG->wwwroot . '/admin/user/user_bulk.php', get_string('changessaved'));
}
admin_externalpage_print_footer();
?>
+71 -66
View File
@@ -1,76 +1,81 @@
<?php // $Id$
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
if(empty($SESSION->bulk_susers)) {
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
$sort = optional_param('sort', 'fullname', PARAM_ALPHA);
$dir = optional_param('dir', 'asc', PARAM_ALPHA);
admin_externalpage_setup('userbulk');
$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
if (empty($SESSION->bulk_users)) {
redirect($return);
}
$users = $SESSION->bulk_users;
$usertotal = get_users(false);
$usercount = count($users);
$strnever = get_string('never');
admin_externalpage_print_header();
$countries = get_list_of_countries();
foreach ($users as $key => $id) {
$user = get_record('user', 'id', $id, null, null, null, null, 'id, firstname, lastname, username, email, country, lastaccess, city');
$user->fullname = fullname($user, true);
$user->country = @$countries[$user->country];
unset($user->firstname);
unset($user->lastname);
$users[$key] = $user;
}
unset($countries);
// Need to sort by date
function sort_compare($a, $b) {
global $sort, $dir;
if($sort == 'lastaccess') {
$rez = $b->lastaccess - $a->lastaccess;
} else {
$rez = strcasecmp(@$a->$sort, @$b->$sort);
}
$users = $SESSION->bulk_susers;
$usertotal = get_users(false);
$usercount = count($users);
return $dir == 'desc' ? -$rez : $rez;
}
usort($users, 'sort_compare');
$sort = optional_param('sort', 'fullname', PARAM_ALPHA);
$dir = optional_param('dir', 'asc', PARAM_ALPHA);
$strnever = get_string('never');
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$site = get_site();
admin_externalpage_setup('userbulk');
admin_externalpage_print_header();
$countries =& get_list_of_countries();
foreach ($users as $key => $id) {
$user =& get_record('user', 'id', $id, null, null, null, null, 'id,firstname,lastname,username,email,country,lastaccess,city');
$user->fullname = fullname($user, true);
$user->country = @$countries[$user->country];
unset($user->firstname);
unset($user->lastname);
$users[$key] = $user;
}
unset($countries);
// Need to sort by data
function sort_compare($a, $b) {
global $sort, $dir;
if($sort == 'lastaccess') {
$rez = $b->lastaccess - $a->lastaccess;
} else {
$rez = strcasecmp(@$a->$sort, @$b->$sort);
}
return $dir == 'desc' ? -$rez : $rez;
}
usort($users, 'sort_compare');
$table->width = "95%";
$columns = array('fullname', 'username', 'email', 'city', 'country', 'lastaccess');
foreach ($columns as $column) {
$strtitle = get_string($column);
if ($sort != $column) {
$columnicon = '';
$columndir = 'asc';
} else {
$columndir = $dir == 'asc' ? 'desc' : 'asc';
$columnicon = ' <img src="' . $CFG->pixpath . '/t/' . ($dir == 'asc' ? 'down' : 'up' ). '.gif" alt="" />';
}
$table->head[] = '<a href="user_bulk_display.php?sort=' . $column . '&amp;dir=' . $columndir .'">' .$strtitle . '</a>' . $columnicon;
$table->align[] = 'left';
$table->width = "95%";
$columns = array('fullname', /*'username', */'email', 'city', 'country', 'lastaccess');
foreach ($columns as $column) {
$strtitle = get_string($column);
if ($sort != $column) {
$columnicon = '';
$columndir = 'asc';
} else {
$columndir = $dir == 'asc' ? 'desc' : 'asc';
$columnicon = ' <img src="'.$CFG->pixpath.'/t/'.($dir == 'asc' ? 'down' : 'up' ).'.gif" alt="" />';
}
$table->head[] = '<a href="user_bulk_display.php?sort='.$column.'&amp;dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
$table->align[] = 'left';
}
foreach($users as $user) {
$table->data[] = array (
'<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $user->id . '&amp;course=' . $site->id .'">' . $user->fullname .'</a>',
$user->username,
$user->email,
$user->city,
$user->country,
$user->lastaccess ? format_time(time() - $user->lastaccess) : $strnever
);
}
foreach($users as $user) {
$table->data[] = array (
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.SITEID.'">'.$user->fullname.'</a>',
// $user->username,
$user->email,
$user->city,
$user->country,
$user->lastaccess ? format_time(time() - $user->lastaccess) : $strnever
);
}
print_heading("$usercount / $usertotal ".get_string('users'));
print_table($table);
print_heading("$usercount / $usertotal ".get_string('users'));
print_table($table);
admin_externalpage_print_footer();
print_continue($return);
admin_externalpage_print_footer();
?>
+182
View File
@@ -0,0 +1,182 @@
<?php //$Id$
/**
* script for downloading of user lists
*/
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$format = optional_param('format', '', PARAM_ALPHA);
admin_externalpage_setup('userbulk');
require_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM));
$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
if (empty($SESSION->bulk_users)) {
redirect($return);
}
if ($format) {
$fields = array('id' => 'id',
'username' => 'username',
'email' => 'email',
'firstname' => 'firstname',
'lastname' => 'lastname',
'idnumber' => 'idnumber',
'institution' => 'institution',
'department' => 'department',
'phone1' => 'phone1',
'phone2' => 'phone2',
'city' => 'city',
'url' => 'url',
'icq' => 'icq',
'skype' => 'skype',
'aim' => 'aim',
'yahoo' => 'yahoo',
'msn' => 'msn',
'country' => 'country');
if ($extrafields = get_records_select('user_info_field')) {
foreach ($extrafields as $n=>$v){
$fields['profile_field_'.$v->shortname] = 'profile_field_'.$v->name;
}
}
switch ($format) {
case 'csv' : user_download_csv($fields);
case 'ods' : user_download_ods($fields);
case 'xls' : user_download_xls($fields);
}
die;
}
admin_externalpage_print_header();
print_heading(get_string('download', 'admin'));
print_box_start();
echo '<ul>';
echo '<li><a href="user_bulk_download.php?format=csv">'.get_string('downloadtext').'</a></li>';
echo '<li><a href="user_bulk_download.php?format=ods">'.get_string('downloadods').'</a></li>';
echo '<li><a href="user_bulk_download.php?format=xls">'.get_string('downloadexcel').'</a></li>';
echo '</ul>';
print_box_end();
print_continue($return);
print_footer();
function user_download_ods($fields) {
global $CFG, $SESSION;
require_once("$CFG->libdir/odslib.class.php");
require_once($CFG->dirroot.'/user/profile/lib.php');
$filename = clean_filename(get_string('users').'.ods');
$workbook = new MoodleODSWorkbook('-');
$workbook->send($filename);
$worksheet = array();
$worksheet[0] =& $workbook->add_worksheet('');
$col = 0;
foreach ($fields as $fieldname) {
$worksheet[0]->write(0, $col, $fieldname);
$col++;
}
$row = 1;
foreach ($SESSION->bulk_users as $userid) {
if (!$user = get_record('user', 'id', $userid)) {
continue;
}
$col = 0;
profile_load_data($user);
foreach ($fields as $field=>$unused) {
$worksheet[0]->write($row, $col, $user->$field);
$col++;
}
$row++;
}
$workbook->close();
die;
}
function user_download_xls($fields) {
global $CFG, $SESSION;
require_once("$CFG->libdir/excellib.class.php");
require_once($CFG->dirroot.'/user/profile/lib.php');
$filename = clean_filename(get_string('users').'.xls');
$workbook = new MoodleExcelWorkbook('-');
$workbook->send($filename);
$worksheet = array();
$worksheet[0] =& $workbook->add_worksheet('');
$col = 0;
foreach ($fields as $fieldname) {
$worksheet[0]->write(0, $col, $fieldname);
$col++;
}
$row = 1;
foreach ($SESSION->bulk_users as $userid) {
if (!$user = get_record('user', 'id', $userid)) {
continue;
}
$col = 0;
profile_load_data($user);
foreach ($fields as $field=>$unused) {
$worksheet[0]->write($row, $col, $user->$field);
$col++;
}
$row++;
}
$workbook->close();
die;
}
function user_download_csv($fields) {
global $CFG, $SESSION;
require_once($CFG->dirroot.'/user/profile/lib.php');
$filename = clean_filename(get_string('users').'.csv');
header("Content-Type: application/download\n");
header("Content-Disposition: attachment; filename=$filename");
header("Expires: 0");
header("Cache-Control: must-revalidate,post-check=0,pre-check=0");
header("Pragma: public");
$delimiter = get_string('listsep');
$encdelim = '&#'.ord($delimiter);
$row = array();
foreach ($fields as $fieldname) {
$row[] = str_replace($delimiter, $encdelim, $fieldname);
}
echo implode($delimiter, $row)."\n";
foreach ($SESSION->bulk_users as $userid) {
$row = array();
if (!$user = get_record('user', 'id', $userid)) {
continue;
}
profile_load_data($user);
foreach ($fields as $field=>$unused) {
$row[] = str_replace($delimiter, $encdelim, $user->$field);
}
echo implode($delimiter, $row)."\n";
}
die;
}
?>
-192
View File
@@ -1,192 +0,0 @@
<?php //$Id$
require_once($CFG->libdir.'/formslib.php');
require_once($CFG->libdir . '/datalib.php');
class user_bulk_form extends moodleform {
/**
* Quickform select object for the available users.
*/
var $ausers;
/**
* Quickform select object for the selected users.
*/
var $susers;
// form definition
function definition() {
$mform =& $this->_form;
$mform->addElement('header', 'users', get_string('usersinlist', 'bulkusers'));
$this->ausers =& $mform->createElement('select', 'ausers', get_string('available', 'bulkusers'), null, 'size="15"');
$this->ausers->setMultiple(true);
$this->susers =& $mform->createElement('select', 'susers', get_string('selected', 'bulkusers'), null, 'size="15"');
$this->susers->setMultiple(true);
$objs = array();
$objs[] = &$this->ausers;
$objs[] = &$this->susers;
$grp =& $mform->addElement('group', 'usersgrp', get_string('users'), $objs, ' ', false);
$grp->setHelpButton(array('lists','','bulkusers'));
$mform->addElement('static', 'comment');
$objs = array();
$objs[] =& $mform->createElement('submit', 'addone', get_string('addsel', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'addall', get_string('addall', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'removesel', get_string('removesel', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'removeall', get_string('removeall', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'deletesel', get_string('deletesel', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'deleteall', get_string('deleteall', 'bulkusers'));
$grp =& $mform->addElement('group', 'buttonsgrp', get_string('selectedlist', 'bulkusers'), $objs, array(' ', '<br />'), false);
$grp->setHelpButton(array('selectedlist','','bulkusers'));
$objs = array();
$objs[] =& $mform->createElement('select', 'action', get_string('withselected'), @$this->_customdata);
$objs[] =& $mform->createElement('submit', 'doaction', get_string('go'));;
$mform->addElement('group', 'actionsgrp', get_string('withselectedusers'), $objs, ' ', false);
$renderer =& $mform->defaultRenderer();
$template = '<label class="qflabel" style="vertical-align:top">{label}</label> {element}';
$renderer->setGroupElementTemplate($template, 'usersgrp');
}
function setUserCount($count=-1, $comment=null) {
global $SESSION;
if($count < 0) {
$count = count($SESSION->bulk_ausers);
}
$obj =& $this->_form->getElement('comment');
$obj->setLabel($comment);
$obj->setText(get_string('usersfound', 'bulkusers', $count) . ' ' .get_string('usersselected', 'bulkusers', count(@$SESSION->bulk_susers)));
}
function definition_after_data() {
global $SESSION;
$this->_updateSelection($this->get_data());
$this->setSelectedUsers($SESSION->bulk_susers);
if(empty($SESSION->bulk_susers)) {
$this->_form->removeElement('actionsgrp');
}
//$this->setUserCount();
}
/**
* Updates the user selection based on the data submited to the form.
* @param object $data object with data received by the form
*/
function _updateSelection($data) {
global $SESSION;
if(!is_array(@$SESSION->bulk_susers)) {
$SESSION->bulk_susers = array();
}
// if the forms was not submited, then quit
if(is_null($data)){
return;
}
if(@$data->addall) {
if(!empty($SESSION->bulk_ausers)) {
$SESSION->bulk_susers = array_merge($SESSION->bulk_susers, $SESSION->bulk_ausers);
}
} else if(@$data->addone) {
if(!empty($data->ausers)) {
$SESSION->bulk_susers = array_merge($SESSION->bulk_susers, array_values($data->ausers));
}
} else if(@$data->removeall) {
if(!empty($SESSION->bulk_ausers)) {
$SESSION->bulk_susers = array_diff($SESSION->bulk_susers, $SESSION->bulk_ausers);
}
} else if(@$data->removesel) {
if(!empty($data->susers)) {
$SESSION->bulk_susers = array_diff($SESSION->bulk_susers, array_values($data->susers));
}
} else if(@$data->deletesel) {
if(!empty($data->susers)) {
$SESSION->bulk_susers = array_diff($SESSION->bulk_susers, array_values($data->susers));
}
} else if(@$data->deleteall) {
$SESSION->bulk_susers = array();
}
$SESSION->bulk_susers = array_unique($SESSION->bulk_susers);
}
/**
* Sets the available users list, based on their ids
* @param array $ausers array of user ids
*/
function setAvailableUsers($ausers) {
$sqlwhere = null;
if(!empty($ausers)) {
$sqlwhere = 'id IN (' . implode(',', $ausers) . ')';
}
$this->setAvailableUsersSQL($sqlwhere);
}
/**
* Sets the available users list, based on a SQL where condition
* @param string $sqlwhere filter for the users
*/
function setAvailableUsersSQL($sqlwhere=null) {
global $SESSION;
if(is_null($sqlwhere) || ($users =& $this->getUserData($sqlwhere))===false) {
$users = array();
}
$SESSION->bulk_ausers =& array_keys($users);
$this->ausers->load($users);
}
/**
* Sets the selected users list, based on their ids
* @param array $ausers array of user ids
*/
function setSelectedUsers($susers) {
$sqlwhere = null;
if(!empty($susers)) {
$sqlwhere = 'id IN (' . implode(',', $susers) . ')';
}
$this->setSelectedUsersSQL($sqlwhere);
}
/**
* Sets the selected users list, based on a SQL where condition
* @param string $sqlwhere filter for the users
*/
function setSelectedUsersSQL($sqlwhere=null) {
global $SESSION;
if(is_null($sqlwhere) || ($users =& $this->getUserData($sqlwhere))===false) {
$users = array();
}
$SESSION->bulk_susers =& array_keys($users);
$this->susers->load($users);
}
/**
* Returns information about the users.
* @param string $sqlwhere filter for the users
*/
function getUserData($sqlwhere) {
return get_records_select_menu('user', $sqlwhere, 'fullname', 'id,' . sql_fullname() . ' AS fullname');
}
/**
* Returns an array of ids of selected users.
* @return array of selected users' ids
*/
function getSelectedUsers() {
global $SESSION;
return $SESSION->bulk_susers;
}
/**
* Returns an int code of the action to be performed.
* @return int code of the action or false if no action should be performed
*/
function getAction() {
$data =& $this->get_data();
if(!$this->is_submitted() || empty($data->doaction)){
return false;
}
return $data->action;
}
}
?>
+109
View File
@@ -0,0 +1,109 @@
<?php //$Id$
require_once($CFG->libdir.'/formslib.php');
require_once($CFG->libdir.'/datalib.php');
class user_bulk_action_form extends moodleform {
function definition() {
global $CFG;
$mform =& $this->_form;
$syscontext = get_context_instance(CONTEXT_SYSTEM);
$actions = array(0=>get_string('choose').'...');
if (has_capability('moodle/user:update', $syscontext)) {
$actions[1] = get_string('confirm');
}
if (has_capability('moodle/site:readallmessages', $syscontext) && !empty($CFG->messaging)) {
$actions[2] = get_string('messageselectadd');
}
if (has_capability('moodle/user:delete', $syscontext)) {
$actions[3] = get_string('delete');
}
$actions[4] = get_string('displayonpage');
if (has_capability('moodle/user:update', $syscontext)) {
$actions[5] = get_string('download', 'admin');
}
$objs = array();
$objs[] =& $mform->createElement('select', 'action', null, $actions);
$objs[] =& $mform->createElement('submit', 'doaction', get_string('go'));
$mform->addElement('group', 'actionsgrp', get_string('withselectedusers'), $objs, ' ', false);
}
}
class user_bulk_form extends moodleform {
function definition() {
$mform =& $this->_form;
$acount =& $this->_customdata['acount'];
$scount =& $this->_customdata['scount'];
$ausers =& $this->_customdata['ausers'];
$susers =& $this->_customdata['susers'];
$total =& $this->_customdata['total'];
$achoices = array();
$schoices = array();
if (is_array($ausers)) {
if ($total == $acount) {
$achoices[0] = get_string('allusers', 'bulkusers', $total);
} else {
$a = new object();
$a->total = $total;
$a->count = $acount;
$achoices[0] = get_string('allfilteredusers', 'bulkusers', $a);
}
$achoices = $achoices + $ausers;
if ($acount > MAX_BULK_USERS) {
$achoices[-1] = '...';
}
} else {
$achoices[-1] = get_string('nofilteredusers', 'bulkusers', $total);
}
if (is_array($susers)) {
$a = new object();
$a->total = $total;
$a->count = $scount;
$schoices[0] = get_string('allselectedusers', 'bulkusers', $a);
$schoices = $schoices + $susers;
if ($scount > MAX_BULK_USERS) {
$schoices[-1] = '...';
}
} else {
$schoices[-1] = get_string('noselectedusers', 'bulkusers');
}
$mform->addElement('header', 'users', get_string('usersinlist', 'bulkusers'));
$objs = array();
$objs[0] =& $mform->createElement('select', 'ausers', get_string('available', 'bulkusers'), $achoices, 'size="15"');
$objs[0]->setMultiple(true);
$objs[1] =& $mform->createElement('select', 'susers', get_string('selected', 'bulkusers'), $schoices, 'size="15"');
$objs[1]->setMultiple(true);
$grp =& $mform->addElement('group', 'usersgrp', get_string('users'), $objs, ' ', false);
$grp->setHelpButton(array('lists', get_string('users'), 'bulkusers'));
$mform->addElement('static', 'comment');
$objs = array();
$objs[] =& $mform->createElement('submit', 'addsel', get_string('addsel', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'removesel', get_string('removesel', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'addall', get_string('addall', 'bulkusers'));
$objs[] =& $mform->createElement('submit', 'removeall', get_string('removeall', 'bulkusers'));
$grp =& $mform->addElement('group', 'buttonsgrp', get_string('selectedlist', 'bulkusers'), $objs, array(' ', '<br />'), false);
$grp->setHelpButton(array('selectedlist', get_string('selectedlist', 'bulkusers'), 'bulkusers'));
$renderer =& $mform->defaultRenderer();
$template = '<label class="qflabel" style="vertical-align:top">{label}</label> {element}';
$renderer->setGroupElementTemplate($template, 'usersgrp');
}
}
?>
+60 -37
View File
@@ -1,48 +1,71 @@
<?php //$Id$
require_once('../../config.php');
require_once($CFG->dirroot.'/message/lib.php');
require_once($CFG->libdir.'/adminlib.php');
require_login();
require_capability('moodle/site:readallmessages', $sitecontext);
// fix for MDL-10112
if (empty($CFG->messaging)) {
error("Messaging is disabled on this site");
}
$users = $SESSION->bulk_susers;
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_once($CFG->dirroot.'/message/lib.php');
require_once('user_message_form.php');
$extradata['userlist'] =& $users;
$noteform =& new user_message_form('user_bulk_message.php', $extradata);
// if no users or action canceled, return to users page
if (empty($users) || $noteform->is_cancelled()) {
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
}
$formdata =& $noteform->get_data();
// if we have the message and the command, then send it
if ($noteform->is_submitted() && !empty($formdata->send)) {
if(empty($formdata->messagebody)) {
notify(get_string('allfieldsrequired'));
} else {
foreach ($users as $u) {
if ($user = get_record('user', 'id', $u)) {
message_post_message($USER, $user, addslashes($formdata->messagebody), $formdata->format, 'direct');
}
}
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
}
}
$msg = optional_param('msg', '', PARAM_CLEAN);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
admin_externalpage_setup('userbulk');
admin_externalpage_print_header();
if ($noteform->is_submitted() && !empty($formdata->preview)) {
echo '<h3>'.get_string('previewhtml').'</h3>';
echo '<div class="messagepreview">'. format_text(stripslashes($formdata->messagebody),$formdata->format). '</div>';
require_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_SYSTEM));
$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
if (empty($SESSION->bulk_users)) {
redirect($return);
}
$noteform->display();
if (empty($CFG->messaging)) {
error("Messaging is disabled on this site");
}
//TODO: add support for large number of users
if ($confirm and !empty($msg) and confirm_sesskey()) {
$in = implode(',', $SESSION->bulk_users);
if ($rs = get_recordset_select('user', "id IN ($in)")) {
while ($user = rs_fetch_next_record($rs)) {
message_post_message($USER, $user, $msg, FORMAT_HTML, 'direct');
}
}
redirect($return);
}
// disable html editor if not enabled in preferences
if (!get_user_preferences('message_usehtmleditor', 0)) {
$CFG->htmleditor = '';
}
$msgform = new user_message_form('user_bulk_message.php');
if ($msgform->is_cancelled()) {
redirect($return);
} else if ($formdata = $msgform->get_data(false)) {
$options = new object();
$options->para = false;
$options->newlines = true;
$options->smiley = false;
$msg = format_text($formdata->messagebody, $formdata->format, $options);
$in = implode(',', $SESSION->bulk_users);
$userlist = get_records_select_menu('user', "id IN ($in)", 'fullname', 'id,'.sql_fullname().' AS fullname');
$usernames = implode(', ', $userlist);
$optionsyes = array();
$optionsyes['confirm'] = 1;
$optionsyes['sesskey'] = sesskey();
$optionsyes['msg'] = $msg;
admin_externalpage_print_header();
print_heading(get_string('confirmation', 'admin'));
print_box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
notice_yesno(get_string('confirmmessage', 'bulkusers', $usernames), 'user_bulk_message.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer();
die;
}
admin_externalpage_print_header();
$msgform->display();
admin_externalpage_print_footer();
?>
+4 -17
View File
@@ -5,29 +5,16 @@ require_once($CFG->libdir.'/formslib.php');
class user_message_form extends moodleform {
function definition() {
$mform =& $this->_form;
$mform =& $this->_form;
$mform->addElement('header', 'general', get_string('message', 'message'));
$mform->addElement('textarea', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>30));
$mform->setType('messagebody', PARAM_CLEANHTML);
$mform->addElement('textarea', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>60));
$mform->addRule('messagebody', '', 'required', null, 'client');
$mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext'), false, 'editorhelpbutton');
$mform->addElement('format', 'format', get_string('format'));
$objs = array();
foreach($this->_customdata['userlist'] as $k=>$u) {
$user = get_record('user', 'id', $u);
$objs[] =& $mform->createElement('static', null, null, '<input type="checkbox" name="userid['. $k .']" checked="checked" value="'.$u . '" />'. fullname($user));
}
$mform->addElement('group', 'users', 'Users', $objs, '<br />', false);
$objs = array();
$objs[] = &$mform->createElement('submit', 'send', 'Send');
$objs[] = &$mform->createElement('submit', 'preview', 'Preview');
$objs[] = &$mform->createElement('cancel');
$mform->addElement('group', 'buttonar', '', $objs, ' ', false);
$mform->closeHeaderBefore('buttonar');
$this->add_action_buttons();
}
}
?>
@@ -70,89 +70,17 @@ class get_db_directories extends XMLDBAction {
if (!isset($XMLDB->dbdirs)) {
$XMLDB->dbdirs = array();
}
/// First, the main one (lib/db)
$dbdir = new stdClass;
$dbdir->path = $CFG->libdir . '/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, activity modules (mod/xxx/db)
if ($plugins = get_list_of_plugins('mod')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/mod/' . $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, assignment submodules (mod/assignment/type/xxx/db)
if ($plugins = get_list_of_plugins('mod/assignment/type')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/mod/assignment/type/' . $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, question types (question/type/xxx/db)
if ($plugins = get_list_of_plugins('question/type')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/question/type/' . $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, backup/restore stuff (backup/db)
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/backup/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, block system stuff (blocks/db)
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/blocks/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, blocks (blocks/xxx/db)
if ($plugins = get_list_of_plugins('blocks', 'db')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/blocks/' . $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) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/enrol/' . $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
}
}
/// get list of all dirs and create objects with status
$db_direcotries = get_db_directories();
foreach ($db_direcotries as $path) {
$dbdir = new stdClass;
$dbdir->path = $path;
if (!isset($XMLDB->dbdirs[$dbdir->path])) {
$XMLDB->dbdirs[$dbdir->path] = $dbdir;
}
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
/// Sort by key
ksort($XMLDB->dbdirs);
-1
View File
@@ -857,7 +857,6 @@ class test extends XMLDBAction {
} else {
$test->error = $db->ErrorMsg();
$test->sql = array($newtextlen . ' cc. (text) transfer failed. Data changed!');
print_object($new);
$test->status = false;
}
} else {
@@ -7,7 +7,7 @@
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// Copyright (C) 1999 onwards 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 //
@@ -214,6 +214,9 @@ class view_structure_php extends XMLDBAction {
$result .= ' /// Launch create table for ' . $table->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && create_table($table);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -252,6 +255,9 @@ class view_structure_php extends XMLDBAction {
$result .= ' /// Launch drop table for ' . $table->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_table($table);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -290,10 +296,37 @@ class view_structure_php extends XMLDBAction {
$result .= ' /// Launch rename table for ' . $table->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
return $result;
}
/**
* This function will generate the PHP code needed to
* implement the upgrade_xxxx_savepoint() php calls in
* upgrade code generated from the editor
*
* @param XMLDBStructure structure object containing all the info
* @return string PHP code to be used to stabilish a savepoint
*/
function upgrade_savepoint_php ($structure) {
$path = $structure->getPath();
$result = '';
switch ($path) {
case 'lib/db':
$result = XMLDB_LINEFEED .
' /// Main savepoint reached' . XMLDB_LINEFEED .
' upgrade_main_savepoint($result, XXXXXXXXXX);' . XMLDB_LINEFEED;
break;
}
return $result;
}
}
?>
@@ -7,7 +7,7 @@
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// Copyright (C) 1999 onwards 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 //
@@ -339,6 +339,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch add field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && add_field($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -382,6 +385,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch drop field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_field($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -426,6 +432,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch rename field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_field($table, $field, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -479,6 +488,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch change of type for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_type($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -529,6 +541,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch change of precision for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_precision($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -575,6 +590,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch change of sign for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_unsigned($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -621,6 +639,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch change of nullability for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_notnull($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -668,6 +689,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch change of list of values for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_enum($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -714,6 +738,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch change of default for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_default($table, $field);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -758,6 +785,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch add key ' . $key->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && add_key($table, $key);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -802,6 +832,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch drop key ' . $key->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_key($table, $key);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -849,6 +882,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch rename key ' . $key->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_key($table, $key, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -893,6 +929,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch add index ' . $index->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && add_index($table, $index);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -937,6 +976,9 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch drop index ' . $index->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_index($table, $index);' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -984,11 +1026,38 @@ class view_table_php extends XMLDBAction {
$result .= ' /// Launch rename index ' . $index->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_index($table, $index, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
return $result;
}
/**
* This function will generate the PHP code needed to
* implement the upgrade_xxxx_savepoint() php calls in
* upgrade code generated from the editor
*
* @param XMLDBStructure structure object containing all the info
* @return string PHP code to be used to stabilish a savepoint
*/
function upgrade_savepoint_php ($structure) {
$path = $structure->getPath();
$result = '';
switch ($path) {
case 'lib/db':
$result = XMLDB_LINEFEED .
' /// Main savepoint reached' . XMLDB_LINEFEED .
' upgrade_main_savepoint($result, XXXXXXXXXX);' . XMLDB_LINEFEED;
break;
}
return $result;
}
}
?>
+1 -1
View File
@@ -79,7 +79,7 @@
}
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
/// Body of the script, based on action, we delegate the work
$action = optional_param ('action', 'main_view', PARAM_ALPHAEXT);
+1 -1
View File
@@ -6,7 +6,7 @@
//
// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
//
if (!$_SERVER['REQUEST_URI']) {
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];
}
+2 -5
View File
@@ -487,11 +487,8 @@ if ( !is_object($PHPCAS_CLIENT) ) {
* @return array
*/
function ldap_attributes () {
$fields = array("firstname", "lastname", "email", "phone1", "phone2",
"department", "address", "city", "country", "description",
"idnumber", "lang" );
$moodleattributes = array();
foreach ($fields as $field) {
foreach ($this->userfields as $field) {
if (!empty($this->config->{"field_map_$field"})) {
$moodleattributes[$field] = $this->config->{"field_map_$field"};
if (preg_match('/,/',$moodleattributes[$field])) {
@@ -698,7 +695,7 @@ if ( !is_object($PHPCAS_CLIENT) ) {
// find users in DB that aren't in ldap -- to be removed!
// this is still not as scalable (but how often do we mass delete?)
if (!empty($this->config->removeuser)) {
$sql = "SELECT u.id, u.username, u.email
$sql = "SELECT u.id, u.username, u.email, u.auth
FROM {$CFG->prefix}user u
LEFT JOIN $temptable e ON u.username = e.username
WHERE u.auth='cas'
+4 -4
View File
@@ -134,7 +134,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
@@ -722,7 +722,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
<tr valign="top" class="required">
<td align="right"><label for="attrcreators_key"><?php print_string('auth_ldap_attrcreators_key','auth') ?></label></td>
<td align="right"><label for="attrcreators"><?php print_string('auth_ldap_attrcreators_key','auth') ?></label></td>
<td>
@@ -742,7 +742,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
<tr valign="top" class="required">
<td align="right"><label for="groupecreators_key"><?php print_string('auth_ldap_groupecreators_key','auth') ?></label></td>
<td align="right"><label for="groupecreators"><?php print_string('auth_ldap_groupecreators_key','auth') ?></label></td>
<td>
@@ -825,4 +825,4 @@ print_auth_lock_options('cas', $user_fields, $help, true, true);
?>
</table>
</table>
+10 -9
View File
@@ -132,11 +132,8 @@ class auth_plugin_db extends auth_plugin_base {
* @return array
*/
function db_attributes() {
$fields = array("firstname", "lastname", "email", "phone1", "phone2",
"department", "address", "city", "country", "description",
"idnumber", "lang" );
$moodleattributes = array();
foreach ($fields as $field) {
foreach ($this->userfields as $field) {
if (!empty($this->config->{"field_map_$field"})) {
$moodleattributes[$field] = $this->config->{"field_map_$field"};
}
@@ -179,6 +176,7 @@ class auth_plugin_db extends auth_plugin_base {
if ($rs = $authdb->Execute($sql)) {
if ( !$rs->EOF ) {
$fields_obj = rs_fetch_record($rs);
$fields_obj = (object)array_change_key_case((array)$fields_obj , CASE_LOWER);
foreach ($selectfields as $localname=>$externalname) {
$result[$localname] = $textlib->convert($fields_obj->{$localname}, $this->config->extencoding, 'utf-8');
}
@@ -241,11 +239,11 @@ class auth_plugin_db extends auth_plugin_base {
// find obsolete users
if (count($userlist)) {
$sql = "SELECT u.id, u.username, u.email
$sql = "SELECT u.id, u.username, u.email, u.auth
FROM {$CFG->prefix}user u
WHERE u.auth='db' AND u.deleted=0 AND u.username NOT IN ($quoteduserlist)";
} else {
$sql = "SELECT u.id, u.username, u.email
$sql = "SELECT u.id, u.username, u.email, u.auth
FROM {$CFG->prefix}user u
WHERE u.auth='db' AND u.deleted=0";
}
@@ -334,10 +332,12 @@ class auth_plugin_db extends auth_plugin_base {
// simplify down to usernames
$usernames = array();
foreach ($users as $user) {
array_push($usernames, $user->username);
if (!empty($users)) {
foreach ($users as $user) {
array_push($usernames, $user->username);
}
unset($users);
}
unset($users);
$add_users = array_diff($userlist, $usernames);
unset($usernames);
@@ -422,6 +422,7 @@ class auth_plugin_db extends auth_plugin_base {
print_error('auth_dbcantconnect','auth');
} else if ( !$rs->EOF ) {
while ($rec = rs_fetch_next_record($rs)) {
$rec = (object)array_change_key_case((array)$rec , CASE_LOWER);
array_push($result, $rec->username);
}
}
+19
View File
@@ -86,6 +86,9 @@ class auth_plugin_email extends auth_plugin_base {
/// Save any custom profile field information
profile_save_data($user);
$user = get_record('user', 'id', $user->id);
events_trigger('user_created', $user);
if (! send_confirmation_email($user)) {
print_error('auth_emailnoemail','auth');
}
@@ -197,8 +200,24 @@ class auth_plugin_email extends auth_plugin_base {
* Processes and stores configuration data for this authentication plugin.
*/
function process_config($config) {
// set to defaults if undefined
if (!isset($config->recaptcha)) {
$config->recaptcha = false;
}
// save settings
set_config('recaptcha', $config->recaptcha, 'auth/email');
return true;
}
/**
* Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements.
* @abstract Implement in child classes
* @return bool
*/
function is_captcha_enabled() {
return false;
}
}
+19 -1
View File
@@ -1,7 +1,25 @@
<!-- No config needed -->
<div style="text-align: center"><?php print_string('none'); ?></div>
<?php
// set to defaults if undefined
if (!isset($config->recaptcha)) {
$config->recaptcha = false;
}
$yesno = array( get_string('no'), get_string('yes') );
?>
<table cellspacing="0" cellpadding="5" border="0">
<tr>
<td colspan="3">
<h2 class="main"><?php print_string('auth_emailsettings', 'auth') ?> </h2>
</td>
</tr>
<tr>
<td align="right"><label for="menurecaptcha"><?php print_string('auth_emailrecaptcha_key', 'auth') ?></label></td>
<td><?php choose_from_menu($yesno, 'recaptcha', $config->recaptcha, ''); ?></td>
<td><?php print_string('auth_emailrecaptcha', 'auth') ?></td>
</tr>
<?php
print_auth_lock_options('email', $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
+230 -28
View File
@@ -23,6 +23,10 @@ if (!defined('AUTH_AD_ACCOUNTDISABLE')) {
if (!defined('AUTH_AD_NORMAL_ACCOUNT')) {
define('AUTH_AD_NORMAL_ACCOUNT', 0x0200);
}
if (!defined('AUTH_NTLMTIMEOUT')) { // timewindow for the NTLM SSO process, in secs...
define('AUTH_NTLMTIMEOUT', 10);
}
require_once($CFG->libdir.'/authlib.php');
@@ -53,11 +57,36 @@ class auth_plugin_ldap extends auth_plugin_base {
$this->config->{$key} = $value[$this->config->user_type];
}
}
//hack prefix to objectclass
if (empty($this->config->objectclass)) { // Can't send empty filter
$this->config->objectclass='objectClass=*';
} else if (stripos($this->config->objectclass, 'objectClass=') !== 0) {
$this->config->objectclass = 'objectClass='.$this->config->objectclass;
// Hack prefix to objectclass
if (empty($this->config->objectclass)) {
// Can't send empty filter
$this->config->objectclass='(objectClass=*)';
} else if (stripos($this->config->objectclass, 'objectClass=') === 0) {
// Value is 'objectClass=some-string-here', so just add ()
// around the value (filter _must_ have them).
$this->config->objectclass = '('.$this->config->objectclass.')';
} else if (stripos($this->config->objectclass, '(') !== 0) {
// Value is 'some-string-not-starting-with-left-parentheses',
// which is assumed to be the objectClass matching value.
// So build a valid filter with it.
$this->config->objectclass = '(objectClass='.$this->config->objectclass.')';
} else {
// There is an additional possible value
// '(some-string-here)', that can be used to specify any
// valid filter string, to select subsets of users based
// on any criteria. For example, we could select the users
// whose objectClass is 'user' and have the
// 'enabledMoodleUser' attribute, with something like:
//
// (&(objectClass=user)(enabledMoodleUser=1))
//
// This is only used in the functions that deal with the
// whole potential set of users (currently sync_users()
// and get_user_list() only).
//
// In this particular case we don't need to do anything,
// so leave $this->config->objectclass as is.
}
}
@@ -85,8 +114,43 @@ class auth_plugin_ldap extends auth_plugin_base {
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
$extpassword = $textlib->convert(stripslashes($password), 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
//
// Before we connect to LDAP, check if this is an AD SSO login
// if we succeed in this block, we'll return success early.
//
$key = sesskey();
if (!empty($this->config->ntlmsso_enabled) && $key === $password) {
$cf = get_cache_flags('auth/ldap/ntlmsess');
// We only get the cache flag if we retrieve it before
// it expires (AUTH_NTLMTIMEOUT seconds).
if (!isset($cf[$key]) || $cf[$key] === '') {
return false;
}
$sessusername = $cf[$key];
if ($username === $sessusername) {
unset($sessusername);
unset($cf);
// Check that the user is inside one of the configured LDAP contexts
$validuser = false;
$ldapconnection = $this->ldap_connect();
if ($ldapconnection) {
// if the user is not inside the configured contexts,
// ldap_find_userdn returns false.
if ($this->ldap_find_userdn($ldapconnection, $extusername)) {
$validuser = true;
}
ldap_close($ldapconnection);
}
// Shortcut here - SSO confirmed
return $validuser;
}
} // End SSO processing
unset($key);
$ldapconnection = $this->ldap_connect();
if ($ldapconnection) {
$ldap_user_dn = $this->ldap_find_userdn($ldapconnection, $extusername);
@@ -105,7 +169,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
else {
@ldap_close($ldapconnection);
print_error('auth_ldap_noconnect','auth',$this->config->host_url);
print_error('auth_ldap_noconnect','auth','',$this->config->host_url);
}
return false;
}
@@ -364,6 +428,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$this->update_user_record($user->username);
update_internal_user_password($user, $plainslashedpassword);
$user = get_record('user', 'id', $user->id);
events_trigger('user_created', $user);
if (! send_confirmation_email($user)) {
print_error('auth_emailnoemail', 'auth');
}
@@ -442,7 +509,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$ldapconnection = $this->ldap_connect();
$user_dn = $this->ldap_find_userdn($ldapconnection, $extusername);
$search_attribs = array($this->config->expireattr);
$sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($sr) {
$info = $this->ldap_get_entries($ldapconnection, $sr);
if (!empty ($info) and !empty($info[0][$this->config->expireattr][0])) {
@@ -538,7 +605,7 @@ class auth_plugin_ldap extends auth_plugin_base {
//// get user's list from ldap to sql in a scalable fashion
////
// prepare some data we'll need
$filter = "(&(".$this->config->user_attribute."=*)(".$this->config->objectclass."))";
$filter = '(&('.$this->config->user_attribute.'=*)'.$this->config->objectclass.')';
$contexts = explode(";",$this->config->contexts);
@@ -569,7 +636,8 @@ class auth_plugin_ldap extends auth_plugin_base {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
$value = $textlib->convert($value[0], $this->config->ldapencoding, 'utf-8');
array_push($fresult, $value);
// usernames are __always__ lowercase.
array_push($fresult, moodle_strtolower($value));
if (count($fresult) >= $bulk_insert_records) {
$this->ldap_bulk_insert($fresult, $temptable);
$fresult = array();
@@ -603,7 +671,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// find users in DB that aren't in ldap -- to be removed!
// this is still not as scalable (but how often do we mass delete?)
if (!empty($this->config->removeuser)) {
$sql = "SELECT u.id, u.username, u.email
$sql = "SELECT u.id, u.username, u.email, u.auth
FROM {$CFG->prefix}user u
LEFT JOIN $temptable e ON u.username = e.username
WHERE u.auth='ldap'
@@ -819,7 +887,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$user = get_record('user', 'username', $username, 'mnethostid', $CFG->mnet_localhost_id);
if (empty($user)) { // trouble
error_log("Cannot update non-existent user: ".stripslashes($username));
print_error('auth_dbusernotexist','auth',$username);
print_error('auth_dbusernotexist','auth','',$username);
die;
}
@@ -979,6 +1047,21 @@ class auth_plugin_ldap extends auth_plugin_base {
return true; // just change auth and skip update
}
$attrmap = $this->ldap_attributes();
// Before doing anything else, make sure really need to update anything
// in the external LDAP server.
$update_external = false;
foreach ($attrmap as $key => $ldapkeys) {
if (!empty($this->config->{'field_updateremote_'.$key})) {
$update_external = true;
break;
}
}
if (!$update_external) {
return true;
}
$textlib = textlib_get_instance();
$extoldusername = $textlib->convert($olduser->username, 'utf-8', $this->config->ldapencoding);
@@ -986,7 +1069,6 @@ class auth_plugin_ldap extends auth_plugin_base {
$search_attribs = array();
$attrmap = $this->ldap_attributes();
foreach ($attrmap as $key => $values) {
if (!is_array($values)) {
$values = array($values);
@@ -1007,9 +1089,16 @@ class auth_plugin_ldap extends auth_plugin_base {
$user_entry = $this->ldap_get_entries($ldapconnection, $user_info_result);
if (empty($user_entry)) {
$error = 'ldap: Could not find user while updating externally. '.
'Details follow: search base: \''.$user_dn.'\'; search filter: \''.
$this->config->objectclass.'\'; search attributes: ';
foreach ($search_attribs as $attrib) {
$error .= $attrib.' ';
}
error_log($error);
return false; // old user not found!
} else if (count($user_entry) > 1) {
trigger_error("ldap: Strange! More than one user record found in ldap. Only using the first one.");
error_log('ldap: Strange! More than one user record found in ldap. Only using the first one.');
return false;
}
$user_entry = $user_entry[0];
@@ -1035,6 +1124,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
$ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding);
foreach ($ldapkeys as $ldapkey) {
@@ -1164,7 +1254,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
//Update password expiration time, grace logins count
$search_attribs = array($this->config->expireattr, 'passwordExpirationInterval','loginGraceLimit' );
$sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($sr) {
$info=$this->ldap_get_entries($ldapconnection, $sr);
$newattrs = array();
@@ -1301,7 +1391,7 @@ class auth_plugin_ldap extends auth_plugin_base {
'rfc2307' => 'shadowExpire',
'rfc2307bis' => 'shadowExpire',
'samba' => '', //No support yet
'ad' => '', //No support yet
'ad' => 'pwdLastSet',
'default' => ''
);
return $default;
@@ -1398,8 +1488,11 @@ class auth_plugin_ldap extends auth_plugin_base {
/**
* checks if user belong to specific group(s)
* or is in a subtree.
*
* Returns true if user belongs group in grupdns string.
* Returns true if user belongs group in grupdns string OR
* if the DN of the user is in a subtree pf the DN provided
* as "group"
*
* @param mixed $username username
* @param mixed $groupdns string of group dn separated by ;
@@ -1433,6 +1526,15 @@ class auth_plugin_ldap extends auth_plugin_base {
if (empty($group)) {
continue;
}
// check cheaply if the user's DN sits in a subtree
// of the "group" DN provided. Granted, this isn't
// a proper LDAP group, but it's a popular usage.
if (strpos(strrev($memberuser), strrev($group))===0) {
$result = true;
break;
}
//echo "Checking group $group for member $username\n";
$search = ldap_read($ldapconnection, $group, '('.$this->config->memberattribute.'='.$this->filter_addslashes($memberuser).')', array($this->config->memberattribute));
if (!empty($search) and ldap_count_entries($ldapconnection, $search)) {
@@ -1512,7 +1614,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
//If any of servers are alive we have already returned connection
print_error('auth_ldap_noconnect_all','auth',$this->config->user_type);
print_error('auth_ldap_noconnect_all','auth','', $debuginfo);
return false;
}
@@ -1574,11 +1676,8 @@ class auth_plugin_ldap extends auth_plugin_base {
*/
function ldap_attributes () {
$fields = array("firstname", "lastname", "email", "phone1", "phone2",
"department", "address", "city", "country", "description",
"idnumber", "lang" );
$moodleattributes = array();
foreach ($fields as $field) {
foreach ($this->userfields as $field) {
if (!empty($this->config->{"field_map_$field"})) {
$moodleattributes[$field] = $this->config->{"field_map_$field"};
if (preg_match('/,/',$moodleattributes[$field])) {
@@ -1603,7 +1702,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$ldapconnection = $this->ldap_connect();
if ($filter=="*") {
$filter = "(&(".$this->config->user_attribute."=*)(".$this->config->objectclass."))";
$filter = '(&('.$this->config->user_attribute.'=*)'.$this->config->objectclass.')';
}
$contexts = explode(";",$this->config->contexts);
@@ -1707,6 +1806,103 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
/**
* Will get called before the login page is shown, if NTLM SSO
* is enabled, and the user is in the right network, we'll redirect
* to the magic NTLM page for SSO...
*
*/
function loginpage_hook() {
global $CFG;
if ($_SERVER['REQUEST_METHOD'] === 'GET' // Only on initial GET
// of loginpage
&&!empty($this->config->ntlmsso_enabled)// SSO enabled
&& !empty($this->config->ntlmsso_subnet)// have a subnet to test for
&& empty($_GET['authldap_skipntlmsso']) // haven't failed it yet
&& (isguestuser() || !isloggedin()) // guestuser or not-logged-in users
&& address_in_subnet($_SERVER['REMOTE_ADDR'],$this->config->ntlmsso_subnet)) {
redirect("{$CFG->wwwroot}/auth/ldap/ntlmsso_attempt.php");
}
}
/**
* To be called from a page running under NTLM's
* "Integrated Windows Authentication".
*
* If successful, it will set a special "cookie" (not an HTTP cookie!)
* in cache_flags under the "auth/ldap/ntlmsess" "plugin" and return true.
* The "cookie" will be picked up by ntlmsso_finish() to complete the
* process.
*
* On failure it will return false for the caller to display an appropriate
* error message (probably saying that Integrated Windows Auth isn't enabled!)
*
* NOTE that this code will execute under the OS user credentials,
* so we MUST avoid dealing with files -- such as session files.
* (The caller should set $nomoodlecookie before including config.php)
*
*/
function ntlmsso_magic($sesskey) {
if (isset($_SERVER['REMOTE_USER']) && !empty($_SERVER['REMOTE_USER'])) {
$username = $_SERVER['REMOTE_USER'];
$username = substr(strrchr($username, '\\'), 1); //strip domain info
$username = moodle_strtolower($username); //compatibility hack
set_cache_flag('auth/ldap/ntlmsess', $sesskey, $username, AUTH_NTLMTIMEOUT);
return true;
}
return false;
}
/**
* Find the session set by ntlmsso_magic(), validate it and
* call authenticate_user_login() to authenticate the user through
* the auth machinery.
*
* It is complemented by a similar check in user_login().
*
* If it succeeds, it never returns.
*
*/
function ntlmsso_finish() {
global $CFG, $USER, $SESSION;
$key = sesskey();
$cf = get_cache_flags('auth/ldap/ntlmsess');
if (!isset($cf[$key]) || $cf[$key] === '') {
return false;
}
$username = $cf[$key];
// Here we want to trigger the whole authentication machinery
// to make sure no step is bypassed...
$user = authenticate_user_login($username, $key);
if ($user) {
add_to_log(SITEID, 'user', 'login', "view.php?id=$USER->id&course=".SITEID,
$user->id, 0, $user->id);
$USER = complete_user_login($user);
// Cleanup the key to prevent reuse...
// and to allow re-logins with normal credentials
unset_cache_flag('auth/ldap/ntlmsess', $key);
/// Redirection
if (user_not_fully_set_up($USER)) {
$urltogo = $CFG->wwwroot.'/user/edit.php';
// We don't delete $SESSION->wantsurl yet, so we get there later
} else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
$urltogo = $SESSION->wantsurl; /// Because it's an address in this site
unset($SESSION->wantsurl);
} else {
// no wantsurl stored or external - go to homepage
$urltogo = $CFG->wwwroot.'/';
unset($SESSION->wantsurl);
}
redirect($urltogo);
}
// Should never reach here.
return false;
}
/**
* Sync roles for this user
*
@@ -1795,13 +1991,17 @@ class auth_plugin_ldap extends auth_plugin_base {
if (!isset($config->forcechangepassword))
{$config->forcechangepassword = 0; }
if (!isset($config->stdchangepassword))
{$config->forcechangepassword = 0; }
{$config->stdchangepassword = 0; }
if (!isset($config->passtype))
{$config->passtype = 'plaintext'; }
if (!isset($config->changepasswordurl))
{$config->changepasswordurl = ''; }
if (!isset($config->removeuser))
{$config->removeuser = 0; }
if (!isset($config->ntlmsso_enabled))
{$config->ntlmsso_enabled = 0; }
if (!isset($config->ntlmsso_subnet))
{$config->ntlmsso_subnet = ''; }
// save settings
set_config('host_url', $config->host_url, 'auth/ldap');
@@ -1816,7 +2016,7 @@ class auth_plugin_ldap extends auth_plugin_base {
set_config('bind_dn', $config->bind_dn, 'auth/ldap');
set_config('bind_pw', $config->bind_pw, 'auth/ldap');
set_config('version', $config->version, 'auth/ldap');
set_config('objectclass', $config->objectclass, 'auth/ldap');
set_config('objectclass', trim($config->objectclass), 'auth/ldap');
set_config('memberattribute', $config->memberattribute, 'auth/ldap');
set_config('memberattribute_isdn', $config->memberattribute_isdn, 'auth/ldap');
set_config('creators', $config->creators, 'auth/ldap');
@@ -1832,6 +2032,8 @@ class auth_plugin_ldap extends auth_plugin_base {
set_config('passtype', $config->passtype, 'auth/ldap');
set_config('changepasswordurl', $config->changepasswordurl, 'auth/ldap');
set_config('removeuser', $config->removeuser, 'auth/ldap');
set_config('ntlmsso_enabled', (int)$config->ntlmsso_enabled, 'auth/ldap');
set_config('ntlmsso_subnet', $config->ntlmsso_subnet, 'auth/ldap');
return true;
}
@@ -1883,7 +2085,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// If UF_DONT_EXPIRE_PASSWD flag is set in user's
// userAccountControl attribute, the password doesn't expire.
$sr = ldap_read($ldapconn, $user_dn, 'objectclass=*',
$sr = ldap_read($ldapconn, $user_dn, '(objectClass=*)',
array('userAccountControl'));
if (!$sr) {
error_log("ldap: error getting userAccountControl for $user_dn");
@@ -1929,7 +2131,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// details below).
// ----------------------------------------------------------------
$sr = ldap_read($ldapconn, ROOTDSE, 'objectclass=*',
$sr = ldap_read($ldapconn, ROOTDSE, '(objectClass=*)',
array('defaultNamingContext'));
if (!$sr) {
error_log("ldap: error querying rootDSE for Active Directory");
@@ -1939,7 +2141,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$info = $this->ldap_get_entries($ldapconn, $sr);
$domaindn = $info[0]['defaultNamingContext'][0];
$sr = ldap_read ($ldapconn, $domaindn, 'objectclass=*',
$sr = ldap_read ($ldapconn, $domaindn, '(objectClass=*)',
array('maxPwdAge'));
$info = $this->ldap_get_entries($ldapconn, $sr);
$maxpwdage = $info[0]['maxPwdAge'][0];

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