Compare commits

...

3240 Commits

Author SHA1 Message Date
moodler d3b57e5566 Bumping to Moodle 1.8.1 finally 2007-06-11 03:38:05 +00:00
skodak c70adc397a MDL-9696 used absolute path include in mod_forms; backported from HEAD 2007-06-10 23:28:44 +00:00
skodak a46a937d3e MDL-10057 XSS risk flag for Add/update course category; backported from HEAD 2007-06-10 19:36:49 +00:00
skodak c48083bc2d MDL-10068 "Lost Password" button does not work for ldap auth; backported from HEAD 2007-06-10 19:28:02 +00:00
skodak 9d0466e2a6 MDL-10074 User profile edition uses wrong variable for the (fatal) error message.; patch by Iñaki Arenaza; backported from HEAD 2007-06-10 19:08:27 +00:00
skodak 938122d7d2 MDL-10061 LDAP user creation broken for Novell eDirectory since 1.8; patch by Iñaki Arenaza; backported from HEAD 2007-06-09 15:34:21 +00:00
moodler 95f1ffc594 Added two recent installer langs to CVS 2007-06-09 08:24:52 +00:00
moodler 271013af0f file installer.php was added on branch MOODLE_18_STABLE on 2007-06-09 08:24:52 +0000 2007-06-09 08:22:45 +00:00
moodler 9bfb07349b Automatic installer.php lang files by installer_builder (20070609) 2007-06-09 04:50:32 +00:00
sam_marshall c6982f0c26 MDL-7541 Fixed wiki html diff 2007-06-08 13:44:02 +00:00
martinlanghoff 0989530df9 moodlelib:moodle_request_shutdown() - only call apache_child_terminate if child_terminate is true - MDL-9350
Apparently there _is_ a PHP ini setting controlling
it -- defaults to off.
2007-06-07 21:21:49 +00:00
tjhunt e32f1a5b98 OU Bug 3246 - No logs shown when a group is selected. Merged from OU Moodle. 2007-06-07 16:03:56 +00:00
tjhunt e23ec822d1 Fix logging of course settings updates. 2007-06-07 15:40:14 +00:00
tjhunt cbc29c7237 Make code slightly more robust. 2007-06-07 15:34:12 +00:00
moodler 3098552240 Teacher forums are now displayed to admins correctly MDL-9590 2007-06-07 02:44:58 +00:00
bobopinna 92addc1b42 Removed a white space in simple_play redirect function 2007-06-06 22:16:38 +00:00
bobopinna 2dc95960f4 MDL-9206 Readded unlimited attempts option (sorry I miss it) 2007-06-06 21:30:19 +00:00
bobopinna 146b674a33 MDL-9562 Fixed 2007-06-06 21:06:52 +00:00
moodler f7cc90e58c Fix for MDL-9557 and MDL-9007 (increased timeout when deleting files) 2007-06-06 09:16:21 +00:00
tjhunt a41779208c Eliminate trailing whitespace. 2007-06-05 14:56:16 +00:00
poltawski c9b9c609ba MDL-8080 Grade exceptions broken for teacher by invalid capability check. Thanks to Paul Ortman for the patch. Merged from MOODLE_17_STABLE 2007-06-04 22:57:13 +00:00
poltawski 9b602f0d3d MDL-10001 - Change the ordering of height and width parameters in the interface to reflect
previous ordering.
2007-06-04 22:23:01 +00:00
poltawski f4b35f935c MDL-9987 - Reffering to wrong capability name, thanks to seberin Terrier 2007-06-04 21:59:12 +00:00
skodak 667e06ed11 MDL-10018 Discussion for all groups not sent when groups used to users without access to all groups; backported from HEAD 2007-06-04 21:46:12 +00:00
moodler 0628867164 Fixing typos as per MDL-10013 2007-06-04 12:41:38 +00:00
skodak 39954f4087 MDL-10011 cleanup xhtml and code in report.php - forum, glossary and data mod; backported from HEAD 2007-06-03 16:18:53 +00:00
tjhunt fdd3ed4939 MDL-10006 - Sorting the quiz overview report on feedback breaks it. 2007-06-03 07:26:39 +00:00
skodak 951fd7910a MDL-10010 improved data validation in glossary rate.php; backported from HEAD 2007-06-02 15:58:01 +00:00
skodak b6c96ce21d minor xhtml strict fix and coding style; backport from HEAD 2007-06-02 14:09:42 +00:00
skodak ed0d8418ae MDL-10009 ratings settings do not work in glossary; backport from HEAD 2007-06-02 14:06:59 +00:00
nfreear 2e83e24b6d MDL-9660 - Fixed groups matches functions and added unit tests for them. Merged to 1.8 branch. 2007-06-01 14:21:57 +00:00
tjhunt 87f156a9da Remove invalid unit test. 2007-06-01 13:52:41 +00:00
tjhunt a2aa951267 Remove debug code. 2007-06-01 13:34:00 +00:00
tjhunt 21fa5360fc MDL-9996 - Multiple choice answer box too small in the question editing form in Moodle 1.8. 2007-06-01 09:14:44 +00:00
thepurpleblob f3d264801f MDL-9265:
'correctanswer' field missing for true/false.
2007-06-01 08:12:20 +00:00
thepurpleblob 5a0558be90 Fixed typo stopping image importing working 2007-05-31 08:31:09 +00:00
skodak 0f8a2e49ce MDL-4687 Password expiration support for AD (with patch) - patch by Iñaki Arenaza, thanks! backported from HEAD 2007-05-30 08:55:52 +00:00
skodak c36701675e MDL-9954 LDAP auth settings form problem with 'Member Attribute' and 'Member Attribute uses dn'; patch by Iñaki Arenaza - thanks! backported from HEAD 2007-05-30 08:50:00 +00:00
wildgirl f87414c0bb typo fix MDL-9767 2007-05-29 17:47:25 +00:00
dwoolhead 92b7f24d0d MDL-9729 Ensure start of week day calculation observes user timezone setting in the same way as month start and end dates. Prevents incorrect display of dates (1 out) on main Moodle calendar display although mini calendar display is correct. 2007-05-29 09:38:24 +00:00
mark-nielsen e8cd2b38cc Merging changes for MDL-9947 from MOODLE_17_STABLE 2007-05-28 18:50:58 +00:00
mark-nielsen b42cae480f Fixed MDL-9923, modified form to accept URLs
Media file was busted for framesets, fixed now
2007-05-28 18:48:52 +00:00
jamiesensei 58c70cace9 MDL-9745 "Checkboxes badly lined up in forms lib, e.g. "students may review" settings on quiz settings screen." Reverted previous fix for similar problem MDL-7779 as the fix for MDL-7779 causes worse problem MDL-9745 with form elements in groups. 2007-05-28 12:19:48 +00:00
jamiesensei aa38cccbdf MDL-9734 fix for clean_param PARAM_LOCALURL bug 2007-05-27 11:20:24 +00:00
moodler c417f26c85 Automatic installer.php lang files by installer_builder (20070527) 2007-05-27 04:36:10 +00:00
moodler f676fab333 Automatic installer.php lang files by installer_builder (20070526) 2007-05-26 04:11:43 +00:00
moodler 286914ebf9 Fix for footers on MDL-9826 2007-05-25 21:03:20 +00:00
moodler 8a12b18716 Automatic installer.php lang files by installer_builder (20070525) 2007-05-25 04:36:16 +00:00
sam_marshall 6ffa6bf848 MDL-9920 Allowed xmldb to create 32-bit serial fields if specified, in postgres 2007-05-24 15:18:26 +00:00
sam_marshall 36be12128c MDL-9932 Fixed calendar restore of events on same day with same description (but different names) 2007-05-24 12:09:43 +00:00
mark-nielsen 16ba21692e Fixed MDL-9619
Fixed MDL-9366
Fixed MDL-9757
Converted tabs to spaces
Cleaned up white space
2007-05-23 17:34:03 +00:00
nfreear a335226982 Follow up fix for bug MDL-9890 - replacing nicolasconnault's fixes that I overwrote - sorry! 2007-05-23 14:43:00 +00:00
thepurpleblob eb813e917e Added some set_time_limit()s to import in case of slow servers timing out. 2007-05-23 14:06:04 +00:00
nfreear 7c527b3b9d Big fix for MDL-9890 "Help should be well-formed, XHTML Strict and semantic". Merged from head. 2007-05-23 13:36:29 +00:00
thepurpleblob f9d81b4e36 Progress with making the code a bit more resilient.
Added XML tidy up if tidy extension is available.
2007-05-23 12:49:36 +00:00
nfreear 6f7cb89d17 Big fix for MDL-9890 "Help should be well-formed, XHTML Strict and semantic". Merged from head. 2007-05-23 12:08:19 +00:00
tjhunt 19ac11bd63 XHTML strict. Fix entity. 2007-05-23 10:52:00 +00:00
tjhunt be61c13c00 MDL-9914 - Can't download mark details from the quiz overview report 2007-05-23 10:21:02 +00:00
tjhunt 5f7519cd0f MDL-9881 - Attempting to delete large number of questions fails due to long URL 2007-05-22 14:03:36 +00:00
tjhunt 46b515a48c When using DEBUG_DEVELOPER, make error(...) output a stack trace. 2007-05-22 13:25:06 +00:00
tjhunt 6f304b3251 Switch a form from post to get, since that is more appropriate. 2007-05-22 13:24:47 +00:00
nfreear 3aa003edc4 Follow up for MDL-9753, accepts HTML for $text param (THEME->larrow, rarrow don't work in stock IE6). Merged 2007-05-22 09:02:39 +00:00
moodler 59cbc3ac9d Automatic installer.php lang files by installer_builder (20070522) 2007-05-22 05:25:23 +00:00
gbateson b72135d360 use PARAM_ALPHANUM on "section" parameter so that "section=all" is allowed 2007-05-22 04:27:55 +00:00
pichetp 844aed0573 adding or deleting more than 1 dataitems in one step in datasetitems_form.php 2007-05-22 02:29:33 +00:00
skodak e882741ec2 MDL-9861 Password expiration value is calculated wrong when ldap_expirationtime2unix() returns 0 - patch by Iñaki Arenaza 2007-05-21 20:07:25 +00:00
skodak 8dd34ce9bc MDL-9860 Incorrect check for password expiration at login - patch by Iñaki Arenaza 2007-05-21 19:58:50 +00:00
moodler a6989f9cbd Fix for manual unread/read marking MDL-9859 2007-05-21 14:41:21 +00:00
moodler dda9800184 Fix typo: MDL-9875 2007-05-21 13:32:39 +00:00
thepurpleblob d03d9d7a5a Turns out that the question text is not a required field.
Also fixed warning in essay questions.
2007-05-21 13:09:47 +00:00
moodler fb3557d4d9 Committed Iñaki's patch for 1.8 from MDL-7233 unchanged. Thanks! 2007-05-21 05:25:04 +00:00
moodler f895a66e50 Automatic installer.php lang files by installer_builder (20070521) 2007-05-21 04:53:33 +00:00
pichetp ff04b09e91 correcting display of datasetitems_form for multiple answers 2007-05-20 12:45:11 +00:00
moodler d10e19dca1 Automatic installer.php lang files by installer_builder (20070519) 2007-05-19 04:46:18 +00:00
pichetp 3449775fb9 correcting datasets to $datasets line 248 2007-05-18 12:53:43 +00:00
jmg324 3ba9c859b6 MDL-9802 added my:manageblocks capability so admins can define whether users can add/remove blocks from myMoodle page 2007-05-18 12:47:19 +00:00
skodak 54617ab56b MDL-984adding forgottent rs_close() - thanks Eloy! 2007-05-18 09:50:58 +00:00
skodak 77b81a215d MDL-9842 Groups from groupings not moved to "Not in a grouping" 2007-05-18 09:16:45 +00:00
thepurpleblob 722c4a9109 Check the files exist, and display ticks if they do, crosses if not. 2007-05-17 17:42:35 +00:00
martinlanghoff c54f92b59c get_my_courses() if the parameters passed are identical to the defaults... MDL-7416
We are using the defaults then ;-)

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

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

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

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

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

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

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

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


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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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


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

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

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

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

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

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

Merged from MOODLE_17_STABLE
2007-02-14 23:51:54 +00:00
skodak d8f605d675 MDL-8268 fixed block get_string, patch by Mark Nielsen; backported from HEAD 2007-02-14 23:01:28 +00:00
skodak b3cac2f0e8 MDL-8268 cleanup in get_user_capability_course(); backported from HEAD 2007-02-14 22:54:03 +00:00
skodak 930eaf9ec8 MDL-8268 fixed get_user_capability_course(), patch by Mark Nielsen; backported from HEAD 2007-02-14 22:49:40 +00:00
skodak b3bef28cc0 notice_yesno() buttons now centered; merged from HEAD 2007-02-14 22:13:14 +00:00
skodak 444014a57e MDL-8520 resource navigation borked by accessibility frame changes; backported from HEAD 2007-02-14 22:07:02 +00:00
skodak 982a81c41f MDL-8519 teamspeak link support in resource mod; backported from HEAD 2007-02-14 21:32:59 +00:00
skodak fd9e9c6404 MDL-8518 incorrect link to frontpage settings from course summary block; backported from HEAD 2007-02-14 21:04:54 +00:00
skodak e8e6e54b7d MDL-8469 - 192M is much nicer than 196M; backported from HEAD 2007-02-14 20:59:14 +00:00
skodak 67faedb211 MDL-8469 increase memory limit everywhere due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate; backported from HEAD 2007-02-14 20:54:27 +00:00
skodak 4eefee9779 MDL-8469 increase memory limit everywhere due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate 2007-02-14 20:46:38 +00:00
thepurpleblob 0b906e7847 MDL-8443
Fixed Typo.
2007-02-14 15:31:07 +00:00
moodler 522737665c Fixed page path (docs and css) for module editing MDL-8452 2007-02-14 14:08:50 +00:00
skodak 20c63dcf73 MDL-8487 if user language do not exist during restore use site default 2007-02-14 09:54:08 +00:00
moodler c1250d546c Bump release to 1.9 dev 2007-02-14 08:38:47 +00:00
moodler 403563c3cc Bumping to 2/14 for the branch date 2007-02-14 08:31:07 +00:00
skodak 2b91b669de MDL-7903 Guests can not enter course that allows guests with key reopened:
* fixed load_guset_role that did not work in course context
* fixed typos in get_child_contexts
* manual guest enrolment changes
2007-02-14 08:03:40 +00:00
vyshane 40bdeceff8 Merged from 1.7. 2007-02-14 07:22:09 +00:00
toyomoyo 6463b3dea7 adding a div to help with css 2007-02-14 05:45:36 +00:00
toyomoyo 35d0244a37 taking out deprecated width in print_courses and print_course 2007-02-14 04:56:26 +00:00
moodler c68e578b3a FIxed CSS for courseboxes on course-index 2007-02-14 04:24:43 +00:00
moodler 2cae9a4f11 Added a 'courseboxes' div around the course boxes on the course listing to help some CSS 2007-02-14 04:22:24 +00:00
moodler a02fae1e95 Automatic installer.php lang files by installer_builder (20070214) 2007-02-14 03:44:47 +00:00
vyshane aa91a2f22c Merged from 1.7. 2007-02-14 02:57:37 +00:00
vyshane 0985b11b80 Merged from 1.7. 2007-02-14 01:58:54 +00:00
stronk7 10fce0a858 Some minor js problems. MDL-7811 and MDL-6481
Merged from MOODLE_17_STABLE
2007-02-13 23:42:27 +00:00
skodak 1bd8630874 MDL-8460 Notice in resource/type/text class revisited 2007-02-13 19:53:09 +00:00
skodak 3a914645ac MDL-8460 Notice in resource/type/text class 2007-02-13 19:50:46 +00:00
skodak 5fe904adc2 MDL-8490 Glossary student not being able to edit entries 2007-02-13 19:25:04 +00:00
nfreear c4792df0bf Fix for MDL-8507 "Local language pack-name can appear in language code" 2007-02-13 13:38:53 +00:00
nfreear a5ca0d57d8 Fixes bug MDL-7257, "stylesheet bug: text color undefined" 2007-02-13 12:08:43 +00:00
skodak 98be6ed825 MDL-8502 Fix assignment cron to use new course setup 2007-02-13 08:54:06 +00:00
skodak dbbb712ed3 MDL-8498 Assignment - Notification of feedback e-mails to students not being sent; merged from MOODLE_17_STABLE 2007-02-13 08:43:17 +00:00
moodler 42044d0971 Fixes so that no-one can "login as" users with "doanything" MDL-8411 2007-02-13 08:31:10 +00:00
vyshane b304e7f770 Merged from 1.7. 2007-02-13 05:25:45 +00:00
toyomoyo 797c881a01 limit the number of courses to 20 on mymoodle page 2007-02-13 04:09:11 +00:00
moodler 66c6220607 Automatic installer.php lang files by installer_builder (20070213) 2007-02-13 03:45:55 +00:00
moodler f855cdad60 Old fix for site names with apostrophes in them 2007-02-13 03:16:22 +00:00
toyomoyo e51917eb12 fix for MDL-8480 external db user lang sync problem 2007-02-13 03:08:27 +00:00
vyshane 6155150c02 Merged from 1.7. 2007-02-13 02:28:26 +00:00
toyomoyo 86d345d5cd removing undefined variable 2007-02-13 01:54:25 +00:00
ethem e9fc2634a7 Some XHTML fixes 2007-02-12 16:53:09 +00:00
moodler ab036ed9ca Feature from Eloy to set the language to whatever the browser suggests (if the user is not logged in) 2007-02-12 14:58:44 +00:00
toyomoyo afe35ec483 merged fix for MDL-8358, wrong count for not graded assignments 2007-02-12 06:50:32 +00:00
vyshane 604c634179 Reverted require_js() in lib/ajax/ajaxlib.php. Last changes broke backwards compatibility with the way the function worked in Moodle 1.7.
Small change in lib/weblib.php to allow require_js() to be used from themes. To use it, just call the function from themedir/meta.php.
2007-02-12 06:01:49 +00:00
moodler e45ae32a67 Automatic installer.php lang files by installer_builder (20070212) 2007-02-12 03:46:00 +00:00
urs_hunkler 54f404fbef 'removed old block width definitions' 2007-02-11 10:41:42 +00:00
mudrd8mz 2f40b60145 _local language packs take precedence with both forced language and non-forced language settings.
Fixes reopened MDL-8089.
2007-02-10 21:54:19 +00:00
stronk7 c327e15031 This was throwing duplicate declaration errors in my PHP5 box
since some hours ago. Not sure why it worked before, but...
2007-02-09 20:51:56 +00:00
nfreear 82fee14ae8 Fixes for MDL-8048 groups/AJAX - todo with group/member display-names, sorting etc. (see patch in tracker). 2007-02-09 16:04:50 +00:00
urs_hunkler c630701958 'add a second parameter to enable YUI loading from header.html in the themes - MDL-8374' 2007-02-09 13:25:48 +00:00
toyomoyo 537ea84763 MDL-8290, fix for broken plugins 2007-02-09 07:47:14 +00:00
vyshane 74a344bf3b Merged from 1.7. 2007-02-09 05:16:43 +00:00
vyshane cdfa3035b7 Merged from 1.7. 2007-02-09 02:24:59 +00:00
vyshane 6527b5c2e9 Merged from 1.7. 2007-02-09 01:33:24 +00:00
toyomoyo 20e0a8021d fix for MDL-8399, unable to unassign self as admin in courses 2007-02-09 01:04:02 +00:00
toyomoyo 43c6650b35 fixing a typo 2007-02-09 00:34:49 +00:00
stronk7 bb33fb6dd7 Limit table comments to 60cc for MySQL. MDL-7765
Merged from MOODLE_17_STABLE
2007-02-09 00:34:30 +00:00
stronk7 d148c0ed5c Delete backup records on course delete. MDL-8314
Merged from MOODLE_17_STABLE
2007-02-09 00:13:18 +00:00
moodler c29b897b23 Fixed a notice during multilang upgrade when prefix was null 2007-02-08 14:52:03 +00:00
thepurpleblob 36011ea1d2 Latest, greatest version of Markdown processor. 2007-02-08 11:23:25 +00:00
thepurpleblob a5be656bc6 MDL-8461
Looked like a typo, wrong parameter being sent to format_text so formatting was
ignored.
2007-02-08 11:19:55 +00:00
vyshane 2327b9df74 Merged from 1.7. 2007-02-08 08:06:08 +00:00
vyshane 24af22cc20 Removed comment that no longer applies 2007-02-08 07:58:35 +00:00
toyomoyo 007456de61 MDL-8425, fixing xhtml strict issues 2007-02-08 07:12:53 +00:00
vyshane 01d4866181 Updated YUI library to 0.12.2 2007-02-08 05:19:36 +00:00
toyomoyo 038bf62143 MDL-8425 related fixes 2007-02-08 03:04:41 +00:00
toyomoyo d5271d3d01 taking out undefined editing variable 2007-02-08 01:11:05 +00:00
donal72 e6976ae1f6 MNet: More error tracking updates 2007-02-07 14:11:22 +00:00
thepurpleblob dacc89ea1d MDL-8347 I couldn't see anything wrong, so I have bodged it I suppose by changing the table layout slightly. This seems to be a problem reported around the net, but nobody has a definite solution. 2007-02-07 13:01:39 +00:00
donal72 d452439a08 MNet: Standardise format of the mnet_client->error array 2007-02-07 12:43:08 +00:00
nfreear df03328863 Fixes bug MDL-8454, "students can't post to forums" 2007-02-07 12:14:11 +00:00
thepurpleblob c37385bb5e Whoops..... lots of clashes due to XHTML improvements in 1.8. Should be sorted. 2007-02-07 12:10:56 +00:00
thepurpleblob 57359d2383 MDL-8349 Some of the overidden methods had got out of sync with parent class. 2007-02-07 11:36:20 +00:00
thepurpleblob f1abd39fe5 MDL-8450 Added support for including question categories in a quiz export. Also a bit of format tidy up and fix a misshandled sesskey. 2007-02-07 10:29:53 +00:00
thepurpleblob c09f474dd0 MDL-8450 Added support for including question categories in a quiz export. 2007-02-07 10:14:22 +00:00
thepurpleblob b942d94348 MDL-8450 Added support for including question categories in a quiz export. 2007-02-07 10:02:31 +00:00
urs_hunkler ec3938f3d1 'added check if right column is empty - needed for round corners' 2007-02-07 08:22:20 +00:00
urs_hunkler ce821fdab7 'added round corner code' 2007-02-07 08:11:31 +00:00
urs_hunkler 1d41dcd081 'extended class nocoursepage to all admin pages' 2007-02-07 08:10:54 +00:00
toyomoyo 60a9a6ea67 fix for some of the MDL-8425 issues 2007-02-07 07:34:53 +00:00
vyshane 211480c3db Merged from 1.7. 2007-02-07 07:09:31 +00:00
moodler 46bec16d35 Automatic installer.php lang files by installer_builder (20070207) 2007-02-07 03:29:07 +00:00
urs_hunkler e5afdd2710 'added felxible columns and round corner code' 2007-02-06 22:23:08 +00:00
urs_hunkler dd9098cc8b 'added felxible columns and round corner code' 2007-02-06 21:31:04 +00:00
urs_hunkler 012beafb2a 'deleted uh comments' 2007-02-06 20:44:16 +00:00
urs_hunkler d2bb4f71d2 'deleted old block width definition' 2007-02-06 20:33:28 +00:00
urs_hunkler 689456eb15 'deleted old block width definition' 2007-02-06 20:18:45 +00:00
stronk7 796903809e Fixed two schema-fk typos. MDL-8427
Merged from MOODLE_17_STABLE
2007-02-06 15:52:20 +00:00
nfreear 5bca3fed8f Fixes bug MDL-8434, "group administration - can't delete groups". 2007-02-06 15:34:09 +00:00
toyomoyo fbe31d22d1 xhtml validation fixes for MDL-8425 2007-02-06 08:24:37 +00:00
ethem 9c2498d381 Moved validation functions to enrol_authorize_form class. 2007-02-05 14:09:02 +00:00
ethem c7aaa3cbdb Moved validation functions to enrol_authorize_form class. 2007-02-05 14:05:19 +00:00
ethem 2542dea98f Pass custom data "$course" to enrol_authorize_form class. 2007-02-05 13:51:27 +00:00
ethem 1f7d43cfc4 Put back skodak's last commit. global $COURSE is $SITE and enrols to site. 2007-02-05 10:07:38 +00:00
moodler 1e0fb1054c Resolved duplicate id issue MDL-8410 2007-02-05 07:58:29 +00:00
moodler 378ef1fe98 Cleaned up HTML, quotes and styles for the neglected category editing screen MDL-8145 2007-02-05 07:27:07 +00:00
moodler 87fa8a1791 Fixed apostrophe problem in MDL-8416 2007-02-05 06:52:42 +00:00
moodler 78ca9b00bf updated tags 2007-02-05 06:11:06 +00:00
stronk7 8dadea8837 Fixing one little-little bug about user->ajax being nullable. MDL-8421 2007-02-04 20:48:34 +00:00
stronk7 b7a0ea8781 Fixing one little-little bug about user->ajax being nullable. MDL-8421
Merged from MOODLE_17_STABLE
2007-02-04 20:11:32 +00:00
urs_hunkler 56595370a3 'MDL-8418 - I added and changed some classes to center the table and use more standrad cell classes.' 2007-02-04 20:11:05 +00:00
moodler 5479b98dff Fixed alignment of logs MDL-8418 2007-02-04 11:57:18 +00:00
stronk7 64e396939c Adjusting Wood theme for 1.8 2007-02-03 19:39:09 +00:00
mudrd8mz dd43d37152 lang.php now keeps orphaned transaltions, i.e. string without English reference. Fixes MDL-8409. 2007-02-03 12:23:53 +00:00
gbateson 980f8d92be allow empty JQuiz questions (which have at least one answer) 2007-02-03 01:12:30 +00:00
gbateson 9d45b55ad0 omit empty answers from JQuiz import 2007-02-03 00:36:18 +00:00
crbusch fc9f2d26b9 Added scripts 2007-02-02 18:38:05 +00:00
moodler c158eac4c3 Merged some changes from stable 1.7 2007-02-02 15:03:40 +00:00
moodler 3577daa4f2 Merged some unmerged changes from 1.7 (urs! ;-) 2007-02-02 14:57:10 +00:00
moodler f1a20f1efe Merged some outstanding css from 1.7 2007-02-02 14:44:27 +00:00
mudrd8mz 5764893508 Produces better HTML/CSS output to fit into translators' screen.
There are only two columns in the translation table form now. Odd and even
rows' background alters.
See MDL-8334 and http://moodle.org/mod/forum/discuss.php?d=62800 for more info about this.
2007-02-02 14:42:15 +00:00
skodak d4ec5b1e8c MDL-8334 CSS code needed for lang.php changes - patch by David ;-) 2007-02-02 14:35:30 +00:00
skodak eebb96e5da MDL-8392 Permanent Message "Chameleon is loading..." 2007-02-02 14:06:04 +00:00
moodler 1934b87667 Updated versions and requires (primarily because of formslib dependencies) 2007-02-02 13:02:24 +00:00
sam_marshall 24c66531b3 MDL-8216 Smartpix support (under 'experimental') for searching images in theme, parent theme, etc 2007-02-02 12:19:58 +00:00
moodler ec45c67924 FIxed some colors 2007-02-02 08:38:44 +00:00
moodler 06f8943cb3 Some changes to make this theme sort of work, but it still needs a lot of love <3 2007-02-02 08:29:45 +00:00
vyshane b2ee058fac Merged from 1.7. 2007-02-02 08:14:55 +00:00
vyshane 02cb4f393d Merged from 1.7. 2007-02-02 07:56:45 +00:00
moodler 986f093fef Fixing some alignment of categry boxes on front page 2007-02-02 07:39:40 +00:00
moodler 8cef951707 Fixed badly specificed simple box on site topic 2007-02-02 07:29:17 +00:00
vyshane a194510a9c print_header now calls require_js() to print out html that loads JavaScript libraries. 2007-02-02 06:40:22 +00:00
vyshane ae13dbc845 Changed to make use of require_js(). 2007-02-02 06:36:34 +00:00
vyshane f47e1c1751 Changed to work with new require_js().
Related to MDL-7682 and MDL-8374.
2007-02-02 06:35:59 +00:00
vyshane f72f94a257 Reworked require_js() so that it will not load libraries more than once.
Related to MDL-7682 and MDL-8374.
2007-02-02 06:35:25 +00:00
moodler c830f3e3aa Added help title for switchrole help button MDL-8378 2007-02-02 06:21:44 +00:00
moodler 922259801b Added switchrole help file! MDL-8378 2007-02-02 06:15:39 +00:00
moodler 1910c3a347 Added a missing style sheet 2007-02-02 05:40:00 +00:00
mark-nielsen a7003df2b9 Merged in layout fix from MOODLE_17_STABLE 2007-02-02 03:58:45 +00:00
mark-nielsen 7a8137e9d7 Merged fix for MDL-8390 from MOODLE_17_STABLE branch 2007-02-02 03:45:02 +00:00
moodler 64c7dcf84d Automatic installer.php lang files by installer_builder (20070202) 2007-02-02 03:42:06 +00:00
mark-nielsen 107470cb3a Merged in fixes for MDL-8375 from MOODLE_17_STABLE 2007-02-02 02:27:03 +00:00
stronk7 9ad5c91fa9 Delete some non cros-db boolean uses from queries, delegating them to PHP. MDL-8164
Merged from MOODLE_17_STABLE
2007-02-01 23:55:05 +00:00
skodak f4d6704d9a MDL-8380 prevent deleting of roles that are used as default site roles for guest, user, notloggedin, etc... 2007-02-01 23:15:07 +00:00
stronk7 b26f94ce15 Adding missing tags in code. Credit goes to Greg Lyon. MDL-8383.
Merged from MOODLE_17_STABLE
2007-02-01 22:36:35 +00:00
skodak 6349a3ba48 MDL-8384 debugdisplay does not respect original value of display_errors 2007-02-01 21:11:50 +00:00
skodak ebce32b5dd (MDL-8367) Add configuration option to select role for guest - guestroleid 2007-02-01 10:24:26 +00:00
skodak 5841aa9122 fixed obsoleted course->category test for finding if course is site 2007-02-01 09:06:48 +00:00
moodler a2b6ee758e Merged switchroles fixes from stable 2007-02-01 08:14:08 +00:00
moodler f522d310fd Add some robustness to the tabs so we can use tabs named '0' 2007-02-01 07:02:28 +00:00
moodler 9ca8cc0847 Basic fixing of tabs for glossary 2007-02-01 06:54:15 +00:00
moodler bf8d1bb05b Automatic installer.php lang files by installer_builder (20070201) 2007-02-01 03:26:42 +00:00
skodak 9fec4e331b MDL-8376 Course list option missing in frontpageloggedin when there are more than 200 courses 2007-01-31 22:38:27 +00:00
skodak c785d40ac3 MDL-8373 Add new predefined role "Authenticated user" for all logged in users 2007-01-31 21:05:32 +00:00
stronk7 f58938b5a7 Restoring one deleted by error }. Grrr.
Merged from MOODLE_17_STABLE
2007-01-31 18:46:14 +00:00
stronk7 8a88bce5ac Changing nullability of field response on table lesson_answers to null.
Versions in 17_STABLE are the same, so no problems. MDL-8351

Merged from MOODLE_17_STABLE
2007-01-31 18:40:14 +00:00
skodak 9d17f1d331 MDL-8364 moved javascript into print_header 2007-01-30 21:41:52 +00:00
skodak 39de90acd5 MDL-8223 allow also numeric string '1' as site id in require_course_login() 2007-01-30 21:23:29 +00:00
jamiesensei 8cf2a05c4a fix for misalignment of text inputs in formslib forms in ie MDL-7748 2007-01-30 19:09:46 +00:00
jamiesensei bc9ec4a604 more clean fix to safari issue with fieldsets 2007-01-30 18:44:23 +00:00
jamiesensei f60feba579 fix for bug in Safari displaying fieldsets when the last element is textarea in which case textarea tended to overlap fieldset boundary. 2007-01-30 16:55:18 +00:00
jamiesensei a8d2a373a1 some fixes for problem reported by Pierre Pichet.
Data set items form is now the opposite way round as the original was. This means that the add item section appears at the top of the form. Also if you press return while editing fields in the add item section the item will now be added. Default action for most browsers when a submit button is pressed is to act as if the first submit button in the form had been pressed.

Removed cancel buttons second and third pages of form too as they may not work as expected.
2007-01-30 15:31:50 +00:00
thepurpleblob 3d903fcbcc MDL-8342 PHP5 migration thing causing string offset fatal error when data not present in XML file. Added some checks. 2007-01-30 15:16:47 +00:00
thepurpleblob d68f70780b Changed remark about additional formats to direct to Modules & Plugins database. 2007-01-30 14:04:59 +00:00
thepurpleblob f4a6bff311 Output was missing utf8 meta tag. 2007-01-30 13:57:45 +00:00
tjhunt a95cd8a650 Get the alt text for the question type icon in a better way. 2007-01-30 11:09:32 +00:00
skodak 01e85af9cc MDL-8343 reorganize frontpage settings in admintree - I hope fixed last installation bug 2007-01-30 10:33:09 +00:00
skodak e75ac13be2 MDL-8352 Fully separate CONTEXT_COURSE, SITEID from COURSE_SYSTEM - code cleanup 2007-01-30 10:23:01 +00:00
nfreear 3c13f52413 Follow-up fix for bug MDL-8223 "require_course_login() cleanup" 2007-01-30 10:10:39 +00:00
skodak 8ba412dab0 MDL-8352 Fully separate CONTEXT_COURSE, SITEID from COURSE_SYSTEM - now instanceid of system context is always 0 (originally it was SITEID which would cause major trouble is somebody tried to change SITEID) 2007-01-30 10:10:25 +00:00
skodak 71eee5f216 MDL-8343 reorganize frontpage settings in admintree - fixed installation bug and warnings 2007-01-30 09:33:11 +00:00
skodak 3ab00a0f6d fixed warning with undefined rcache during install 2007-01-30 09:11:19 +00:00
jamiesensei 9bf930bd07 fix related to MDL-8282 - "show advanced" button doesn't work under IE7 2007-01-30 07:45:15 +00:00
moodler a4d72543f9 There's no need to die with an error if groups_temp doesn't exist, is there? 2007-01-30 05:09:49 +00:00
vyshane 446d6e7dd0 *** empty log message *** 2007-01-30 04:55:59 +00:00
stronk7 d3fca5cba8 nothing interesting, just a comment. 2007-01-30 00:22:21 +00:00
stronk7 7cd5208507 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 23:56:55 +00:00
stronk7 931b508559 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 23:52:33 +00:00
stronk7 bcf88cbbe2 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 22:23:58 +00:00
skodak 4e43dc39f5 MDL-8352 Fully separate CONTEXT_COURSE, SITEID from COURSE_SYSTEM - undoing my previous hack for MDL-7114 2007-01-29 21:36:57 +00:00
skodak 84c8ede022 MDL-8343 reorganize frontpage settings in admintree - admin tree now allows to specify context together with required capability for each entry
MDL-8352 Fully separate CONTEXT_COURSE, SITEID from COURSE_SYSTEM - first part of cleanup related to frontpage
2007-01-29 21:29:27 +00:00
koenr 018caef02f typo MDL-8350 2007-01-29 20:36:47 +00:00
stronk7 4bf75b33b4 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 19:16:33 +00:00
nfreear 77b88375c3 Fixes bug MDL-8294 "During upgrade group IDs aren't maintained..." 2007-01-29 15:02:50 +00:00
tjhunt f07d1d3197 When editing some question types, the options get jumbled up. 2007-01-29 12:35:29 +00:00
stronk7 2c08b2514c Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 12:10:19 +00:00
stronk7 18bba1f789 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 11:29:01 +00:00
stronk7 0f5dafffe9 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 11:24:18 +00:00
stronk7 55e723af60 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 11:07:02 +00:00
stronk7 2ac48f4811 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 10:55:22 +00:00
stronk7 c024b94b02 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 10:47:25 +00:00
thompson697 7f46a94162 Restore page Role Mappings Selector Enhanced 2007-01-29 09:14:53 +00:00
vyshane 15c331b2e8 Merged from 1.7. 2007-01-29 07:58:47 +00:00
vyshane ebe82e08ec Merged from 1.7. 2007-01-29 07:36:55 +00:00
mark-nielsen ddaaceb4bb "Merged" in the fixed for MDL-8137 2007-01-29 06:43:22 +00:00
moodler 326e563a43 Prevent an rcache-related notice 2007-01-29 06:12:18 +00:00
vyshane 1466926adf Merged from 1.7. 2007-01-29 06:02:17 +00:00
moodler d14d6f7903 FIxed a style typo that made login page look odd 2007-01-29 02:45:48 +00:00
vyshane c4ca9cb3b2 Merged from 1.7. 2007-01-29 02:22:18 +00:00
stronk7 b5eb752394 First real test of the new rs_fetchXXX() functions. Applying it
to get_my_courses(). MDL-8134

Merged from MOODLE_17_STABLE
2007-01-29 00:17:25 +00:00
stronk7 1e15c0fdad Added Oracle DIRTY HACK to both rs_fetchXX functions.
Detecting of EOF in rs_fetch_record()
Big improvement of rs_fetch_next_record() by using FethRow()
with speeds near native fields[]. MDL-8134

Merged from MOODLE_17_STABLE
2007-01-28 23:15:16 +00:00
skodak bc0dc07cba MDL-8323 fixed global $COURSE in chameleon theme footer 2007-01-28 22:29:24 +00:00
donal72 fb5c773965 Auth: Documentation update to reflect changes in signature of user_update_password method 2007-01-28 22:08:59 +00:00
skodak ef72b77694 MDL-6128 special chars and messaging system 2007-01-28 21:43:39 +00:00
skodak 9152fc9938 MDL-8323 finished full conversion to proper $COURSE global - no more $CFG->coursetheme, $CFG->courselang - improved course_setup(), current_language() and current_theme(); and Chameleon theme fixes needed for global $COURSE
MDL-7962 chat seems to be completely broken in head (fixed wrong JS)
* reworked chat themes support
MDL-8338 Cron does not need cookies
MDL-8339 forum cron capabilities problems
* minor deprecated function current_encoding() cleanup
2007-01-28 21:18:08 +00:00
skodak 8d2b18a886 MDL-8337 has_capability() ignores default roles for $userid and does not detect changed $USER and other minor fixes (this is needed for global $COURSE cleanup and fixed+improved cron.php) 2007-01-28 20:52:57 +00:00
stronk7 d9e10456ba Initial commit of the new rs_XXX() functions to fetch, advance and close
ADOdb recordsets in a standard way. Not finished yet but I need them in CVS.
MDL-8134

Merged from MOODLE_17_STABLE
2007-01-28 20:14:09 +00:00
stronk7 3b34bc7f39 Now MSSQL naming of objects introspects to avoid duplicates. MDL-7376 2007-01-28 18:18:28 +00:00
urs_hunkler c15816ce95 'set sideblock left and right min/max width with values set in theme/config.php' 2007-01-28 17:11:05 +00:00
stronk7 c5e065f817 Clarify a bit getNameForObject correct usage. 2007-01-28 11:46:17 +00:00
stronk7 5a08ca80ed Oracle now introspects DB to fetch names of
sequences and triggers. MDL-6880
2007-01-28 11:42:10 +00:00
donal72 da249a3028 Auth: Fix for error creating admin user (if you choose a new username). Also addresses an issue in the user_update_password method. 2007-01-28 10:27:05 +00:00
stronk7 3e7dab97e7 And finally I've found the annoying bug that was causing Oracle to
execute strange SQL statements! Argh! Now I can go to sleep...
2007-01-28 01:07:52 +00:00
stronk7 2a82cacf0b getting tired of restore my test Oracle DB. Typo! 2007-01-28 00:30:22 +00:00
gbateson 845f45ec19 correct the display of the "Update this Hot Potatoes Quiz" button in Danish (da_utf8) and German (de_utf8) - see mdl-8322 2007-01-28 00:25:57 +00:00
stronk7 fec5fe881e Quote field names in rename in order to allow renaming of reserved words. 2007-01-28 00:20:54 +00:00
stronk7 a54d16ef2e CHAR fields NOT NULL must not have any empty default specified!
Oracle breaks with empty defaults because they are = NULL.

Leaving them as NULL, XMLDB will apply defaults for each DB properly.
2007-01-28 00:12:32 +00:00
stronk7 ad88038fdb Fixing silly (like me) typo. 2007-01-27 23:39:57 +00:00
stronk7 358b1e9359 Oracle PL/SQL blocks can end by ";". Prevent that to be trimmed. 2007-01-27 23:37:22 +00:00
skodak 1e94fe068c Editor related fixes:
MDL-7545 HTML Editor does not send http headers for character encoding;
MDL-8323 added proper require_course_login()
+ fixed javascript in coursefiles broken by XHTML strict
+ general cleanup and fixing in coursefiles (themes, javascript, obsoleted functions, etc.)
2007-01-27 23:23:44 +00:00
stronk7 6210ae1d43 Now Oracle naming of objects introspects to avoid duplicates. MDL-7376 2007-01-27 22:11:04 +00:00
skodak 083c3743d3 MDL-7977 - updated guest and loggedin detection in login block; removed obsolted $USER->loggedin (now tested with empty($USER->id) in isloggedin()) and $USER->site (replaced by session test cookie)
MDL-5429 - skip https login for guestlogins
2007-01-27 21:28:26 +00:00
urs_hunkler e331bccf75 'preferred_width changed to 210 because with lower values column width changes when block is closed by user' 2007-01-27 20:56:55 +00:00
stronk7 42b9540e01 When renaming tables, check that the new one doesn't exist. 2007-01-27 20:13:23 +00:00
stronk7 d21a42d7cf Small improvement. One less iteration pero object name requested. 2007-01-27 20:08:19 +00:00
skodak dcf6d93c9c MDL-8323 Add proper setup of course $CFG variables, fix use of global $COURSE
new function course_setup() thats does proper $CFG-> , locale and themes setup much sooner than print_header() originally (needed for MDL-8067), cleanup of forgotten global $course issues

MDL-8067 Fixed several $HTTPSREQUIRED issues - html editor now loads from https (the old hack did not wotk with IE7, new hack is uglier but works), fixed formlibs images (we can not set them in library global scope, we must wait for httpsrequired() and require_login() and od that in function), fixed links in meta.php, fixed help images

fixed setting of new $USER values in user edit forms
2007-01-27 19:56:08 +00:00
urs_hunkler cce6f1bd1a 'IE7 bug - not handling sidblocks correctly with long words. overflow and word-wrap corrects the sideblock width in most cases.' 2007-01-27 19:34:54 +00:00
skodak d3787db022 added missing $course 2007-01-27 19:14:23 +00:00
stronk7 d65980452a Updated comment. 2007-01-27 17:41:31 +00:00
stronk7 a1b2780c8e Now Postgres naming of objects introspects to avoid duplicates. MDL-7376 2007-01-27 17:37:39 +00:00
moodler d8e2ae94d8 Automatic installer.php lang files by installer_builder (20070127) 2007-01-27 03:15:10 +00:00
stronk7 f2daac4e62 Delegate to the isNameInUse() function the request to
see if one object name is in use in the DB (to avoid
duplicates 100%) MDL-7376 (the rest will come tomorrow)
2007-01-27 01:12:18 +00:00
skodak 8e1f75acfb MDL-8096 loginhttps fixes for new advancededit form 2007-01-26 21:45:50 +00:00
skodak 3cb03e47ee MDL-8096 user edit form - reintroduced httpsrequirequired() 2007-01-26 21:37:56 +00:00
stronk7 7039d93c31 Adding two helper functions and modify upgrade to
work properly under MSSQL and Oracle. MDL-8303

Merged from MOODLE_17_STABLE
2007-01-26 21:28:48 +00:00
stronk7 db21b7a28c Adding two helper functions and modify upgrade to
work properly under MSSQL and Oracle. MDL-8303

Added one simple hack to execute_sql() in order
to avoid and debug about trailing ;
2007-01-26 21:27:44 +00:00
stronk7 4218c9b21e Silly conditions produce silly results, please. :-P
(WHERE 1 is not cross-db at all)
2007-01-26 21:19:07 +00:00
skodak 186282cdaa MDL-8308 placement of load_all_capabilities() in login page 2007-01-26 21:09:21 +00:00
skodak 9e7cd813e7 MDL-8277 userid field now PARAM_CLEAN 2007-01-26 20:20:27 +00:00
skodak 9d85247dab MDL-8319 avatar image is now deleted from disk, user/pix.php redirects to default picture if user picture not present(===deleted) 2007-01-26 20:15:54 +00:00
stronk7 77b09448b3 Oracle doesn't like ; at the end of execute_sql() 2007-01-26 19:28:40 +00:00
skodak 14a6b7e197 MDL-8096 user edit form - some more refactoring and fixes 2007-01-26 18:42:47 +00:00
tjhunt 09f7fa1183 Missing serf_default on decimal points field. 2007-01-26 17:52:23 +00:00
skodak e61f870151 MDL-8096 - fixed default values 2007-01-26 17:17:21 +00:00
skodak e2cfb488be MDL-8096 - added proper trimming of usernames; site:config capability is now neede to change definition of custom profile fields 2007-01-26 16:19:34 +00:00
skodak 04f639a0f4 MDL-8096 - added proper trimming of usernames; site:config capability is now neede to change definition of custom profile fields 2007-01-26 16:19:33 +00:00
skodak a5d3b07224 MDL-8096 - some more fixes and minor refactoring in custom profile fields 2007-01-26 13:49:32 +00:00
skodak 1bf65e5880 MDL-8096 - some more fixes for custom profile fields 2007-01-26 13:33:56 +00:00
skodak 0a5c8ca42c MDL-8096 - fixed mutilang in custom category header 2007-01-26 13:13:13 +00:00
skodak bb6d3d3454 MDL-8096 - refactored and cleanedup custom profiles, user edit form fixes
TODO: fix comments and docs
2007-01-26 13:11:06 +00:00
moodler 0c2864c146 FIxed an annoying little artifact showing up on the second line of the last tab MDL-7782 2007-01-26 07:09:39 +00:00
moodler 0406113fa9 FIxed tabs for quizzes 2007-01-26 06:59:16 +00:00
moodler 5bc4ff92d9 Fixed a pass-by-reference notice 2007-01-26 06:50:34 +00:00
moodler 0f22ec3356 FIxed tabs on module edit pages 2007-01-26 06:32:53 +00:00
moodler 0b4f88a6d6 Improved documentation for print_tabs 2007-01-26 06:28:43 +00:00
moodler 65c8c79335 Some slight modifications to the css classes for one-tab lines MDL-7782 2007-01-26 06:23:53 +00:00
moodler 28b822fe5e Fixed up the tabs for roles 2007-01-26 06:18:43 +00:00
moodler c5be5d2754 Latest tags 2007-01-26 05:48:33 +00:00
mits eab4b70f30 Added some new settings to config.php based on /theme/standard change. 2007-01-26 02:16:31 +00:00
skodak 478caed8e1 MDL-8096 - fixed use of formslib in custom profile field gui 2007-01-25 19:36:47 +00:00
skodak 4332512e07 MDL-8096 - edit form session fix 2007-01-25 18:18:33 +00:00
skodak 29c7e08328 MDL-8096 - fixed set_user_preference() weirdness, you could not pass $USER->id as $otheruser parameter 2007-01-25 18:17:57 +00:00
skodak d873478322 MDL-8096 - rewritten standard edit form and other fixes; new custom profile fields still missing 2007-01-25 18:02:48 +00:00
skodak 4af06ddad0 MDL-8281 hardFreeze now removes previously defined required status and all rules 2007-01-25 17:59:46 +00:00
bobopinna 8949f8df0e Fixed external manifest problems 2007-01-25 13:49:50 +00:00
nfreear 8e452b0730 Fix for reopened bug MDL-6685, "Arrows on course roles screen are displaying as squares" 2007-01-25 11:18:39 +00:00
urs_hunkler d59eca206d some tab tweeks 2007-01-25 11:14:42 +00:00
skodak e8e0bb2d7b MDL-8096 - advanced edit now mostly works, though still some parts missing; RIP changeme user :-) 2007-01-25 11:03:33 +00:00
bobopinna 82e3457600 Fixed a bug in external package validation 2007-01-25 07:39:48 +00:00
bobopinna ab3b00e1fc Fixed some problems in package validation 2007-01-25 07:20:38 +00:00
moodler f4e5991261 Prettied up RSS pages a bit 2007-01-25 07:09:24 +00:00
moodler 5bf0415584 Fixed "can't add RSS feed" bug MDL-8180 2007-01-25 06:37:59 +00:00
ikawhero 88dda743cf Using new function to print out custom categories and fields. This shouldn't
interfere with skodaks work on splitting the user edit form.
2007-01-25 05:23:56 +00:00
ikawhero 7240a6ea65 Placed the work behind printing out the categories and fields into a
function.
2007-01-25 05:20:10 +00:00
moodler 8b74cd23f4 Added some documentation and renamed thngs for clarity 2007-01-25 04:51:37 +00:00
moodler 698a966098 Fixes to styles and new images to finalise new tabs as per MDL-7782
Looking much better!  Thanks, Urs!
2007-01-25 04:44:51 +00:00
moodler 36e8c122d5 Improved classes for new tabs MDL-7782
Improved inclusion of meta.php avoids notices for non-existent files
2007-01-25 04:43:26 +00:00
vyshane e50b0ad904 Merged from 1.7. 2007-01-25 04:37:39 +00:00
skodak 25c09fc90c MDL-8096 - fixed footer 2007-01-25 00:17:06 +00:00
skodak ad6226fba2 MDL-8096 - user edit form splitting, refactoring, cleanup and fixing - work in progress ;-)
* new editadvanced form for creating of users and editing without restrictions
* elliminated fantom changeme user
* updated links and installation process
* see TODO comments in code
2007-01-25 00:04:02 +00:00
donal72 3e008de804 Mnet: We haven't been updating the last_connect_time field. Let's do that. 2007-01-24 23:17:08 +00:00
donal72 6e783f21ec Mnet: Minor: Fix a comment 2007-01-24 23:15:24 +00:00
martinlanghoff 36e6379ef8 mnet: $CFG->mnet_dispatcher_mode - ensure we set it on install and upgrade, silence warnings - MDL-8284 2007-01-24 22:17:42 +00:00
bobopinna 3efde7e21a Added conditional rename/add for field external 2007-01-24 20:24:51 +00:00
stronk7 83c9a8a29a Modified a bit the child iterator that wasn't working under Safari.
Tested with FF and Safari. Needs test with IE.
2007-01-24 19:39:59 +00:00
stronk7 bb3172c038 Prevent rename_field() to be executed if no full specs of
the original field are provided. MDL-8296
2007-01-24 17:54:53 +00:00
stronk7 704b9031ac Add full specs for current field in rename_field() PHP
generation from the editor. Part of MDL-8296
2007-01-24 16:54:49 +00:00
bobopinna e9c0b9ecbf Changed drop and add with rename
Fixed a problem with md5hash field
2007-01-24 15:33:46 +00:00
jamiesensei 552d35c187 fixed some small typos I introduced. 2007-01-24 15:13:46 +00:00
moodler 0e4c5b5210 New IE-only css 2007-01-24 13:22:11 +00:00
moodler b717101071 New pix from Urs 2007-01-24 13:21:00 +00:00
moodler fdaacd8b70 A small bug in rename_field means that you need to specify the field in detail for it to work.
This will be fixed by Eloy later.

MDL-8237
2007-01-24 13:17:03 +00:00
bobopinna a679d64d39 renamed external to updatefreq
renamed md5_result to md5hash
2007-01-24 10:39:24 +00:00
bobopinna 6a6fd8acbc renamed field external changed it to updatefreq
renamed filed md5_result in md5hash
2007-01-24 10:32:45 +00:00
moodler 79f533c388 Added some new settings to theme config.php so that a file meta.php can be
automatically included into the HEAD section of the current theme.

Supports parent and standard files too.

I added this to support the inclusion of some IE specific CSS  :-( which needs
to be done from HTML and not CSS, (MDL-7782) but it could be used to include other things
as well, or even to run some PHP code, set various vriables etc without messing
up the theme header.html (and regardless of the theme being used).
2007-01-24 09:20:32 +00:00
csantossaenz fcdd946422 Added code to the scorm_view_display function to update the SCORM activities which have to be updated every time they are used 2007-01-24 07:27:40 +00:00
csantossaenz bfe8c2f0ae Added code to the scorm_cron function to update the SCORM activity every day when this option is selected 2007-01-24 07:26:37 +00:00
moodler eb8cc38e65 Added some docs from MDL-6798 2007-01-24 07:08:50 +00:00
vyshane 4c72307e24 Merged from 1.7 2007-01-24 05:58:59 +00:00
martinlanghoff 4c1c5d2638 mnet: auth/mnet cron() now clears out stale sessions -- how did we miss this? 2007-01-24 04:25:56 +00:00
martinlanghoff 4e04772745 mnet: fix SSO breakage if the same user was using multiple browsers 2007-01-24 04:15:50 +00:00
vyshane 77ea333014 UI now selects the relevant grouping and/or group when these are passed as GET parameters to the script.
Also fixed javascript for hiding view buttons. Was not working in IE [insert swear words here].
2007-01-24 03:03:10 +00:00
donal72 560b3acc85 Mnet: Bugfix for rev 1.10: Update user's enrolment information on jump/land 2007-01-23 23:07:29 +00:00
donal72 83b9f9d825 Mnet: Restore query to check that an outgoing RPC call is permitted by the client machine's admin 2007-01-23 22:30:43 +00:00
donal72 3a1edc56f4 Mnet: Users mnethostid now defaults to the admin user's mnethostid: MDL-8253 2007-01-23 22:03:48 +00:00
donal72 2541d297cf Auth: Typo fix: exprire -> expire MDL-8151 2007-01-23 21:35:08 +00:00
donal72 cdf2232920 Mnet: Rename field: access to accessctrl for Oracle interop: MDL-8237 2007-01-23 21:27:50 +00:00
martinlanghoff f6b9882c42 mnet: as reported by Eloy - login failures should be helpful to mnet users _only_ if mnet and auth/mnet are running 2007-01-23 20:56:59 +00:00
nfreear 6e55c60a94 Fixes incorrect group function documentation (MDL-7380) 2007-01-23 19:51:05 +00:00
nfreear 0414d79d93 Fixes bug MDL-8234, "New groups code & AS keyword" - fixed typo in last commit. 2007-01-23 19:11:40 +00:00
nfreear e5902150b5 Fixes bug MDL-8234, "New groups code & AS keyword" 2007-01-23 19:08:22 +00:00
stronk7 150b5fb0e0 $form is an object (from data_submitted). 2007-01-23 16:33:15 +00:00
stronk7 2cf089c94f Changing some more incorrect uses of get_records and count_records with '1'. MDL-8280 2007-01-23 16:21:21 +00:00
stronk7 c4b654bc3c WHERE '1' is not cross-db. MDL-8280 2007-01-23 16:09:00 +00:00
skodak 5cd2273fe1 MDL-8096 two submit buttons not needed anymore now that we have advanced settings button; two submit buttons are accessibility problem anyway 2007-01-23 10:11:12 +00:00
skodak f017ea3045 MDL-8096 fixed country selection 2007-01-23 10:04:59 +00:00
moodler 1a8b5f9568 Set some sizes on the selects for group management (make it look better) 2007-01-23 09:06:10 +00:00
moodler 3b456f6ae2 Added a summary to layout tables "layout tables" for further accessibility 2007-01-23 08:28:55 +00:00
vyshane 95bea1edfa Fixed some JS issues for IE. MDL-8183. 2007-01-23 06:20:47 +00:00
vyshane 38f169e25a Fix for MDL-6966. 2007-01-23 05:42:15 +00:00
moodler e6b9fd5147 Added styles to support recent changes to MDL-8101 2007-01-23 05:41:35 +00:00
moodler 8f36e33ec3 Fixed up styles for simple boxes see MDL-8101 2007-01-23 05:37:26 +00:00
vyshane 4a384c5bbe PEAR Services_JSON. 2007-01-23 05:19:28 +00:00
moodler d53a487d65 FIxed site identifier 2007-01-23 04:58:50 +00:00
moodler 8b4315fd33 Little fix for typo (see MDL-8061) 2007-01-23 03:39:56 +00:00
moodler dbc9b11236 Automatic installer.php lang files by installer_builder (20070123) 2007-01-23 03:20:01 +00:00
donal72 573f8b025c Mnet: Update user's enrolment information on jump/land 2007-01-23 02:38:54 +00:00
moodler 3de34ccf68 FIxed extra debugging info 2007-01-23 02:14:29 +00:00
moodler f269a562a8 Fixed a typo 2007-01-23 01:15:13 +00:00
stronk7 d46e149179 Changing some stripslashes() to stripslashes_safe() because it
was causing some real backslashes to be lost in some qtypes. MDL-8217

Merged from MOODLE_17_STABLE
2007-01-22 23:23:30 +00:00
skodak d02bc6ce69 MDL-8250 moved version include before main install to allow release info display before install 2007-01-22 22:32:00 +00:00
skodak 371a32e308 (MDL-8250) install/upgrade autopilot 2007-01-22 20:15:12 +00:00
skodak 9f741612e5 MDL-8262 fixed require_course_login and $COURSE logic 2007-01-22 18:49:42 +00:00
skodak 2463ef818f MDL-7861 fixed regression caused by one of previous commit related to print_single_button() and friends - old & handling restored, thanks Eloy for spotting the problem :-) 2007-01-22 18:23:14 +00:00
stronk7 85bb13e776 Adding FK + Unique Indexes to the groups module. MDL-8240 2007-01-22 17:50:42 +00:00
stronk7 e267037b86 Fix XMLDBEditor for groups. Wasn't being intanciated properly. 2007-01-22 17:27:04 +00:00
skodak c35e8b1c15 removed xhtml strict todo comment - already fixed 2007-01-22 16:03:34 +00:00
csantossaenz 44ded09781 Corrected a warning related to a variable which could be used with no assigned value 2007-01-22 08:48:38 +00:00
moodler 8f8de2cc87 Made is_mnet_remote_user() a bit more robust MDL-8253 2007-01-22 08:25:20 +00:00
vyshane 298481260e Fixed MDL-8183. 2007-01-22 06:57:40 +00:00
vyshane ac433d418a Fixed loader image removal. MDL-8183. 2007-01-22 06:06:08 +00:00
martinlanghoff 62d78bf508 mnet: update_enrolments() WIP 2007-01-22 05:46:40 +00:00
martinlanghoff 56eec24397 mnet: remove extra paranoid check in the mnet xmlrpc client
- Donal - this needs review. I don't think we can assume the remote
   end has the same service/method mappings we do. This will preclude
   us from using stuff we don't have installed the "server" code for
   but perhaps we do have the client code for.
2007-01-22 05:32:14 +00:00
martinlanghoff 15e4772380 mnet: send user enrolment information from SP to IDP at landing time, WIP 2007-01-22 04:41:17 +00:00
moodler 1cbf4fccc4 Whoops, forgot to set the cache :-) MDL-8149 2007-01-22 03:28:06 +00:00
moodler 8e82745aed A little bit of caching for get_my_courses, related to MDL-8149
Resetting it in load_all_capabilities() means it gets flushed everytime
role_assign() or role_unassign() is called on the current user, which should
be enough.

The cache is not reset when others assign/unassign roles, but Moodle has
always had this problem.
2007-01-22 03:24:27 +00:00
martinlanghoff caa90d5642 mnet: print_remote_host() must be xhtml strrrrikt! 2007-01-22 01:57:05 +00:00
martinlanghoff 1a5d0b7f54 debugging() - tell us who/where/when called us, like trigger_error() does 2007-01-22 01:55:09 +00:00
martinlanghoff 985d7a350d mnet: remove debugging statements 2007-01-22 01:31:15 +00:00
stronk7 79804e2805 Convert DB lang fields to 30cc. Part of MDL-7157 2007-01-21 23:49:23 +00:00
stronk7 deb12ef4cd Convert DB lang fields to 30cc. Part of MDL-7157 2007-01-21 23:37:54 +00:00
skodak afd2b29984 fixed perfdebug warning during install 2007-01-21 21:46:55 +00:00
stronk7 9fc57f4c22 Some old PG sites have user->firstname and user->lastname
defined to be 30cc. Repair them. MDL-7110
2007-01-21 19:56:05 +00:00
skodak 63f2e6ba1d MDL-8198 Modules whose names are substrings of other chosen modules are considered chosen as well 2007-01-21 10:33:28 +00:00
jamiesensei 3a298174e8 important security fix previous use of ['type'] in repeatedeloptions array would not have worked. 2007-01-21 10:32:42 +00:00
skodak 83b902fee1 minimal footer in redirect() 2007-01-21 10:30:08 +00:00
jamiesensei 658772186a some small changes 2007-01-21 09:26:33 +00:00
jamiesensei 988d1202e3 fixed focus method which was tring to focus on hidden fields. 2007-01-21 09:23:19 +00:00
jamiesensei 5054ddbb59 comment got detached from function - fixed. 2007-01-21 09:14:35 +00:00
jamiesensei f84d6a8d56 fixes to wiki form checkboxes value saving 2007-01-21 08:26:59 +00:00
stronk7 0cfdd50bdc Changing resource->alltext to medium. MDL-6872 2007-01-20 19:32:02 +00:00
stronk7 26a1b2f35b Now group->description and groups_groupings->description are NULLable
Also, some incorrect default values are out (XMLDB handles them).

MDL-7356 & MDL-8239
2007-01-20 18:59:22 +00:00
stronk7 8dc0648057 Now resource->summary is nullable. MDL-7355 2007-01-20 18:10:29 +00:00
stronk7 b5346d51a7 Generators can use ddllib.php stuff 2007-01-20 18:08:55 +00:00
stronk7 97ad23eb26 Bad news. "external" is one reserved word for mssql and we have
one in the the SCORM module.
2007-01-20 17:59:28 +00:00
skodak e10bc44045 MDL-7586 added opendocument mimetype icons, created by Pete Harlow, see http://opendocumentfellowship.org/icon/examples 2007-01-20 15:00:17 +00:00
skodak 53467aa6e9 code cleanup - added proper object and array initialization 2007-01-20 14:06:07 +00:00
skodak 2d4beaff07 cosmetic fix - added missing global $SESSION in require_logout() 2007-01-20 13:39:38 +00:00
skodak 5c6347ceeb cosmetic fix in format text FORMAT_HTML now used after text is converted to html instead of the original format - the actual function is not changed, no need to backport 2007-01-20 13:36:03 +00:00
skodak ed5dd29fc8 moved obsoleted functions from weblib.php to deprecatedlib.php 2007-01-20 13:32:15 +00:00
skodak e1968a8e11 MDL-7861 xhtml strict fix in notice() for & in referer, proper string quoting in print_single_button(), changed cleaning of submitted link; fixed warning when referer not send in print_continue(); fixed some doc comments 2007-01-20 13:00:03 +00:00
nfreear 2dee6abd1d Fixes bug MDL-8233, "Delete course action, groups typos and groupings not deleted" 2007-01-20 10:57:47 +00:00
nfreear d8aa3550bb Fixes bug MDL-8057, "Backup/restore code not considered in new groups code" 2007-01-20 09:28:26 +00:00
skodak 9467ab7ddf MDL-8161 fixed displaying of submitted values in SCORM reports 2007-01-19 21:20:00 +00:00
skodak dfc7f21941 fixed wrong disabledif conditions in resource subtypes - sorry 2007-01-19 19:50:30 +00:00
sam_marshall d6f15b5eb3 MDL-8227 - Made wiki locking only apply to group being edited! 2007-01-19 15:25:35 +00:00
thepurpleblob 3f45ebe66e MDL-8226 Move aon & aiken import format from head into contrib. No longer maintained. Use GIFT instead. 2007-01-19 14:41:35 +00:00
thepurpleblob 296fe50abb MDL-8226 Move aon import format from head into contrib. No longer maintained. Use GIFT instead. 2007-01-19 14:38:18 +00:00
thepurpleblob a8c733a97b MDL-8226 Move aiken import format from head into contrib. No longer maintained. Use GIFT instead. 2007-01-19 14:35:44 +00:00
jamiesensei 0e8d6a3e9e MDL-7780 Choose legend/header text carefully - short and non-repeated 2007-01-19 13:05:54 +00:00
sam_marshall 7f93cff60e MDL-8225 Made it not display wiki title twice in navigation, when first page has same name as title. 2007-01-19 12:48:35 +00:00
jamiesensei c0ae32d9ff made some changes to user/edit.php setAdvanced and header name changes for MDL-7780 2007-01-19 11:35:12 +00:00
jamiesensei ec3dac9876 fixes for 'Choose legend/header text carefully - short and non-repeated' MDL-7780 2007-01-19 11:10:09 +00:00
jamiesensei 642b2ab182 fixed problem with helpbuttons appearing below the label on static and frozen elements. 2007-01-19 11:06:05 +00:00
jamiesensei d4039c7262 fix for syntax error trying to call hardFreeze on element instead of form object. 2007-01-19 10:35:00 +00:00
skodak 60f9e36ee8 MDL-8223 - last global $course hacks removed 2007-01-19 10:29:03 +00:00
tjhunt 627c9eae47 Missing space. 2007-01-19 10:07:05 +00:00
tjhunt 7f60ca5ec5 correct icon path to use $CFG->pixpath. 2007-01-19 09:59:13 +00:00
skodak 39e829367a MDL-8223 - added detection of wrong course id 2007-01-19 09:54:25 +00:00
skodak 33ebaf7c6a MDL-8223
require_login issues:
* does not accept $course object as parameter - see require_course_obejct()
* always uses global $course even when courseid empty
* overrides global $course - problem it contains something else than $course object

require_course_login issues:
* does not accept courseid as parameter
* does not pass $cm to require_login when forced login to site - not a major issue because there are extra visibility checks in modules - we can remove them now ;-)
2007-01-19 09:44:26 +00:00
martinlanghoff 1fd80ad3d9 mnet: introducing print_remote_host()... and use it in print_my_courses() - add a space 2007-01-19 09:37:28 +00:00
martinlanghoff 643b67b8b8 mnet: introducing print_remote_host()... and use it in print_my_courses() 2007-01-19 09:36:40 +00:00
martinlanghoff 86dd62a724 mnet: introducing print_remote_course() and use it in print_my_moodle()
mbwa-ha-ha-ha! All your remote courses belong to us.
2007-01-19 09:23:47 +00:00
vyshane 8bfa86fd2c Added loading in progress image feedback. 2007-01-19 09:23:22 +00:00
vyshane a711916a57 Loader image 2007-01-19 09:22:33 +00:00
martinlanghoff db4b12eb70 mnet: introducing get_my_remotecourses() and get_my_remotehosts() -- use them too 2007-01-19 08:57:13 +00:00
martinlanghoff 0743661ea5 mnet: it is $USER->mnet_foreign_host_array instead of $SESSION->mnet_foreign_host_array. $SESSION is fraught with peril as it persists acros logins/logouts 2007-01-19 08:36:02 +00:00
martinlanghoff f3203630ca mnet: this stuff is only for logged in users! 2007-01-19 08:14:18 +00:00
jamiesensei 549b26b339 migrated wiki form to formslib 2007-01-19 08:10:01 +00:00
jamiesensei 7043d0a756 set default for this element to return a '0' if unchecked and '1' if checked. 2007-01-19 08:08:50 +00:00
martinlanghoff b90052f253 mnet: fix logic and html layout in block_course_list 2007-01-19 07:54:41 +00:00
martinlanghoff a819a51ad2 mnet: check that sesskey please! 2007-01-19 07:22:57 +00:00
jamiesensei cfa73a9551 answer '0' is a valid answer for a numeric question. 2007-01-19 07:21:51 +00:00
jamiesensei 845b703bb9 oops. fix to last commit about empty answers logic was wrong 2007-01-19 07:20:43 +00:00
jamiesensei b7d4df606e fix for erroneous empty answer detection when answer is '0' which is a valid answer for numeric qs. 2007-01-19 07:18:26 +00:00
martinlanghoff 5e142a172c mnet: pix for mnethost is now the tiny moodle icon ;-) 2007-01-19 07:15:12 +00:00
martinlanghoff 2d60ff6d58 mnet: hide direct link to logs for now... 2007-01-19 07:01:51 +00:00
martinlanghoff 20003335ce mnet: finish up UI for enrolment handling and hardcoded strings 2007-01-19 06:51:24 +00:00
martinlanghoff 8506af02d3 mnet: fix warning -- variable typo 2007-01-19 05:24:47 +00:00
martinlanghoff efd6ef4665 mnet: fixup remote enrolment handling pages - WIP part 2 2007-01-19 05:18:30 +00:00
vyshane 0d061d8edb Styles for group management interface 2007-01-19 05:08:56 +00:00
vyshane 3cdc1e28cd Added ajax for groups management interface. 2007-01-19 04:57:46 +00:00
martinlanghoff ccb60df832 enrol/mnet: list_remote_servers() should only list servers we use enrolment for 2007-01-19 04:26:09 +00:00
moodler 57bcde5ba5 Automatic installer.php lang files by installer_builder (20070119) 2007-01-19 03:16:14 +00:00
martinlanghoff 7db7981aae mnet: better enrollable courses listing 2007-01-19 02:51:18 +00:00
martinlanghoff e395caaa84 enrol/mnet: fixes around fetch_remote_courses() and available_courses
- ensure addslashes() affects data that goes to the database, not HTML
 - ensure we return defaultrolename from avaiable_courses
 - clear some leftover debug statements
2007-01-19 02:43:11 +00:00
donal72 0855c4cab3 Mnet: More enrolment data in the back channel - stash in mnet_enrol_assignments table 2007-01-19 00:23:55 +00:00
martinlanghoff 445379151f mnet: environment now recommends tokenizer 2007-01-18 23:01:38 +00:00
bobopinna a119ff9ce3 Fixed an error in $score initialization 2007-01-18 20:33:59 +00:00
tjhunt 901011fd4d MDL-8205 - Layout of quiz editing screen not right 2007-01-18 17:38:51 +00:00
csantossaenz 8aee93f134 Added code to allow the remote package update with a php later version than 4.2 2007-01-18 15:54:56 +00:00
tjhunt bb006c95cc Fix broken JS. 2007-01-18 12:55:46 +00:00
nfreear 5be5bc9fc8 Fixed lang string 'erroreditgroup' as per Mitsuhiro [18/Jan/07], MDL-8048 2007-01-18 12:35:28 +00:00
moodler 2ee1f30bb2 Added some lables and formatting to fix MDL-8176 Accessibility 2007-01-18 12:06:36 +00:00
csantossaenz efe95fc405 Added the field external to the mdl_scorm table 2007-01-18 12:05:14 +00:00
csantossaenz 949817a69b Added some strings related to the update of the external packages timing 2007-01-18 11:58:08 +00:00
jamiesensei 7b41a4a989 some more small changes to datasetdependent and calculated question type forms 2007-01-18 11:21:10 +00:00
jamiesensei 71534002d0 migrated 'missingtype' questoin creation forms to use formslib 2007-01-18 10:22:56 +00:00
moodler 6173f39e7b Fix for MDL-8175 (void summary) 2007-01-18 09:52:04 +00:00
moodler bdbbcf1563 Added label to language menu for accessibility MDL-8174 2007-01-18 09:45:02 +00:00
moodler 2c6e998f41 Added label to language menu for accessibility MDL-8174 2007-01-18 09:42:29 +00:00
martinlanghoff ce89882a37 mnet: fixup remote enrolment handling pages - WIP 2007-01-18 04:48:35 +00:00
martinlanghoff a298f31145 mnet: clear out debug msg 2007-01-18 04:39:41 +00:00
martinlanghoff 7580ce94ef mnet: check for the _right_ varname before warning about mnet being off 2007-01-18 03:16:55 +00:00
martinlanghoff 79b84c93fb enrol/mnet: list_remote_servers() must always return an array 2007-01-18 03:16:09 +00:00
martinlanghoff a4d967a463 mnet: try to stop trailing slashes in urls from getting through, better error msg if we dont like the SSL cert 2007-01-18 02:56:06 +00:00
martinlanghoff 8d13ed1414 mnet: clean_param() fixed a leftover debugging statement - x2 2007-01-18 02:31:42 +00:00
martinlanghoff f543c0c392 mnet: clean_param() fixed a leftover debugging statement 2007-01-18 02:22:35 +00:00
martinlanghoff 47c0407b97 mnet: moving remote enrolment config to admin/mnet 2007-01-17 23:49:04 +00:00
martinlanghoff 9b0633ac3d enrol/mnet: fix a warning, do not list the sitecourse 2007-01-17 23:12:15 +00:00
donal72 68ea70b45f Mnet: enrol/mnet: Return enrol plugin type with list of enrolled users 2007-01-17 23:03:18 +00:00
martinlanghoff 92e46c0305 mnet: better descriptions and warnings in admin pages 2007-01-17 22:23:56 +00:00
skodak 835ebe588b MDL-5690 text format in text type resource is now stored in reference field 2007-01-17 20:41:19 +00:00
skodak 7dc30088bc force login in course calendar SC#349 2007-01-17 19:53:03 +00:00
jamiesensei 60b5ecd3cf more work on the datasetdependent / calculated question creation forms 2007-01-17 18:28:51 +00:00
tjhunt 4f390427d5 Minor problem with restoring numerical questions. 2007-01-17 17:29:08 +00:00
nfreear 163fab1a96 Fixes Bug MDL-8200, "Group admin interface shows all groups sitewide!" 2007-01-17 16:13:21 +00:00
csantossaenz 456f5e6e43 Modified scorm module to allow remote packages updating 2007-01-17 15:53:06 +00:00
csantossaenz 75b4cb6456 Added a field to scorm table to store the ckecksum of a remote package 2007-01-17 15:38:40 +00:00
csantossaenz aa7a17131d added a field to store ckecksum of a remote package 2007-01-17 15:31:40 +00:00
tjhunt 7ca455cd56 The way mulit-response questoins show the right answer is a bit confusing. 2007-01-17 14:54:55 +00:00
dwoolhead f27b2c4e6d Prevent unnecessary scroll to warning message during local version installation/upgrade due to missing notification type on success 2007-01-17 14:38:56 +00:00
dwoolhead f2aa178bac Missing groups version message (noted during clean installation) added 2007-01-17 14:35:55 +00:00
nfreear 2a724620f7 Partial fix for MDL-8048, undid bug introduced last commit. 2007-01-17 14:33:29 +00:00
donal72 1451836469 Mnet: In auth config, show which hosts have mnet/auth configured 2007-01-17 14:13:19 +00:00
nfreear b1f627d9eb Partial fix for MDL-8048, groups cleanup including hiding unimplemented buttons in GUI, fixing error strings. 2007-01-17 13:56:09 +00:00
donal72 5291907c45 Mnet: Show non-mnet enrolments in the mnet/enrolment page 2007-01-17 12:12:11 +00:00
tjhunt 069a820a7e Matching question rigth/wrong answer indication is broken. 2007-01-17 10:31:36 +00:00
martinlanghoff 6480b0da92 get_config(): fix a call using the oldstyle return value 2007-01-17 06:13:09 +00:00
donal72 503d126273 Mnet: Minor oops - a variable in the last commit was not renamed 2007-01-17 03:56:31 +00:00
moodler 47151d683e Automatic installer.php lang files by installer_builder (20070117) 2007-01-17 03:14:37 +00:00
martinlanghoff fdce65dd32 mnet: restore_create_users() fixed mnethost lookup
Credit goes to Eloy for catching my error.
2007-01-17 01:00:08 +00:00
skodak d36afd6d43 MDL-8204 several installer improvements:
* dirroot can not be changed now to prevent future problems - because we rely on dirname(_FILE_) in several places already
* dirroot is now used to detect repeated installs into defferent directories in the same browser sessions
* fixed previous button
* changed library inlcudes again to fit the normal coding style
2007-01-16 23:42:26 +00:00
martinlanghoff c9fa3eee9b get_config() callers in new MNET code switched to expect a single value returned
Again, this simplifies the logic in a few places.
2007-01-16 23:27:41 +00:00
martinlanghoff 1fd471a1c1 get_config() callers switched to expect a single value returned
This simplifies the logic in the callers -- a good hint that
that we are doing the right thing.
2007-01-16 23:27:14 +00:00
martinlanghoff 9220fba598 get_config(): return a single value instead of a record when called with 2 params
get_config() was meant to return a single value when called with 2 params,
however, it never did. Change it to Do The Right Thing, and audit all callers.
2007-01-16 23:25:19 +00:00
donal72 0d0f67f353 Mnet: The tokenizer extension is now optional. MDL-8136 2007-01-16 22:53:11 +00:00
donal72 afbedfb8d8 Mnet: Bugfix: Faulty logic - if the user has no local courses, we didn't bother to check for remote courses. 2007-01-16 22:52:24 +00:00
mchurch 7c4b621a20 Fixing bug where quizzes from 1.4 will lose their answers when upgraded to later versions.
Fixes MDL-8207.
2007-01-16 22:02:07 +00:00
tjhunt ab6803a97c missed defaults_reprocessing to data_preprocessing 2007-01-16 18:01:02 +00:00
tjhunt f38ceee677 Fix multiple-choice multiple-answer grading code. Merged from MOODLE_17_STABLE. 2007-01-16 17:51:05 +00:00
stronk7 b6fd063054 Fixed typo causing mysql fail on install without prefix. MDL-8203 2007-01-16 17:41:58 +00:00
jamiesensei a7f7e52fc5 changed name of moodleform_mod method 'defaults_preprocessing' to 'data_preprocessing' in line with change of set_defaults name to set_data. 2007-01-16 15:36:33 +00:00
bobopinna 5297c819c4 modified dirname call to scorm_dirname that works also with URLs 2007-01-16 14:08:22 +00:00
bobopinna 2347a35113 added scorm 2004 sequencing/navigation support 2007-01-16 14:05:52 +00:00
bobopinna 10fd330f38 new sequencing engine 2007-01-16 14:03:15 +00:00
bobopinna 667a21664a fixed some typos. removed all tabs 2007-01-16 14:01:41 +00:00
nfreear 0e2d02b506 Fixes bug MDL-8045, "Some strings are missing on the grouping interface". 2007-01-16 13:29:44 +00:00
bobopinna 76659ac98f moved in locallib.php as a function 2007-01-16 13:23:07 +00:00
bobopinna 76ea4fb419 Moved validation.php in locallib.php as a function. Now is called by lib.php add/updateinstance() 2007-01-16 13:21:19 +00:00
bobopinna a4813c36c8 The new edit page using QuickForm lib 2007-01-16 13:18:41 +00:00
bobopinna a6f505ff4a substitute by the new mod_form.php 2007-01-16 13:16:34 +00:00
thepurpleblob 5bed54e1fc MDL-8100, defaultgrade not imported. Question obect initialisation and value import wrong way round - whoops! 2007-01-16 12:12:26 +00:00
thepurpleblob 2e15284e31 MDL-8130 Number of improvements to check name length and improve HTML Entity handling. Thanks to Paul Ortman. 2007-01-16 11:23:32 +00:00
skodak 91866a2631 some minor user edit fixes MDL-8096 2007-01-16 09:56:15 +00:00
skodak 6647e04ac9 MDL-8110 use standard _FILE_ for includes instead of path starting with dot 2007-01-16 08:56:36 +00:00
martinlanghoff 0f02788f70 auth/db/auth.php - fewer queries against the ext db
Previously sync script would query the ext db once for each field that
might be wanted (repeated for each user).  Changed to query once for each
user.

Originally by Peter Bulmer <peter.bulmer@catalyst.net.net>
Somewhat adapted by Martin Langhoff ;-)
2007-01-16 05:24:20 +00:00
donal72 4d8c087e02 MNET: MyCourses block enriched with links to remote Moodles when roaming 2007-01-16 05:00:18 +00:00
martinlanghoff 43f853c908 mnet: restore support - XML parser knows about MNET_EXTERNALUSERS, restore_check.html warns
This may need to be reworked to move the warning to an earlier stage. In the
meantime, we have

 - at INFO parsing time we read MNET_EXTERNALUSERS into the backup info obj
 - at restore_check time, we warn the user that external users are in the
   package. If the situation looks dodgy, we say so. But don't block the
   user, as it may be a valid situation.
2007-01-16 03:28:57 +00:00
moodler 5d9bc144f3 Automatic installer.php lang files by installer_builder (20070116) 2007-01-16 03:13:08 +00:00
martinlanghoff c0543ba1f7 mnet: backup_general_info() now indicates whether it includes MNET_REMOTEUSERS 2007-01-16 02:52:51 +00:00
vyshane 818c1b0592 Merged from 1.7. 2007-01-16 02:44:13 +00:00
martinlanghoff 54359be4c9 mnet: backup_user_info() is faster, and it store mnethosturl for foreign users
Several changes to backup_user_info() rolled up here

 - The main JOIN happens in SQL instead of PHP
 - We now also join with mnet_host to get the wwwroot
 - As part of the join, all the variables appear in $user -- $user_data is gone
 - If the mnethostid is non-local we include MNETHOSTURL for that user

With this, backup_user_info() should be significantly faster for large
sets of users, though I haven't benchmarked it.
2007-01-16 02:27:36 +00:00
martinlanghoff dd3638e47e XHTML Strrrickt: fixed a problem with a UL and LI tag mix up during restores. 2007-01-16 01:06:11 +00:00
martinlanghoff da586c3778 mnet: restore_create_users() is now mnet-aware
It will now default to $CFG->mnet_localhost_id and can
handle backup files containing an mnethosturl user property
which will be mapped to mnethostid.

Additional checks are needed to avoid restoring files
with mnethosturls we cannot handle.
2007-01-16 00:56:15 +00:00
donal72 492d44e4f7 Mnet: Show that a key has expired. 2007-01-15 22:00:28 +00:00
skodak 5577ceb354 xhtml fixing in logs and reports, code cleanup MDL-8187 2007-01-15 21:28:25 +00:00
martinlanghoff d256515fba enrol/database: fix fields not read from external database MDL-7712 2007-01-15 19:57:12 +00:00
martinlanghoff de6e7ee2a9 auth/db: fix fields not read from external database MDL-7712 2007-01-15 19:53:26 +00:00
skodak acdd790f74 print_footer('none') during install and upgrade to hide home link and xhtml strict fixes 2007-01-15 19:16:29 +00:00
sam_marshall ca360e834b MDL-8185: Added an extra \n to use_html_editor to make it happy in wiki editing (doesn't do any harm elsewhere) 2007-01-15 17:45:47 +00:00
sam_marshall 2cf02a3935 MDL-8185: Changed wiki html tag balancer to leave CDATA sections alone 2007-01-15 17:42:06 +00:00
mudrd8mz de4214a592 The script used to fwrite \?\> instead of ?>. Fixes MDL-8129.
This was introduced in 1.80 by moodler. Don't know why but it caused an PHP critical
syntax error.
2007-01-15 11:40:26 +00:00
mudrd8mz f024bea279 The maximum length of the missing strings to display can be set now. Fixes MDL-8184.
Because the tags <pre>...</pre> are used when displaying original English
version of missing texts, the screen may get very wide. This patch displays
only first 60 characters followed by '...'. This produces better output.
2007-01-15 11:18:26 +00:00
jamiesensei fa3bf11d02 removed print_object that got left in here 2007-01-15 10:39:43 +00:00
donal72 fc7900e75e MNet: Display expiry date of local certificate 2007-01-15 09:14:41 +00:00
donal72 9dd0e6115d Mnet: Key rotation: A more robust changeover for fresh keys 2007-01-15 09:03:39 +00:00
donal72 82b29ea15a Mnet: Stylefix: Array was returned with unusual numeric index 2007-01-15 09:00:39 +00:00
donal72 151a987289 Mnet: Refactor: Split up mnet_server_fault function so we have option to send non-lang-file errors 2007-01-15 08:40:24 +00:00
donal72 85d2d959d5 Mnet: Bugfix: Prevent infinite loop when 2 community hubs peer for the first time 2007-01-15 08:31:58 +00:00
donal72 e931feddaf Mnet: Bugfix: Prevent a second record to be created for an existing host if the user entered http://example.com/ as the wwwroot 2007-01-15 08:26:56 +00:00
donal72 ca1131e2ea Mnet: Drop deprecated interface to mnet_get_public_key function 2007-01-15 08:20:10 +00:00
vyshane 68febe8361 Fixes for MDL-7861. 2007-01-15 08:15:04 +00:00
vyshane bae3a75ce8 Fixed text box display width. 2007-01-15 08:02:10 +00:00
vyshane dd2a21da76 Fixes for MDL-7861. 2007-01-15 07:59:28 +00:00
vyshane e524c0ed56 Fixes for MDL-7861. 2007-01-15 07:29:25 +00:00
moodler 3d621607f1 Fixed up alignment of buttons on course page 2007-01-15 03:39:48 +00:00
martinlanghoff bb931a61c6 rcache: cleanup, upgrade path, config options (MDL-8163)
record cache and caching schemes get a little cleanup, faster
if()s and a nice set of config options. Users who've been using
the internal cache get a nice upgrade too.
2007-01-14 23:02:13 +00:00
stronk7 a5855a89bf Avoiding some itarations. MDL-7902. Thanks Samuli!
Merged from MOODLE_17_STABLE
2007-01-14 12:11:33 +00:00
stronk7 5c8b250f37 Now the list of downloadable langs (when no fopen is available) doesn't break XML. Related to MDL-7861 2007-01-13 20:17:20 +00:00
stronk7 dbaa905e10 Now all the filters global config pages are valid XML. Related to MDL-7861 2007-01-13 20:15:09 +00:00
stronk7 bf63e03ebe Now all the blocks global config pages are valid XML. Related to MDL-7861 2007-01-13 20:14:40 +00:00
stronk7 73be66c7a8 Now all the modules global config pages are valid XML. Related to MDL-7861 2007-01-13 20:13:58 +00:00
stronk7 84e2c6c724 Added some styles to display phpinfo properly. 2007-01-13 20:12:32 +00:00
stronk7 629b635dc4 Now frame-less phpinfo page is valid XML. Part of MDL-7861 2007-01-13 20:11:31 +00:00
stronk7 3facbe6632 Now help information is back again (typo in js) and, under MySQL, the script is
able to change DB encoding if empty.
2007-01-13 20:06:17 +00:00
gbateson 4e9e64230f fixed typo in SQL query when starting a new HotPot attempt 2007-01-13 11:46:33 +00:00
stronk7 1d5c40048a Moving set_dbfamily() from dmllib.php to setuplib.php as it's
needed in early stages and we don't want the installer to
depend of dmllib.
2007-01-13 10:44:58 +00:00
moodler 3488d0e174 Automatic installer.php lang files by installer_builder (20070113) 2007-01-13 10:25:45 +00:00
jamiesensei 8fc3e643ae more work on the calculated and datasetdependent qtype 2007-01-13 08:59:00 +00:00
moodler 73d716dea0 Added dmllib.php because we need set_dbfamily in the environment stuff 2007-01-13 07:06:46 +00:00
moodler ce8a6756d7 Tidying up tab coloring 2007-01-13 06:00:13 +00:00
moodler b5252261f1 POssible slight improvement to looks in standardwhite 2007-01-13 05:56:45 +00:00
moodler c4054f90f3 Admin registration page -> XHTML Strict 2007-01-13 05:38:37 +00:00
ikawhero a756889587 Change to a table per category. 2007-01-13 05:32:15 +00:00
moodler b1ea439eea Moved color CSS to the right file 2007-01-13 04:56:19 +00:00
moodler 6ba2c73d04 More fixes for the help on required fields 2007-01-13 04:54:44 +00:00
moodler ee80b6ec43 Clean up notice boxes 2007-01-13 04:25:02 +00:00
moodler 49c7f3a850 Tidying up form appearance
1) Changed required/advanced images to something language neutral (asterisks)
2) Moved them to pixpath so people can override them easily
3) Hide the images completely using CSS (keep them only for accessibility)
   so that all the labels have a consistent alignment.
4) Use CSS to color the labels instead.
2007-01-13 04:24:15 +00:00
moodler 3efc06683a Removed rogue print_object -- how did it get there? MDL-8170 2007-01-13 03:28:25 +00:00
gbateson 923aefe7a1 removed db specific conditional clauses from SQL to get grades (see Moodle tracker - mdl-8169) 2007-01-13 02:39:04 +00:00
stronk7 ed7656bf01 Now environment stuff uses $CFG->dbfamily 2007-01-13 01:20:10 +00:00
stronk7 38b7241934 Some more uses of $CFG->dbfamily. MDL-7061 2007-01-13 00:52:59 +00:00
stronk7 a4bad45c2c Some more uses of $CFG->dbfamily. MDL-7061 2007-01-13 00:32:19 +00:00
stronk7 bb48a53735 Some more uses of $CFG->dbfamily. MDL-7061 2007-01-13 00:09:02 +00:00
stronk7 da340978d5 Need to return the value too, to use it sometimes. 2007-01-13 00:07:40 +00:00
stronk7 d847d4027b Now set_dbfamily() will work properly when invoked from install. 2007-01-12 23:52:23 +00:00
stronk7 c672870f8e Introducing CFG->dbfamily and create a setter function for it
(to be able to use families at install). MDL-7061
2007-01-12 23:44:00 +00:00
stronk7 485056620e Introducing CFG->dbfamily and deleting check_db_compat(). MDL-7061 2007-01-12 19:42:42 +00:00
skodak 32db0d42c9 MDL-8166 some forgotten set_defaults converted to set_data 2007-01-12 19:01:31 +00:00
stronk7 6b65a11173 empty array as default value for a multiselect config variable. 2007-01-12 18:53:09 +00:00
skodak beac4717de MDL-8166 rename in/out methods in formslib - HQ consensus 2007-01-12 18:52:09 +00:00
stronk7 0b0f7c00be Looking for empty default values in output_html() for multiselect settings.
Must be empty arrays.
2007-01-12 18:51:36 +00:00
tjhunt d7933a55c8 Fix notices from admin_setting_configmultiselect when no options are selected. 2007-01-12 18:30:27 +00:00
tjhunt b317007212 MDL-8165 - Admin setting to control which roles are synced to metacourses 2007-01-12 18:03:36 +00:00
moodler 474debf139 Automatic installer.php lang files by installer_builder (20070113) 2007-01-12 18:01:33 +00:00
sam_marshall f8e1c7af38 MDL-8149 Added code to narrow down possibilities for get_my_courses, which reduces number of db queries required for profile page when site has many courses. 2007-01-12 17:05:32 +00:00
ikawhero bcc113a304 Another minor change to profile string 2007-01-12 12:58:46 +00:00
ikawhero 253625c5e3 Tidying up the interface.
Fixed default data bug in menu type.
2007-01-12 12:58:15 +00:00
stronk7 55526eee2d Some changes to GROUP BY clause to be cross-db (all non aggregate fields
in SELECT must be in GROUP BY). Review the logic! MDL-8160
2007-01-12 12:57:50 +00:00
dwoolhead 20cc8f6066 MDL-7442 Changed search order for help files to be more consistent with language files (backwards compatible) 2007-01-12 12:29:42 +00:00
tjhunt a840456731 MDL-7496 - for numerical and short answer questions, the student was being told they were 'incorrect' before they had even had a chance to enter an answer! 2007-01-12 12:20:21 +00:00
csantossaenz 18fd9bf1b9 The second paremeter has been removed from the required_param($reference) call for allow URL 2007-01-12 12:17:34 +00:00
ikawhero fe8bed0853 Another profile string 2007-01-12 12:16:47 +00:00
ikawhero dbb3ecdb13 Fixing the table - accessibility and strrrrrrict 2007-01-12 12:15:53 +00:00
skodak eee3dc10dd MDL-7013 advanced buttons inplemented in resource settings 2007-01-12 11:43:25 +00:00
skodak 74d15d359d fixed function of advanced button in formslib - you had to click it twice initially 2007-01-12 10:48:11 +00:00
jmg324 db061ab2dc multiauth: fix for calling new properties and methods correctly 2007-01-12 10:33:12 +00:00
skodak f6bb9a93a3 MDL-7013 disabeldIf implemented in resource settings 2007-01-12 10:24:01 +00:00
jamiesensei 9958e84f3c removed condition 'if ($userupdate) {' (ie if user has capability moodle/user:update) then freeze fields locked by admin / auth plug ins. Now fields are always frozen. 2007-01-12 09:41:21 +00:00
skodak dd07bbac59 MDL-8157 improved hadling of conditions in disabledIf formslib method 2007-01-12 09:38:02 +00:00
ikawhero c517d8f07e Changes to the redirects. 2007-01-12 08:44:35 +00:00
moodler 5a4ef4c55d Use names for the field types 2007-01-12 08:42:59 +00:00
jamiesensei 98af2d1dc3 small fix in hardFreeze 2007-01-12 08:36:24 +00:00
ikawhero 63dbbf068b Strrrrrrict - keeping MD happy!!!! 2007-01-12 08:32:38 +00:00
moodler 1d388f6a1f Moved header to the top 2007-01-12 08:29:03 +00:00
jamiesensei 3c19571fed just amended some of the set_defaults stuff 2007-01-12 08:22:56 +00:00
ikawhero 5c11b818ec Making the interface friendlier:
- heading context sensitive
  - don't display the default category unless some fields have been defined
  - if no categories have been defined, then create the default category silently
2007-01-12 08:07:15 +00:00
ikawhero 1f18fd5e8f More profile strings 2007-01-12 08:05:37 +00:00
moodler 04441ec3d7 *** empty log message *** 2007-01-12 08:01:24 +00:00
ikawhero d687cb9e33 Strings for user profiles 2007-01-12 07:42:33 +00:00
toyomoyo 0db6adc9b0 MDL-8120, changes to roles to facilitate faster log in time 2007-01-12 07:41:33 +00:00
ikawhero ebc2df8a41 Only display non-empty categories 2007-01-12 07:32:58 +00:00
ikawhero d0c33889c5 Customisable user profile fields.
Still some tidy up work to be completed.
2007-01-12 07:05:52 +00:00
ikawhero 841f143d20 Adding the customisable profile fields link 2007-01-12 07:04:19 +00:00
ikawhero f1ab51b7bd New strings for customisable profile fields 2007-01-12 07:02:45 +00:00
vyshane 1f0acd62c6 Added class for lesson xhtml fixes. Related to MDL-7861. 2007-01-12 07:00:58 +00:00
toyomoyo 36a2b6bdc3 MDL-7861, xhtml strict related changes for glossary 2007-01-12 06:57:33 +00:00
vyshane f6830d4cb1 xhtml fixes related to MDL-7861. 2007-01-12 06:57:11 +00:00
ikawhero eed54b4840 Can delete last profile category if there are no fields in it. 2007-01-12 06:48:05 +00:00
jamiesensei acc9c3e037 added hardFreeze method and used it in edit_form.php it ensures frozen elements have persistantFreeze property set to false. 2007-01-12 06:19:39 +00:00
ikawhero 8c33bc76d0 Language string changes 2007-01-12 06:03:49 +00:00
ikawhero d052a81328 Added some functions for the admin GUI 2007-01-12 05:22:03 +00:00
ikawhero 1a4f426bc7 More changes from disabledIf() to freeze().
Moved set_defaults() into edit.php
2007-01-12 05:15:26 +00:00
jamiesensei ccbef0e2b7 moved set_defaults to main script out of definition method. 2007-01-12 05:07:22 +00:00
vyshane 26d932b109 Merged from 1.7. 2007-01-12 05:05:09 +00:00
jamiesensei 0ffb4cc703 special handling of frozen fields - frozen elements pass the default value (set by set_defaults or setDefault) and ignore submitted data in data_submitted() 2007-01-12 04:36:02 +00:00
moodler b0eefbe2de Automatic installer.php lang files by installer_builder (20070112) 2007-01-12 03:13:54 +00:00
donal72 7340c7435c Mnet: Remove 'Hide remote users' if there are no remote users: MDL-8068 2007-01-12 01:10:36 +00:00
ikawhero 1f4cd1bef5 Various changes for GUI. 2007-01-12 01:01:57 +00:00
ikawhero 9ac33264f4 Various changes for customisable user profiles GUI.
Changed locked fields to use freeze() method rather than js based
disabledIf() method.
2007-01-12 00:59:40 +00:00
ikawhero bd749a7c29 Authplugin locked fields now use freeze() method rather than rely on js
based disabledIf().
Thanks to Jamie P and Petr S.
2007-01-12 00:51:53 +00:00
toyomoyo 4cd126780c old method is faster 2007-01-12 00:47:12 +00:00
stronk7 60b562c49e Adding some $CFG->dbfamily-s here and there. MDL-7061 2007-01-12 00:06:08 +00:00
stronk7 93901eb42f Change some connections to non-persistent and force new connections
to avoid mysql (and oracle, I think) reuse of the main one. MDL-8152
2007-01-11 20:08:00 +00:00
skodak 26de8d35ce fixed text field widths in new forms 2007-01-11 19:47:08 +00:00
skodak 0ac1cfc359 fixe missing global CFG 2007-01-11 17:14:24 +00:00
urs_hunkler 758027d0e7 'more flexible round corner version, added pageclass nocoursepage to style course pages being no course view, admin view or site index' 2007-01-11 17:01:32 +00:00
urs_hunkler f7ff1909fd 'more flexible round corner version' 2007-01-11 16:57:44 +00:00
jmg324 3e7853f0e5 fetch_entries function post table sql needs single not double quotes for blog column value 2007-01-11 14:02:17 +00:00
tjhunt 47cdbd1f64 Question session state logic improvement - if students have not yet entered an answer, don't do an EVENT_SAVE. 2007-01-11 12:18:10 +00:00
skodak 7dc22930f7 choosecoursefile file selection fixed 2007-01-11 11:33:44 +00:00
urs_hunkler 5b4d9f8f68 '1.) commented out again: clearfix - overflow: hidden. 2.) there are some patch issues with body#question-preview, I can't resolve them and commented them out' 2007-01-11 10:16:03 +00:00
skodak 9eb9e038f9 MDL-8144 Fixed can not force free format selection 2007-01-11 09:41:13 +00:00
vyshane 53399f0f61 Changes for lesson. MDL-7861 related. 2007-01-11 08:52:38 +00:00
vyshane 4085962ae9 xhtml fixes for MDL-7861. 2007-01-11 08:51:46 +00:00
moodler bafc6a0bf1 Tidy tidy 2007-01-11 08:33:51 +00:00
moodler 195b310566 XHTML Strrrrict and css tidying 2007-01-11 08:31:58 +00:00
moodler e564721a13 FIxed bogus header 2007-01-11 08:24:24 +00:00
moodler 4f49f10c79 Lots of tidying up for user profile page 2007-01-11 08:18:53 +00:00
moodler d2f9ab1667 Fixed some buggy css for user view buttons 2007-01-11 08:11:34 +00:00
moodler 0f283cb6e2 Fixed up generalbox intro css 2007-01-11 08:07:56 +00:00
moodler c1afef8059 FIxed up the intro boxes XHTML Strict 2007-01-11 08:06:15 +00:00
moodler 4c8df2615d Some styles for tab fonts MDL-7782 2007-01-11 07:35:06 +00:00
urs_hunkler 262cb5e098 'round corners: 4 additional divs for column corner and border graphics - MDL-8142' 2007-01-11 07:29:03 +00:00
urs_hunkler 86df6cc6ee 'round corners: 4 additional divs for column corner and border graphics' 2007-01-11 07:21:28 +00:00
moodler a15e1ef767 CSS for centered buttons on course page 2007-01-11 07:21:28 +00:00
moodler 902a721282 Improvements to the CSS MDL-7782 2007-01-11 07:11:22 +00:00
moodler 3e2b348226 SOmething of a cleanup MDL-7782 2007-01-11 07:04:49 +00:00
moodler 6b25a26ed9 First pass at some tableless tabs - I need CSS help! :-) MDL-7782 2007-01-11 06:54:23 +00:00
moodler 1f48fec7ff FIxed some icon sizes 2007-01-11 06:51:01 +00:00
toyomoyo 0de75c4cfc MDL-8138, adding another flag to hopefully speed up the loop 2007-01-11 06:41:38 +00:00
donal72 ad77001dfa mnet: Replace hardcoded strings: MDL-8069 2007-01-11 06:07:52 +00:00
toyomoyo 1cd03601a3 adding caching to get_parent_contexts 2007-01-11 06:06:11 +00:00
donal72 2c1833bdb4 Mnet: Bugfix: Revised query to find hosts we SSO with: MDL-8082 2007-01-11 05:59:57 +00:00
donal72 15ed527f38 Mnet: Bugfix: 3 params in optional_param(): MDL-8119 2007-01-11 05:55:37 +00:00
toyomoyo b7e4027142 fix for MDL-8120, fix for slow override SQL. Please test 2007-01-11 05:52:26 +00:00
donal72 3d7e44684f Mnet: Bugfix for keepalive client 2007-01-11 05:38:45 +00:00
jamiesensei 92186abc95 working on multipage form for calculated question type 2007-01-11 04:59:16 +00:00
jamiesensei 0709d4d5f5 some xhtml validity fixes for the case that select and text elements are 'frozen' 2007-01-11 04:57:57 +00:00
donal72 016bac47b7 Auth: Better error message when SSO fails 2007-01-11 04:16:34 +00:00
donal72 1ca484a3b7 mnet: XHTML strict fixes: MDL-7861 2007-01-11 04:11:25 +00:00
donal72 8dc3de1629 Auth: Replace hardcoded strings: MDL-8069 2007-01-11 01:41:44 +00:00
donal72 e8b9d76a3f Auth: Replace hardcoded strings: MDL-8069 2007-01-11 00:05:47 +00:00
donal72 a9ad3633c7 Auth: Replace hardcoded strings: MDL-8069 2007-01-10 23:17:51 +00:00
donal72 5a3be3847e mnet: Replace hardcoded strings: MDL-8069 2007-01-10 23:15:53 +00:00
donal72 7d542ec91d Auth: Replace hardcoded strings: MDL-8069 2007-01-10 21:43:04 +00:00
donal72 5ecfc853c9 auth: XHTML strict fixes: MDL-7861 2007-01-10 20:42:40 +00:00
stronk7 82372b2c64 Introducing iPhone support for Moodle. B-)
Nah, just introducing $CFG->dbfamily. MDL-7061 :-D
2007-01-10 16:31:40 +00:00
urs_hunkler 367e23c213 'added the body class notloggedin to be able to style pages different before loggin' 2007-01-10 14:10:45 +00:00
skodak ac39fae94d MDL-6987 fixed wrong labels 2007-01-10 14:06:49 +00:00
skodak 436cfa9fb3 MDL-6987 assignment mod conversion to new forms lib 2007-01-10 13:38:04 +00:00
moodler 375539197e Whoops fixed some typos :-) 2007-01-10 08:36:54 +00:00
moodler 44b843b6d6 More XHTML strict stuff 2007-01-10 08:35:45 +00:00
toyomoyo fc9cb24a18 MDL-7861, fixes for workshop 2007-01-10 08:29:41 +00:00
moodler 08570bdcfd Made course boxes look nice 2007-01-10 08:23:55 +00:00
jamiesensei 8c2550c87a moved header printing so it is only printed when displaying a form. 2007-01-10 06:46:12 +00:00
vyshane 936af097b4 Fixes for MDL-7861. 2007-01-10 06:44:15 +00:00
jamiesensei 87391656a3 got rid of 'Changes Saved' message before redirect. 2007-01-10 06:40:42 +00:00
vyshane bf7b68c25b Fix for MDL-7861. 2007-01-10 06:31:51 +00:00
jamiesensei 78354cec8c fixed xhtml problem in repeared header elements which had [] in id. 2007-01-10 06:17:45 +00:00
vyshane d72fd6950b Fixed notice. 2007-01-10 06:11:31 +00:00
vyshane a202dfa034 onLoad made lowercase. MDL-7861 related. 2007-01-10 05:49:31 +00:00
jamiesensei 10a3103164 fix for MDL-8117 - div nested in span for grouped elements in formslib - changed spans to div 2007-01-10 05:26:22 +00:00
jamiesensei 9aa022feef xhtml validity fix for static element type
qtype calculated form - started
2007-01-10 05:05:26 +00:00
moodler 4f61eea0bf New styles for admin pages 2007-01-10 03:48:00 +00:00
toyomoyo 82056f6735 MDL-7861 xhtml strict fixes for wiki 2007-01-10 03:07:24 +00:00
vyshane f40c91dc70 Fixes for MDL-7861. 2007-01-10 02:47:50 +00:00
vyshane fff50475bd Fixes for MDL-7861. 2007-01-10 02:33:09 +00:00
donal72 b7b50143f3 Auth: Bugfix: MDL-8131 2007-01-10 00:50:59 +00:00
donal72 f9dff2433f mnet: Replace hardcoded strings: MDL-8069 2007-01-10 00:39:15 +00:00
donal72 5c2e5bf2d4 mnet: Bugfix: An object with no properties == false!!! 2007-01-10 00:37:53 +00:00
donal72 1f4ca9aff5 mnet: Replace a hardcoded string: MDL-8069 2007-01-10 00:32:42 +00:00
donal72 9274112148 mnet: XHTML strict fixes: MDL-7861 2007-01-10 00:31:43 +00:00
donal72 a57db6bda3 Auth: Replace a hardcoded string: MDL-8069 2007-01-10 00:25:51 +00:00
donal72 a1229bdd39 mnet: XHTML strict fixes: MDL-7861 2007-01-10 00:10:38 +00:00
skodak 440d164869 MDL-7861xhtml strict and css fixes in blocks 2007-01-09 23:45:24 +00:00
moodler f689ff1a9f Making it strict 2007-01-09 12:32:51 +00:00
moodler 0a8d5d7750 Tidying up some strict! 2007-01-09 12:32:12 +00:00
moodler 1bd1f9797e Just tidying on my way through 2007-01-09 12:31:09 +00:00
moodler 4609c6f0b5 JUst a minor tidy - I yank this line all the time :-) 2007-01-09 12:30:26 +00:00
moodler 04a252be7e A "guess" at what this query might be. Needs MH or DOnal to check it.
MDL-8082
2007-01-09 12:23:57 +00:00
vyshane 097018bd7c Fixed xhtml for MDL-7861. 2007-01-09 12:01:17 +00:00
vyshane 25fa41ba3f Fixes for MDL-7861. 2007-01-09 11:47:21 +00:00
skodak f82c88abd4 MDL-5120 list blocks now use <div for columns instead of span and floats; blocks related CSS cleanup, some xhtml strict fixes 2007-01-09 11:04:13 +00:00
vyshane e742c11f3f Xhtml fixes for MDL-7861. 2007-01-09 10:42:23 +00:00
vyshane 14efad9388 Fixes for MDL-7861. 2007-01-09 10:20:59 +00:00
skodak b733453a1a MDL-7861xhtml strict fixes 2007-01-09 10:08:51 +00:00
skodak 467a34b1d8 fixed typo in prev commit 2007-01-09 10:08:06 +00:00
moodler 819f239a81 Strict on editing long files too 2007-01-09 09:22:16 +00:00
moodler 5a34b76be0 Strrrrrrict when editing language files 2007-01-09 09:20:55 +00:00
moodler 99b112ee32 More cleaning up XHTML Strict 2007-01-09 09:11:50 +00:00
vyshane 0927589412 Xhtml fixes for MDL-7861. 2007-01-09 09:07:16 +00:00
moodler fc935b3095 Fix strings 2007-01-09 09:01:38 +00:00
moodler ac0bc03693 New tags 2007-01-09 08:39:16 +00:00
moodler 5d6993b187 MOved some loose strings I found 2007-01-09 08:25:40 +00:00
toyomoyo beae179786 MDL-7861 related problems for wiki. use_html_editor() call in ewiki.php is probably causing additional problems. 2007-01-09 08:21:29 +00:00
moodler c7b8ac330b Fixes for copyright notice during install MDL-8114 2007-01-09 08:18:34 +00:00
moodler 53add79acf Added a surrounding div to make the form xhtml strrrrrict 2007-01-09 08:16:31 +00:00
moodler 421e10c345 FIxed style and made this block XHTML Strict 2007-01-09 08:14:05 +00:00
moodler 6b7425d2cb Fixed addcourse button on home page 2007-01-09 06:07:35 +00:00
moodler 69cb58efdc Inserted a new style to make install look better 2007-01-09 05:55:07 +00:00
moodler 38fca5d7c7 Don't let downloaded environment files cause problems forever by overriding the
more up-to-date internal files
2007-01-09 05:52:11 +00:00
moodler 290e67c77e Added missing library causing install not to work 2007-01-09 05:26:12 +00:00
moodler ff4220f524 LIkely fix for MDL-8067 2007-01-09 04:59:56 +00:00
toyomoyo d3981e3804 MDL-7861, chat realated xhtml strict fixes, changed stlye in notice_yesno 2007-01-09 04:50:07 +00:00
donal72 9dfe778f6c mnet: enrol/mnet/allowed_courses: Stylefix - if( to if ( 2007-01-09 04:24:18 +00:00
donal72 0d098fbb65 mnet: enrol/mnet/allowed_courses: Removed PHP5.1+ functions 2007-01-09 03:55:40 +00:00
toyomoyo 95aa949b72 MDL-7861, xhtml strict fixes for choice 2007-01-09 03:14:34 +00:00
donal72 d25942e7ce mnet: enrol/mnet/remote_courses.php XHTML strict fix: MDL-7861 2007-01-09 02:31:22 +00:00
donal72 9feaec8f79 mnet: enrol/mnet/allowed_courses: XHTML strict fixes: MDL-7861 2007-01-09 01:51:12 +00:00
toyomoyo d71bc1ab61 MDL-7861, fixing xhtml strict problems 2007-01-09 01:38:24 +00:00
donal72 9953ee10d6 mnet: enrol/mnet/config.html XHTML strict fixes: MDL-7861 2007-01-09 01:32:31 +00:00
donal72 c65160b58e mnet: admin/enrol_config.php XHTML strict fixes: MDL-7861 2007-01-09 01:31:53 +00:00
skodak 6a18844bf3 MDL-7861xhtml strict fixes - site main menu 2007-01-09 00:18:37 +00:00
skodak 80381122be MDL-5162 Deprecated elements in messages block 2007-01-09 00:05:56 +00:00
skodak 998b2848c3 MDL-8115 fixed $$submission typo; merged from MOODLE_17_STABLE 2007-01-08 21:42:51 +00:00
skodak 82b9f43e76 MDL-7861xhtml strict fixes 2007-01-08 21:22:57 +00:00
skodak ff8889d8cf MDL-7861 still some icons left ;grr previous commid had wrong MDL id 2007-01-08 20:38:03 +00:00
skodak 0f13ec8f9b MDL-8105 some more icon class fixes including new .iconhelp for help and docs icon 2007-01-08 20:30:38 +00:00
stronk7 c90edfe168 Environment checks support mysqli. MDL-8113
Merged from MOODLE_17_STABLE
2007-01-08 19:54:44 +00:00
skodak b0ec5c662b MDL-8105 fixed theme colors in login page after recent div optimisation 2007-01-08 19:49:28 +00:00
skodak 60af27037b MDL-7861 xhtml transient fixes for not closed input fields - I hope all of them except imported libs are now fixed 2007-01-08 19:34:16 +00:00
stronk7 c0fe837eeb Adding support for mysqli. MDL-8113 2007-01-08 19:07:41 +00:00
urs_hunkler 162f74a29f added CSS constants - MDL-6798 2007-01-08 18:37:24 +00:00
urs_hunkler 16f0af59b0 'added handling of CSS constants - MDL-6798' 2007-01-08 18:35:28 +00:00
stronk7 cbcde5d8af Adding initial support for mysqli databases. MDL-7967 2007-01-08 18:33:03 +00:00
urs_hunkler d55c9a1f33 'changes for flexible column arrangement - see MDL-8109' 2007-01-08 15:53:34 +00:00
jamiesensei 86aab05ced fix for xhtml probs MDL-8102 and MDL-7979 - invalid id attributes.
and stopped using label tag for a group of elements where the label refers to the group of elements and not an individual one.
2007-01-08 15:53:17 +00:00
moodler 4a152925bd Size fix for category list MDL-8108 2007-01-08 15:17:40 +00:00
jamiesensei 08224df157 migrated randomsamatch to formslib.
fixed small typo in quiz mod_form
2007-01-08 13:58:42 +00:00
urs_hunkler 6e5cbcc5a9 'loginbox: commented the bgcolour out' 2007-01-08 13:46:39 +00:00
moodler c46fce7156 Fixed an old typo 2007-01-08 12:47:41 +00:00
moodler 8678c81e49 New strings for accessibility 2007-01-08 12:47:13 +00:00
moodler ae6e480923 Not sure if this was deleted intentionally or not 2007-01-08 12:23:04 +00:00
moodler 69faa9a3fa Added back some stuff Urs deleted ;-) 2007-01-08 12:22:26 +00:00
moodler ad94d5bf09 Added back missing style for index subscription links 2007-01-08 12:17:43 +00:00
moodler 6d55caae5e Added missing style back for rating submit button 2007-01-08 12:16:26 +00:00
moodler 42d06f50f4 Strict XHTML logic fixes for discussions in some circumstances MDL-7861 2007-01-08 12:13:35 +00:00
urs_hunkler 5e1dc8e4cd 'changed loginbox layout with reduced DIV number' 2007-01-08 12:02:52 +00:00
urs_hunkler 849728c0b5 'changed loginbox layout with reduced DIV number' 2007-01-08 12:02:32 +00:00
urs_hunkler 65d1374daa 'changed loginbox CSS for reduced DIV number' 2007-01-08 12:01:12 +00:00
moodler f6994e71fa Flash-based filters are now strrrrrrrict AND accessible! MDL-7889
Unfortunately this is only possible using Javascript to rewrite the DOM, so this means Flash content won't work without Javascript on.



   MDL-7861
2007-01-08 11:55:18 +00:00
jamiesensei 24f7485b15 some extra validaton for multichoice and some bug fixes for multichoice and random qtype. 2007-01-08 10:35:57 +00:00
skodak 0d905d9f34 MDL-7861 new class .icon and .iconsmall 2007-01-08 09:14:05 +00:00
jamiesensei 4a163300c8 removed redundant files after formslib conversion 2007-01-08 09:09:39 +00:00
donal72 82dff95cc7 mnet: New lang file for describing auth/mnet services 2007-01-08 09:06:20 +00:00
mudrd8mz f35a69cfca Help files stored in _local language packs take precedence. Implements MDL-8089. 2007-01-08 09:04:08 +00:00
moodler 7f51199bd1 FIxes for Strrrrrict in forum ratings 2007-01-08 08:51:47 +00:00
vyshane 464f76ae73 Updated YUI to version 0.12.1. 2007-01-08 08:47:49 +00:00
toyomoyo a2f6a09605 MDL-7861, xhtml problems with survey 2007-01-08 08:00:56 +00:00
skodak 18f3ad8372 xhtml fix - now only 'for=' with wrong id is removed from labels - static and grouped elemenst (date selector), because the missing label might cause problems with CSS styling 2007-01-08 08:00:46 +00:00
vyshane 0fd5feef05 Xhtml fixes for MDL-7861. 2007-01-08 07:58:22 +00:00
martinlanghoff 47cab2ad76 Removing .cvsignore -- so people can have their own. 2007-01-08 07:57:46 +00:00
moodler f79aa8921d Reverted mistakes from donal's last checkin 2007-01-08 07:55:45 +00:00
vyshane 2697726a66 More xhtml fixes. MDL-7861 related. 2007-01-08 07:45:53 +00:00
vyshane 2139364fbf xhtml fixes. MDL-7861 related 2007-01-08 07:38:29 +00:00
vyshane d26c09ad1f Added some classes for question preview view. MDL-7861 related. 2007-01-08 07:37:56 +00:00
moodler 3df151627c More forum tidying up, less tables 2007-01-08 07:16:48 +00:00
donal72 1bbb43eb93 mnet: XHTML strict fixes: MDL-7861 2007-01-08 07:16:29 +00:00
moodler 0be4d8bf67 Removed more tables from forum display :-) Strrrrrict! 2007-01-08 06:56:15 +00:00
moodler fedf73572e Refinements for print_box_* arguments names 2007-01-08 06:38:43 +00:00
toyomoyo 795b56b3f1 MDL-7861, xhtml strict for survey 2007-01-08 05:47:12 +00:00
donal72 cac88d400a mnet: In lib/db/upgrade.php, switch the magic number 1 to $CFG->mnet_localhost_id 2007-01-08 05:05:00 +00:00
toyomoyo 141a922c8c MDL-7861, xhtml strict issues 2007-01-08 03:34:44 +00:00
moodler 0a7c299317 Automatic installer.php lang files by installer_builder (20070108) 2007-01-08 03:16:53 +00:00
moodler 2123b644a6 print_simple_box_* functions deprecated and replaced with clean new functions print_box_*
MDL-8101 MDL-4943
2007-01-08 03:06:32 +00:00
toyomoyo 736c3c4ce5 putting nowarp back into table with proper style 2007-01-08 02:13:21 +00:00
toyomoyo e7a5de86a9 MDL-7861 xhtml strict fixes 2007-01-08 01:38:42 +00:00
vyshane 2429e177a2 Removed align attribute from img tag. Related to MDL-7861. 2007-01-08 01:27:22 +00:00
toyomoyo 051aad681b MDL-7861, fixing xhtml strict bugs 2007-01-08 01:09:54 +00:00
vyshane 50226569da Removed align attribute. Related to MDL-7861. 2007-01-08 00:41:53 +00:00
martinlanghoff 0dfed129af Add a .cvsignore file at the top of the Moodle tree so that config.php is appropriately ignored. This is exactly what .cvsignore is made for ;-) 2007-01-07 23:50:47 +00:00
skodak a1c91f9a15 MDL-7861 assignment related xhtml strict fixes (client view and fixed quickgrading/grading) and admin tree CSS styling 2007-01-07 21:54:39 +00:00
jamiesensei 490d89e591 removing more redundant files after qtype form formslib migration 2007-01-07 17:22:31 +00:00
jamiesensei c6fc998899 more last fixes to question forms and removal of redundant files 2007-01-07 17:06:50 +00:00
jamiesensei 111be766b6 changed implementation of advcheckbox so as to keep PEAR code seperate to Moodle code. 2007-01-07 16:41:06 +00:00
jamiesensei 04786f082d removing redundant files after migration to formslib and some further bug fixing in question type forms. 2007-01-07 16:36:38 +00:00
jamiesensei cfcfddbcbf new formslib element type advcheckbox prepends a hidden element to a checkbox so a value is submitted whether the checkbox is checked or not. 2007-01-07 16:11:48 +00:00
jamiesensei 6e9b6ba207 numerical and random question type creation form migrated to formslib 2007-01-07 16:10:42 +00:00
jamiesensei 375ed78a93 fixed the MoodleQuickForm_questioncategory, question_category_options function wasn't committed so I've implemented it from question_category_select_menu code. 2007-01-07 13:54:36 +00:00
skodak bfca8b1774 MDL-7861 resource mod related xhtml strict fixes (student visible interface only) 2007-01-07 13:49:31 +00:00
jamiesensei 271ffe3f25 various formslib work including bug fixes for MDL-8039 id attribute collision between forms and page ids. Also added editor helpbutton. This is a fix for MDL-6941 need the ability to associate several helptopics with htmleditor. Also started on converting forms for question types to formslib. 2007-01-07 12:46:47 +00:00
gbateson 6385429d24 prevent backslashes being inserted before #-sign in HTML entities by converting html-entities to UTF-8 when importing from Hot Potatoes quizzes into Moodle 's standard Quiz module 2007-01-07 12:37:06 +00:00
jamiesensei 01ae934f23 renamed file and some changes to form definition etc. 2007-01-07 12:11:57 +00:00
vyshane eb3f9f0816 Related to MDL-7861. Replaced html nowrap="nowrap" with inline style style="white-space:nowrap;". 2007-01-07 11:20:09 +00:00
vyshane 41a220329e Fix for MDL-7861 2007-01-07 10:19:01 +00:00
vyshane 8703f29af7 Added fieldset tag. MDL-7861. 2007-01-07 06:49:25 +00:00
skodak a5c96d06e5 MDL-8097 - fixed two problems in auth locking settings - one caused by my previous patch (sorry) and the other by forgotten hidden auth in form 2007-01-06 22:27:06 +00:00
skodak e8a29d251c MDL-8096 New user edit form does not work properly - fixed timezone handling + other minor fixes 2007-01-06 21:29:16 +00:00
skodak d36462eb00 MDL-7861 xhtml strict fixes - do not add label for static element in formslib, fixed wrong regex in previous commit 2007-01-06 21:22:02 +00:00
skodak 217d03a14c MDL-7861 xhtml strict fixes - do not add label for static element in formslib 2007-01-06 20:45:17 +00:00
skodak 2c94b1cea6 can not insert two buttons with the same IS on one page - fixed by custom buttons instead of add_action_buttons() 2007-01-06 20:36:31 +00:00
skodak 72f46d119b MDL-8039 formslib Form id collission with body id when editing course, user details, etc. 2007-01-06 20:31:06 +00:00
skodak 18ec5433bb fixed authplugin warning 2007-01-06 20:26:00 +00:00
skodak b1307cbca5 MDL-7861 xhtml strict fixes - removed table from navbar layout 2007-01-06 20:18:44 +00:00
skodak d2ce367fb9 MDL-8062 Remove name attribute from <form> and related javascript code cleanup (tested with FF, IE, Konq and Opera) 2007-01-06 19:22:58 +00:00
skodak ee7f231d08 revised adobe XSS protection SC#346 2007-01-06 15:22:23 +00:00
skodak 63f3b3a551 fixed warning in error() function - $continue not used there at all, is it? error() is expected to always terminate execution or should we add new function parameter? 2007-01-06 14:55:56 +00:00
moodler c11387978c Fixes to make user profile pages validate Strrrict 2007-01-06 14:07:00 +00:00
moodler d0a3291460 Minor forms fixes for Strict MDL-7861 2007-01-06 05:14:51 +00:00
moodler 99b054e4e8 SMall Strict fix 2007-01-06 05:06:35 +00:00
skodak aeab95f9db MDL-7861 xhtml strict fixes - the invisible fieldset was borking layout because it behaved like a block, added display:inline directive 2007-01-05 21:33:48 +00:00
skodak 83244f4cef MDL-7861 xhtml strict fixes - login page - this is the ***really last*** fix for IE trouble! 2007-01-05 21:10:35 +00:00
skodak f1906da1a6 MDL-7861 xhtml strict fixes - login page - ok, one even more final cleanup ;-) 2007-01-05 21:07:46 +00:00
skodak cfadda5dd0 MDL-8063 Fixed links to validation services to be XHTML Strict - in other templates now too 2007-01-05 19:48:58 +00:00
skodak 9a34376e21 MDL-7861 xhtml strict fixes - login page - final CSS cleanup, finished! 2007-01-05 19:41:51 +00:00
mits 7ce8df6a8d Fixed required class. 2007-01-05 18:14:54 +00:00
skodak e8e7dbcc8d MDL-7861 xhtml strict fixes - added langmenu class - fixed CSS alignment 2007-01-05 16:48:08 +00:00
tjhunt 9e93222df2 questioncategory formslib.php form control. 2007-01-05 16:46:28 +00:00
moodler abcaf2cfa5 XHTML Strict fixes 2007-01-05 16:40:04 +00:00
skodak 741fc7af6f MDL-7861 xhtml strict fixes - added langmenu class 2007-01-05 16:39:02 +00:00
skodak 4b873929be MDL-7861 xhtml strict fixes for login page revisited 2007-01-05 16:31:44 +00:00
moodler 7475775d4a XHTML Strict fixes MDL-7861 2007-01-05 16:16:21 +00:00
moodler 1c9d49c21c FIxes for news forum heading on home page (Strict) MDL-7861 2007-01-05 16:10:13 +00:00
moodler fcf9577a28 Sundry fixes related to course categpry page for XHTRML strict MDL-7861 2007-01-05 14:13:26 +00:00
moodler a09646cf23 More fixes to print_simple_box 2007-01-05 13:17:21 +00:00
andreabix fcf78b1557 fixed missing comma 2007-01-05 13:14:37 +00:00
moodler 7cd2f598aa More XHTML strict - removed image borders and height/width 2007-01-05 12:58:22 +00:00
thepurpleblob b0679efa8f MDL-6769 and http://moodle.org/mod/forum/discuss.php?d=60209 the default for shuffleanswers is now set to the configured value. 2007-01-05 11:56:57 +00:00
moodler 4f98c4af52 Tidied up theme for generalboxes 2007-01-05 11:53:23 +00:00
moodler df26dd34fd The fixes I meant to make with print_simple box doh! MDL-7861 MDL-4943 2007-01-05 11:51:43 +00:00
thepurpleblob 5363b5551b MDL-7913 Improved category detection (again) to extract all characters. 2007-01-05 10:35:13 +00:00
thepurpleblob dd0730c2dd Added some cleaning to the category path for some safety. 2007-01-05 10:16:12 +00:00
moodler 8a45fcdfda Prevent warnings for user when upgrading to mnet MDL-8082 2007-01-05 08:51:14 +00:00
moodler 3c76e67145 Better errors that lead to the wiki for more help MDL-8068 2007-01-05 08:46:10 +00:00
skodak 9495d05781 fixed my previous changes broken by new user form merging 2007-01-05 08:44:05 +00:00
moodler fa4c975c89 Some extensions to print_error to make it more useful for admin pages 2007-01-05 08:18:26 +00:00
toyomoyo 64888fc1cb MDL-7861, xhtml strict issues 2007-01-05 08:01:33 +00:00
jamiesensei d530721877 settting first param of moodleform constructor to null tells moodleform to autodetect where to submit to 2007-01-05 07:05:54 +00:00
ikawhero 68e9d36802 Fields set as locked are now disabled using the forms class rather than
javascript.
2007-01-05 06:57:30 +00:00
moodler 84d04c3e83 More XHTML fixes for help files 2007-01-05 06:57:21 +00:00
ikawhero 901d26dbf4 Locked fields do not need to be required. 2007-01-05 06:54:26 +00:00
jamiesensei b07b6c8134 added 'required' class to outermost div of form elements 2007-01-05 06:47:35 +00:00
moodler 9adb267c95 Fixed required class leaking around the place 2007-01-05 06:46:58 +00:00
moodler df31d7fb8d Search and replace to fix up heading style p --> h1 2007-01-05 06:40:12 +00:00
ikawhero b1c700238c Form fieldname set to shortname of field.
General tidy up.
2007-01-05 06:27:25 +00:00
moodler 4079b3d7b2 More strrrrict tweaks 2007-01-05 06:23:35 +00:00
donal72 cd607643dc mnet: Removed hardcoded English strings from some MNET files: MDL-8069 2007-01-05 05:58:39 +00:00
toyomoyo 820aff13a4 MDL-7861, xhtml strict fixes 2007-01-05 05:56:19 +00:00
toyomoyo d9cb14b885 MDL-7861, fixing xhtml strict problems 2007-01-05 04:57:58 +00:00
jamiesensei 18a7736107 added helpbuttons to htmleditors where needed. Further work on htmleditor helpbutton code. 2007-01-05 04:51:46 +00:00
ikawhero 82b99598c6 Fixing typo 2007-01-05 04:37:11 +00:00
donal72 08cb427af6 mnet: Remove bogus XYZ prefixes from last commit MDL-8070 2007-01-05 03:31:05 +00:00
moodler c97fffb367 Automatic installer.php lang files by installer_builder (20070105) 2007-01-05 03:25:49 +00:00
donal72 722f3f053e mnet: Allow an environment variable to be established in the absence of openssl - MDL-8070 2007-01-05 02:59:14 +00:00
ikawhero ca894a358f Deprecated file. Replaced with edit_form.php. 2007-01-05 02:50:50 +00:00
toyomoyo 91f3f616a6 MDL-7861, strict xhtml fixes 2007-01-05 02:38:09 +00:00
martinlanghoff 3261852ad6 Re-committing "Database changes for the customisable user fields" -- I _think_ this is what Shane meant to commit. 2007-01-05 02:34:41 +00:00
martinlanghoff 9654f6339d Reverting "Database changes for the customisable user fields" 2007-01-05 02:31:35 +00:00
ikawhero 2d836c0b5b Using the new forms class.
Customisable user profile fields.
2007-01-05 02:18:53 +00:00
ikawhero c9c74c47ab Profile page using the new forms class.
Code to allow customisable fields.
2007-01-05 02:14:06 +00:00
ikawhero 6b64d3b39b Customisable user profile fields 2007-01-05 02:12:33 +00:00
moodler d69e9c1519 Changed fieldsets to use the new invisiblefieldset class 2007-01-05 02:01:45 +00:00
toyomoyo e9f044341f MDL-7861, xhtml related issues, added class for some fieldsets to not display border 2007-01-05 02:00:20 +00:00
moodler 78baf48695 Added .invisiblefieldset class to hide unnecessary fieldsets 2007-01-05 01:53:24 +00:00
toyomoyo 8fcf22595e MDL-7861, fixing xhtml strict divs 2007-01-05 01:19:02 +00:00
toyomoyo df07bbeee6 MDL-7861, xhtml strict fix 2007-01-05 01:06:24 +00:00
skodak c632b7bb69 MDL-7861 xhtml strict fixes for login page - fixed empty div when no error 2007-01-05 00:16:19 +00:00
skodak 7947829fde fixed JS-less "go" button layout in popup form 2007-01-05 00:03:41 +00:00
skodak b150307551 MDL-7861 xhtml strict fixes - fixed capital letter tags and attributes 2007-01-04 23:59:55 +00:00
skodak 7150226896 MDL-7861 xhtml strict fixes - fixed all <br> in our code 2007-01-04 23:38:17 +00:00
skodak 7bc1c17fef MDL-7861 xhtml strict fixes for login page 2007-01-04 23:27:19 +00:00
skodak 003b4b40bd MDL-7861 some xhtml strict fixes 2007-01-04 22:49:07 +00:00
skodak ccffd41265 fixed potential problems with undefined $USER->screenreader 2007-01-04 21:39:47 +00:00
skodak b7dc225654 MDL-8062 1.3 Remove name attribute from <form> and fix focus everywhere - more changes ahead 2007-01-04 21:32:36 +00:00
skodak 535792b23e MDL-7861 some xhtml strict fixes 2007-01-04 18:58:31 +00:00
mits 72dcfd4256 Fixed coursebox style MDL-7861. 2007-01-04 18:27:25 +00:00
skodak fa73873105 MDL-8050 1.2 Remove all target="_top" - refactoring of previous commit 2007-01-04 18:23:55 +00:00
moodler 6c9c87146a This file is in index.php now ... 2007-01-04 16:03:19 +00:00
moodler cdcbb2dd22 Style fixes related to coursebox fixes MDL-7861 2007-01-04 15:59:26 +00:00
moodler a1857045dc Tidy up discussion controls using CSS MDL-7861 2007-01-04 15:58:55 +00:00
moodler b68da27633 Bending over for Strict MDL-7861 2007-01-04 15:53:35 +00:00
moodler afba7be148 Course box -> XHTML Strict 2007-01-04 15:53:05 +00:00
moodler bd792a758f XHTML Strict fixes MDL-7861 2007-01-04 15:52:11 +00:00
moodler eb2963824b XHTML Strict MDL-7861 2007-01-04 15:51:21 +00:00
moodler b5e000ce35 More Strict styling MDL-7681 2007-01-04 15:48:05 +00:00
moodler adc5f292f2 XHTML Strict for user images MDL-7861 2007-01-04 15:42:49 +00:00
moodler c7a049a3e2 More fixes for Strict MDL-7861 2007-01-04 15:31:05 +00:00
moodler 81d227745a XHTML Strict fixes for forum search MDL-7861 2007-01-04 15:23:45 +00:00
moodler 593bc22bf5 Various XHTML Strict fixes for popup links and simple box 2007-01-04 15:16:31 +00:00
moodler 47325bb53d Removed a form name 2007-01-04 14:02:46 +00:00
skodak c6da8ccca3 MDL-7861 some xhtml fixes 2007-01-04 13:01:28 +00:00
skodak 4f24b3e386 MDL-7861 various xhtml fixes and fixed layout of add activity/resource menu 2007-01-04 12:44:58 +00:00
ikawhero dedda83d93 Database changes for the customisable user fields 2007-01-04 12:35:47 +00:00
skodak b91c36bf2d MDL-8071 call_time_pass_reference trouble in pam auth 2007-01-04 12:16:31 +00:00
jamiesensei ff768bc57e small fix to button 2007-01-04 11:30:37 +00:00
skodak c233a6c3f9 fixed problem with is_executable() in windows since PHP 5.0.0 - curl binary not supported in win32 anyway 2007-01-04 10:45:57 +00:00
jamiesensei 5ce73257ab some bug fixes in setHelpButton internals.
added new editorhelpbutton function that can be used to refer to several help topics.
2007-01-04 10:23:06 +00:00
moodler 81693ac7f1 Make logout work without needing openssl MDL-8070 2007-01-04 08:32:50 +00:00
moodler defd0467f4 Latest tags 2007-01-04 08:06:37 +00:00
toyomoyo 4a8f3398f9 adding fieldset MDL-7861, needs new css class for border? 2007-01-04 07:19:55 +00:00
martinlanghoff 1734e61a41 mnet: check for openssl extension 2007-01-04 06:19:56 +00:00
martinlanghoff b763d139b4 mnet: xhtml strrrrrrrrrrickt mein herr 2007-01-04 06:13:20 +00:00
moodler 786dceabb3 Fixed a typo SQL call 2007-01-04 06:08:37 +00:00
moodler 244f6f3248 Removed old attributes on moodle mlogo 2007-01-04 06:06:17 +00:00
martinlanghoff 8124343856 mnet: environment now recommends openssl 2007-01-04 05:58:28 +00:00
toyomoyo 2558aa7fe8 adding fieldset MDL-7861 2007-01-04 05:49:29 +00:00
toyomoyo dc808910e1 MDL-7861, fixing xhtml 2007-01-04 05:32:23 +00:00
moodler 86498e7913 Included index.html to avoid conflicts 2007-01-04 05:16:21 +00:00
moodler d21a5865cf Added CFG->frametarget (defined by frametarget()) MDL-8050 2007-01-04 04:57:50 +00:00
martinlanghoff b9ddb2d5ea multiauth: migrated all files to the new OO API, written new API documentation
Author: Martin Langhoff <martin@catalyst.net.nz>
2007-01-04 04:52:42 +00:00
moodler d7275959a6 FIxes for XHTML strict 1.0 MDL-7861 2007-01-04 04:44:54 +00:00
martinlanghoff 56f8ff513e lang/en_utf8/mnet: Language pack updates
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:38:52 +00:00
martinlanghoff e2d4f75c40 admin/mnet/peers: Allow admins to manually update a remote server's public
key


Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:38:30 +00:00
martinlanghoff a9308edef3 admin/mnet/index: Allow admins to expire an SSL key
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:37:42 +00:00
martinlanghoff 0947d69da2 admin/mnet/index.html: UI Tweaks
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:37:20 +00:00
martinlanghoff f0e4c2701c mnet/xmlrpc/client & parser: Diff time between servers and break if it's
too large


Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:36:24 +00:00
martinlanghoff 8c99567eec mnet/environment: Bugfix
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:34:48 +00:00
martinlanghoff 735c7beb0a mnet: We now keep several generations of SSL keys
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:34:14 +00:00
martinlanghoff 7492722632 mnet/lib: Bugfix: mnet_generate_keypair: Declare USER as global
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:33:34 +00:00
martinlanghoff f32689ad4b mnet/environment: Fixup to make proper use of Moodle dml functions
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:33:14 +00:00
martinlanghoff 13c9d7e082 mnet: Some very minor style (etc) fixes
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:32:55 +00:00
martinlanghoff 840c12f362 user/view: Bugfix for broken XHTML on non-local user view
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:31:52 +00:00
martinlanghoff 66ebd55b6b mnet/xmlrpc/xmlparser: Fix code layout/alignment
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:31:26 +00:00
martinlanghoff 42f7353911 admin/mnet/mnet_services: Concatenated query to sidestep Moodle
requirement that firest field of resultset is unique


Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:31:10 +00:00
martinlanghoff f509ce0657 lib/db/access: Capability for roaming to remote Moodles
Author: Donal McMullan <donal@catalyst.net.nz>
2007-01-04 03:30:37 +00:00
martinlanghoff 5f88a475c5 mnet: fix a merge-related typo 2007-01-04 03:29:01 +00:00
martinlanghoff 357f08fa49 mnet: polish db changes to match upgrade and clean inst 2007-01-04 03:27:58 +00:00
martinlanghoff 5cd129c7f9 mnet/multiauth: table setup scripts 2007-01-04 03:27:05 +00:00
martinlanghoff 63b1e3513b mnet: fixed merge typo 2007-01-04 03:26:24 +00:00
martinlanghoff c72fe8018d mnet: new auth plugin 2007-01-04 03:26:04 +00:00
martinlanghoff d09d923b92 mnet: somewhat hackish changes to course_list. Needs further work 2007-01-04 03:25:18 +00:00
martinlanghoff 6e6b8c8516 mnet: new mnet_hosts block 2007-01-04 03:23:48 +00:00
martinlanghoff c215b32be7 mnet: courses and activity log know about mnet remote users 2007-01-04 03:22:51 +00:00
martinlanghoff d14383e0a0 mnet/multienrol: admin area changes, including test for curl extension 2007-01-04 03:19:49 +00:00
toyomoyo 9fcdacfdaf adding fieldset to form MDL-7861 2007-01-04 03:18:10 +00:00
martinlanghoff 28f2875622 mnet: core langpack changes 2007-01-04 03:08:12 +00:00
martinlanghoff bf1a3d2010 mnet: new enrolment plugin 2007-01-04 03:05:48 +00:00
martinlanghoff af9c5226c4 mnet: login operations (change pw, forgotpw) now handle multiauth and mnet remote users 2007-01-04 03:03:57 +00:00
martinlanghoff 56f5274232 mnet: user/* now handles remote users and multi-auth 2007-01-04 03:01:30 +00:00
martinlanghoff 03d820c788 mnet: changes to core moode libs
- get_user_listing() is now aware of remote users
 - require_login() is now aware of remote users
 - new auth plugins infrastructure in place
 - is_internal_auth() is now a deprecated legacy call
 - create_user_record()/update_user_record()/authenticate_user_login() handle multi-auth
 - is_mnet_remote_user() checks for remoteness
 - clean_param() handles PARAM_PEM and PARAM_BASE64

Also
 - user_login_string() knows to offer a link to remote users to login @ their host
 - XMLTDBTable field creation returns the field obj so that
   the caller has a chance to set additional properties such as comment
2007-01-04 02:52:44 +00:00
toyomoyo 2ea7548245 post table will be used for storing comments as well so the type has to be specified when querying blogs 2007-01-04 02:51:21 +00:00
martinlanghoff 71558f8502 mnet: core libraries and admin pages 2007-01-04 02:33:51 +00:00
vyshane 10daca92c5 Added missing img alt text. 2007-01-04 02:17:47 +00:00
vyshane f9921edcfc Added language strings needed for image alt text. 2007-01-04 02:14:50 +00:00
vyshane 5c53988f96 Added show/hide icons to calendar event filter. Related to MDL-7433. 2007-01-04 01:59:51 +00:00
toyomoyo 7dc6c73e33 users with screenreader flag set should only see 1 link to manual refresh chat rooms 2007-01-04 01:13:26 +00:00
martinlanghoff b776b27738 db upgrades are now XHTML-correct -- at least when they succeed! With this patch, 1.8 installation completes correctly 2007-01-04 01:07:35 +00:00
Martin Langhoff f3f7610c90 cvsimport fixups -- cvshead had strayed from upstream 2007-01-04 13:15:04 +13:00
skodak b8806cccdf Adobe Acrobat JavaScript Execution Bug SC#346 2007-01-03 23:35:03 +00:00
skodak c94eac4a4e MDL-7861 Strict XHTML 1.0 - popup_form() fixes (added div and $formname parameter changed to $formid) - fixed typo :-( 2007-01-03 22:54:54 +00:00
skodak 4e73e3eab6 MDL-8063 Fixed links to validation services to be XHTML Strict :-D 2007-01-03 21:12:39 +00:00
skodak c7225fe291 MDL-8062 chat, login page and messaging - removed name attribute from some <form>s and fixed focus; changed set_focus() JS to accept element ID == the $focus parameter in print_header() + other minor Strict XHTML fixes 2007-01-03 20:35:09 +00:00
skodak e6bfd8e45e MDL-8050 1.2 Remove all target="_top" - fixed typo 2007-01-03 20:06:11 +00:00
skodak 32f0b38a4a MDL-8049 Remove all language=Javascript from javascript includes 2007-01-03 19:33:44 +00:00
skodak e25cb71041 MDL-8050 1.2 Remove all target="_top" 2007-01-03 19:24:48 +00:00
skodak ee5567d1ae MDL-7861 Strict XHTML 1.0 - popup_form() fixes (added div and $formname parameter changed to $formid) 2007-01-03 18:53:03 +00:00
moodler 9e3e44e141 more Strict bending over 2007-01-03 16:04:08 +00:00
moodler fb87a6192c Added skip link to admin page 2007-01-03 15:38:28 +00:00
moodler 2ef9d19a51 Added skip links to all course formats to main content MDL-7878 2007-01-03 15:37:07 +00:00
moodler 8e968c9a66 Some small additions for validators (we don't want SID messing up nice xhtml) 2007-01-03 15:00:13 +00:00
moodler f4ba7e1a54 Bend over for XHTML 1.0 Strict ... MDL-8049
Removed Javascript language attribute tags and added CDATA
2007-01-03 14:44:17 +00:00
moodler 7e99dd2cd6 Making it a little more strict 2007-01-03 09:14:31 +00:00
moodler a09f3b7db6 Removed some language=Javscript attributes ... we need to remove all of them! 2007-01-03 09:09:25 +00:00
vyshane 8b9e8fc335 xhtml fixes for MDL-7861. 2007-01-03 08:23:49 +00:00
vyshane 849d075393 xhtml fix for MDL-7861 2007-01-03 08:19:10 +00:00
moodler fa19c325a9 Some minor changes towards MDL-8048 ... much more to do 2007-01-03 08:17:56 +00:00
vyshane 30011361e7 Language string for ical added. 2007-01-03 08:17:43 +00:00
vyshane 52b5069433 New icon for ical feed. 2007-01-03 08:13:04 +00:00
vyshane 3c49918a75 Layout and colour tweaks for calendar. Related to MDL-7433. 2007-01-03 08:12:21 +00:00
vyshane 03705a21e1 Layout and colour tweaks for calendar. Related to MDL-7433. 2007-01-03 07:58:25 +00:00
toyomoyo 58f779ab11 MDL-7861, adding a missing tag 2007-01-03 07:34:35 +00:00
toyomoyo e8e76f5a16 MDL-7861, fixing various xhtml strict issues and formatting 2007-01-03 07:29:51 +00:00
moodler 3632d05e6d New tags file 2007-01-03 04:44:10 +00:00
moodler 20c38567ca Automatic installer.php lang files by installer_builder (20070103) 2007-01-03 03:16:56 +00:00
moodler 84dec541b0 On second thoughts, while we are in testing phase, let's run with XHTML Strict all the time. MDL-7861 2007-01-03 02:03:22 +00:00
vyshane 37ce014f91 Fixed xhtml for MDL-7861 2007-01-03 02:00:52 +00:00
vyshane 89f0a84c9c Adding missing "/" to self-close input tags. 2007-01-03 01:53:52 +00:00
moodler 8af1b1ba80 MDL-7861 Better setting of strict in other debug modes too 2007-01-03 01:51:02 +00:00
moodler 2533830067 $CFG->debugdisplay now controls PHP errors too 2007-01-03 01:37:20 +00:00
toyomoyo c99934def8 MDL-7861, fixing tags 2007-01-03 00:41:50 +00:00
skodak 8ee88311d1 MDL-8018 testing and bugfixing of curl emulation library + added download_file_content() into filelib.php 2007-01-02 22:44:59 +00:00
skodak d5391f10bf MDL-8018 initial import of curl emulation library and handy HTTPRetriever
http://code.blitzaffe.com/pages/phpclasses/files/libcurl_emulator_52-7
  http://code.blitzaffe.com/pages/phpclasses/files/http_retriever_52-6
2007-01-02 20:38:20 +00:00
skodak e0fdb167d9 MDL-8032 remove repeated dashes from navmenu - replace with CSS styling 2007-01-02 10:27:59 +00:00
skodak 9119f247cf MDL-7861 I have noticed that the last change in weblib.php http://moodle.cvs.sourceforge.net/moodle/moodle/lib/weblib.php?r1=1.722&r2=1.723 broke validation because name and id attributes are not the same, committing fix, please review ;-) 2007-01-02 10:00:38 +00:00
skodak fc82080170 removed ooo log output format now replaced by ods 2007-01-02 09:49:10 +00:00
skodak 02023a60e8 MDL-7742 CSS hooks for styling of section add menu 2007-01-02 09:45:03 +00:00
skodak 89bfeee0d6 MDL-7742 added nested drop down box to add activities/resources to course, 3rd party mods can specify type
MDL-6987 preparation for migration of mod/assignment/mod.html
2007-01-02 09:33:07 +00:00
toyomoyo 17a67c9690 MDL-7861, fixing broken xhtml 2007-01-02 07:47:07 +00:00
toyomoyo c5f6b49e83 MDL-7861, fixing missing space 2007-01-02 07:43:56 +00:00
toyomoyo 8d09c3d9ab fixed a bug in calendar as one can have multiple role_assignments in a course 2007-01-02 06:49:30 +00:00
toyomoyo a175ffd0aa MDL-7871, replacing & with &amp; 2007-01-02 06:10:35 +00:00
toyomoyo 599475c7cb MDL-7861, replacing document.abc with document.getElementById('abc') 2007-01-02 05:55:57 +00:00
toyomoyo 9d3c6ee506 chaning reference from document.abc to document.getElementById('abc'), MDL-7861 2007-01-02 05:04:11 +00:00
toyomoyo 759a18ddf5 MDL-7861, fixing missing tag 2007-01-02 04:37:45 +00:00
moodler 0b2e4481ef Automatic installer.php lang files by installer_builder (20070102) 2007-01-02 03:11:53 +00:00
toyomoyo ca9d935649 MDL-7861, fixing javascript 2007-01-02 02:21:54 +00:00
toyomoyo 002d63aa1b MDL-7861, fixing javascript 2007-01-02 01:59:49 +00:00
toyomoyo b6bdcdc14c MDL-7861, adding cdata to javascript 2007-01-02 01:41:14 +00:00
vyshane 76b1f3c740 XHTML fixes for MDL-7861. 2007-01-02 01:25:40 +00:00
skodak 2a919fd7fe MDL-7977 new isguestuser() function implementation 2007-01-01 13:36:42 +00:00
skodak 4702be4ef7 MDL-8028 Add separate addslashes_js function for javascript quoting 2007-01-01 13:26:20 +00:00
moodler f5923b0883 Automatic installer.php lang files by installer_builder (20061231) 2006-12-31 03:15:28 +00:00
skodak 0d1cd0ea21 MDL-8028 Add separate addslashes_js function for javascript quoting 2006-12-30 22:45:40 +00:00
skodak 37edce7b84 MDL-8029 removed obsoleted use of isteacher() from user view 2006-12-30 21:40:22 +00:00
skodak b7b9786414 MDL-8029 removed obsoleted use of isadmin() from authenticate_user_login() 2006-12-30 21:32:53 +00:00
skodak d90ffc1f66 MDL-8029 removed obsoleted use of nvl() from weblib 2006-12-30 21:25:13 +00:00
skodak b490cf71a0 MDL-8029 removed obsoleted optional_variable() from ldap config 2006-12-30 21:22:36 +00:00
skodak 0e5215db91 MDL-8029 obsoleted html_entity_decode() and file_get_contents() emulation removed from moodlelib 2006-12-30 21:18:15 +00:00
skodak 2098f6ddbb MDL-8029 obsoleted file_get_contents() emulation removed from filelib 2006-12-30 21:14:24 +00:00
skodak dd2d45a878 MDL-8029 obsoleted ob_end_clean() emulation removed from chat 2006-12-30 21:10:23 +00:00
skodak 5d776ecbfc nvl() function moved to deprecated - my +1 for removing it together with friends xxx_variable() from HEAD ;-) 2006-12-30 21:05:17 +00:00
skodak 953eb6f315 MDL-8022 Chat accessibility - new gui_basic should integrated and fully working now
+ improved print_user_picture() to allow images with empty alt to prevent repetitive reading of usernames in jaws when username is printed next to avatar
2006-12-30 19:45:24 +00:00
skodak bcd85cffbd MDL-7948 some more messaging accessiblity fixes -missing css changes 2006-12-30 18:21:47 +00:00
mark-nielsen 54b698bce8 Modified some strings and added a few others 2006-12-30 17:31:37 +00:00
mark-nielsen f521f98a22 modified some strings to add more meaning to buttons and links
left menu, clock and media file all display like blocks
some general code cleanup eg: went through several of the todo's in the code
2006-12-30 17:29:44 +00:00
skodak d53f1cdb82 MDL-7948 some more messaging accessiblity fixes 2006-12-30 11:20:26 +00:00
skodak 54bb345831 MDL-7956 - fix problem with messages sent at the same time 2006-12-30 10:55:32 +00:00
skodak 711fb62baf MDL-7829 zipping with binary zip broken under windows when moodledata on different disk 2006-12-29 22:52:01 +00:00
skodak af7454d606 MDL-7828 Backup with error PCLZIP_ERR_MISSING_FILE (-4) under windows when moodledata on different disk - patch by Yves Roy 2006-12-29 22:34:56 +00:00
skodak da84dc82e6 MDL-7828 Backup with error PCLZIP_ERR_MISSING_FILE (-4) under windows when moodledata on different disk - patch by Yves Roy 2006-12-29 22:34:56 +00:00
skodak cf6bf1ab5f MDL-7837 auth_ldap_bulk_insert() fails when user data contains single quotes - patch by Iñaki Arenaza 2006-12-29 21:17:43 +00:00
skodak 70ee284143 MDL-8007 mimetype support for htc files, see http://support.microsoft.com/kb/306231 2006-12-29 20:57:48 +00:00
skodak 8ab91a5b1a MDL-8016 A language string for blog needs to remove "\n". 2006-12-29 20:36:05 +00:00
skodak 636069a369 MDL-8021 resource "Link to a file or web site", when created, doesn't open in a new window - fixed recourse typo 2006-12-29 20:16:50 +00:00
skodak 6ee78ceeaf MDL-8022 chat accessiblity
- new gui_basic that can be used as fallback or accessible option to gui_header_js - it is not compatible with chat daemon
- todo: CSS styling, beeping, JS fallback code in view.php and noframes fallback in gui_header_js
- minor changes in messaging language strings
- minor coding style improvements
2006-12-29 18:33:41 +00:00
moodler e623c5c689 Automatic installer.php lang files by installer_builder (20061229) 2006-12-29 03:07:43 +00:00
ikawhero 96ed722ba3 Minor change so code works on all versions of PHP 2006-12-29 02:36:41 +00:00
skodak feaf5d06db MDL-8015 improved file uploading
- changed file upload api in formslib
- fixed blog attachments and related code in file.php
- fixed glossary attachments
- fixed embedded images in forum posts and blogs - only gif, png and jpeg; the problme was that svg were embedded using img tag which was wrong, the same applied to other picture formats unsupported by browsers (please note that student submitted svg should be never embedded in moodle page for security reasons)
- other minor fixes
2006-12-28 21:21:44 +00:00
jamiesensei ebff6e2c5e better code formatting 2006-12-28 16:44:47 +00:00
jamiesensei b6d15ddef9 removed all 'Revert' buttons from forms and removed it altogether from add_action_buttons method since it was decided it didn't contribute to usability. 2006-12-28 16:12:22 +00:00
jamiesensei 1d284fbd85 fixing all the form names as per new class naming convention (PHP class names are also used for html id for styling) 2006-12-28 15:43:47 +00:00
jamiesensei f07b9627b6 changes to how we generate the id attribute of forms and the naming convention of forms
migrate blog edit to formslib
2006-12-28 09:32:45 +00:00
moodler ccbcb1a893 Automatic installer.php lang files by installer_builder (20061228) 2006-12-28 03:08:48 +00:00
martinlanghoff 02d3b34a8e rcache_getforfill() - better phpdoc 2006-12-27 22:55:12 +00:00
martinlanghoff f917d0ea9b $MCACHE - rework memcached support - some rework on eaccelerator
We now have a wrapper memcached support class to handle
initial connection setup, provide the common denominator
calls, plus getforfill() and friends.

The eaccelerator class now returns false to match memcached. The
downside of this is that we cannot store booleans as a false value
is indistinguishable from a false that indicates error or 'key not
found'.
2006-12-27 22:47:51 +00:00
martinlanghoff 2142d4924f $MACHE: add support for eaccelerator/memcached, change the $MCACHE calling convention a bit
- this effectively breaks memcached support for the moment
2006-12-27 22:47:14 +00:00
martinlanghoff 3530015874 rcache functions -- use a saner memory cache API
Push into the $MCACHE object
 - dealing with getforfill() nuances
 - dealing with moodle-host prefixes
2006-12-27 22:46:31 +00:00
martinlanghoff ec9fe5cf6f rcache_set() and rcache_table_unset(): use a configurable TTL 2006-12-27 22:45:47 +00:00
martinlanghoff 9c967c33fb init_memcached(): only use pconnect if configured to do so
Make pconnections optional - only use pconnect if $CFG->memcachedpconn is
set. In current versions of the memcache client in PECL (v2.0.1),
memcache_pconnect() is buggy and will segfault if reusing a pconnection
to a server that has gone away or restarted.

And hope for a more stable client library in PECL ;-)
2006-12-27 22:45:13 +00:00
martinlanghoff 419e1d937e Introducing $MCACHE - Memory-based cache
$MCACHE is initially based on core API that is shared between memcached and
turckmmcache/eaccelerator. The core operations are add(), set() and delete()

This initial implementation uses the PECL-based PHP client. Would be trivial
to add support for a PHP-based client.

The $MCACHE facility can be used for DB cache, text filters cache, and possibly
for sessions.
2006-12-27 22:44:39 +00:00
martinlanghoff c96a4a46d5 rcache_* calls - flesh out logic and use $MCACHE if available
- move from $CFG->enablerecordcache <count> to $CFG->rcache <type>

 - if $CFG->rcache === 'internal' use the cache array
   otherwise, attempt to use $MCACHE

 - implement and use rcache_getforfill() to catch thundering herds

 - the cache lifetime is hardcoded to 2s until we understand better the
   possible race conditions against updates that are not happening via
   update_record() / delete_record()
2006-12-27 22:40:38 +00:00
martinlanghoff cd60d017ea get_performance_info(): fixup rcache stats
0 cache misses is valid and probably a good score ;-)
2006-12-27 22:40:16 +00:00
martinlanghoff 6c2f585f85 dmllib: introducing the rcache_* functions for record cache handling
Abstracted Sam's initial work with $record_cache into a series of functions
that abstract things _just enough_ that we can use an internal
in-memory-array implementation or something that is shared across
processes, like memcached or the turckmmcache/eaccelerator caches.

Also
- added hit/miss stats tracking and reporting
- removed max entries limiting as it was buggy - var names mismatches
  and not counting unset()s
2006-12-27 22:39:32 +00:00
skodak adb61bc203 MDL-7950 Display only new messages option and other minor changes in jsless messaging ui 2006-12-27 16:06:17 +00:00
martinlanghoff 247035f8fc redirect(): fix protocol name in redirection header() 2006-12-27 01:49:14 +00:00
martinlanghoff 76f3815be9 raise_memory_limit() earlier -- resolves OOM on 64-bit platforms
On 64-bit platforms the in-memory footprint of our libraries is quite a bit
larger than usual, and we hit the 8MB default memory limit before we call
raise_memory_limit(). This patch moves raise_memory_limit() and
get_realsize() to setuplib so we can call them earlier, and moves the
call to _before_ we include the libraries.

On AMD64, for MOODLE_17_STABLE the footprint is about 9.5MB. Diet time? :-)
2006-12-26 22:48:36 +00:00
moodler b8d4068893 Automatic installer.php lang files by installer_builder (20061226) 2006-12-26 03:11:17 +00:00
skodak eb449c584d MDL-7956 Add frameless and JSless message composition option - message text area a bit smaller 2006-12-25 22:38:56 +00:00
skodak 531e58f1b2 MDL-7956 Add frameless and JSless message composition option 2006-12-25 22:34:05 +00:00
stronk7 2f078622af Now excel can be generated under iso-8859-1 (safer) based on the
$CFG->excelisofiles (true/false) value. It allows iso-8859-1
compatible sites to use better Excel generation. MDL-7993.
2006-12-25 19:51:17 +00:00
skodak aef5c10d7c MDL-7996 Add ods export support - basic functions needed for 1.8 release should be all working fine, more improvements later ;-) 2006-12-25 18:22:28 +00:00
skodak c4f72672c5 MDL-7996 Add ods export support - more formatting improvements and other fixes 2006-12-22 22:30:11 +00:00
tjhunt 36703ed725 MDL-8003 - part - Use formslib for question editing forms
This commit does two things:
1. Gives question types he opion to use formslib for their editing forms, instead of the old mechanism.
2. Converts the truefalse question type to formslib.
2006-12-22 15:39:40 +00:00
tjhunt 9dae915acb New param type: PARAM_NUMBER, for floating point numbers. 2006-12-22 13:29:20 +00:00
tjhunt 77ed3ba5fd MDL-8002 - Don't show overall feedback for incomplete quiz attempts.
Also, cleanup of mod/quiz/index.php
2006-12-22 12:52:13 +00:00
skodak f748220f0f MDL-7996 Add ods export support - row height implemented 2006-12-22 10:37:02 +00:00
skodak 25ea2ad6c3 MDL-7996 Add ods export support - column width fixed 2006-12-22 10:26:34 +00:00
skodak b0a945fc44 MDL-7996 Add ods export support - added changing of column width 2006-12-22 10:04:50 +00:00
toyomoyo 70f150bf0c MDL-7861, fixing xhtml tags 2006-12-22 07:19:00 +00:00
toyomoyo 7ac95a7181 MDL-7861, fixing tags 2006-12-22 06:31:34 +00:00
toyomoyo c5f6db7a61 MDL-7861, fixing broken tags 2006-12-22 05:58:28 +00:00
moodler 0cdf34fb03 Fixed lots of XHTML errors but still not working correctly in Strict 2006-12-22 05:42:36 +00:00
toyomoyo 9d9aa95baf fixing broken tags for MDL-7861 2006-12-22 05:20:20 +00:00
moodler 2222eb84bb Added CDATA to Javascript 2006-12-22 05:01:17 +00:00
moodler 704a26cbdd Fixed XHTML and Javascript insertion of tags into the templates 2006-12-22 04:55:41 +00:00
moodler 5e87b920e3 Added CDATA to Javascript 2006-12-22 04:52:13 +00:00
moodler a4e2f9e9bb Add CDATA to Javascript 2006-12-22 04:35:06 +00:00
moodler 5f60ed9b6a Added CDATA to Javascript 2006-12-22 04:25:00 +00:00
toyomoyo 6221541139 taking out unwanted/broken strings from mod_form to make form xhtml strict MDL-7861 2006-12-22 04:23:43 +00:00
moodler ce926cb8d8 Added CDATA to Javascript 2006-12-22 04:19:52 +00:00
moodler ad897001c2 Added CDATA to Javascript 2006-12-22 04:17:56 +00:00
toyomoyo b034bdfffc MDL-7861, fixing broken tag 2006-12-22 02:51:41 +00:00
vyshane 5609f9e672 More fixes in grade_display_letter_grades(). MDL-7861. 2006-12-22 02:34:42 +00:00
vyshane 49b5477e07 xhtml fix in grade_display_letter_grades() for MDL-7861. 2006-12-22 02:26:09 +00:00
vyshane 0ca5abd67d xhtml fixes in grade_display_grade_weights() for MDL-7861. 2006-12-22 02:23:52 +00:00
vyshane 9d95a8dd08 xhtml fix in grade_display_grade_preferences(). For MDL-7861. 2006-12-22 02:14:28 +00:00
toyomoyo c5bb277093 MDL-7861, fixing xhtml forms 2006-12-22 02:10:41 +00:00
toyomoyo 33999deb2c fixing warning 2006-12-22 01:16:51 +00:00
toyomoyo 95947ac9b6 replacing missing << with theme left arrow 2006-12-22 00:54:03 +00:00
skodak 09b14fec34 MDL-7996 Add ods export support - better xml from KSpread 1.6.1 :-) 2006-12-21 22:18:17 +00:00
martinlanghoff ccc776694d debugging(): our errors must be passed to PHP as E_USER_NOTICE 2006-12-21 21:56:49 +00:00
skodak 77c7f0f549 MDL-7996 Add ods export support - quiz report and number value, call time pass by ref... warnings fixed; fix in ods export lib 2006-12-21 20:34:51 +00:00
skodak d81b7ffbd7 MDL-7996 Add ods export support - more reports 2006-12-21 19:46:29 +00:00
nfreear 84fc088239 Integration 3 - groups in core, modules, calendar... (Part of MDL-7380, new groups) 2006-12-21 11:51:17 +00:00
skodak ea49a66cea MDL-7996 Add ods export support - added ods to course logs with other minor fixes, implemented date support and added missing stub functions for better excel class compatibility 2006-12-21 10:58:18 +00:00
skodak 9c61ba4d88 MDL-7996 Add ods export support 2006-12-21 08:12:10 +00:00
toyomoyo 3402a6f345 MDL-7861, broken xhtml 2006-12-21 07:50:19 +00:00
vyshane 39f5a2bdf0 Fixed xhtml issues in grade_set_categories(). MDL-7861. 2006-12-21 07:43:29 +00:00
vyshane 60078fffdd Uncommented print_footer() in grade_stats() to make popup pass xhtml 1.0 strict validation. MDL-7861. 2006-12-21 07:39:52 +00:00
toyomoyo b9072f81de fix for MDL-7861, taking out extra </form> tag 2006-12-21 07:01:28 +00:00
vyshane 29c16a55ba Fixes for MDL-7861. 2006-12-21 06:26:22 +00:00
vyshane 4b4830fe5d Fixes for MDL-7861. 2006-12-21 06:12:15 +00:00
vyshane bf290fd6b3 xhtml fixes for MDL-7861. 2006-12-21 06:05:34 +00:00
toyomoyo 4aac765f4c MDL-7861, fixng broken xhtml 2006-12-21 06:01:35 +00:00
toyomoyo 4b75f9f8ef MDL-7861, fixing xhtml strict problem 2006-12-21 05:48:08 +00:00
toyomoyo e777bc9aeb MDL-7861, fixing broken xhtml in loan calculator, adding CDATA tags 2006-12-21 04:45:44 +00:00
martinlanghoff 47b8b9eb80 Introducing $CFG->debugdisplay -- mimics PHPs display_errors, controls debugging() 2006-12-21 04:30:03 +00:00
martinlanghoff 4bd0ddeafa debugging(): use CFG->debugdisplay instead of PHPs display_errors 2006-12-21 04:03:21 +00:00
martinlanghoff c7533061ef debugging(): use trigger_error() when !display_errors -- now you can debug stuff without breaking HTTP headers, HTML and JS 2006-12-21 02:51:20 +00:00
martinlanghoff d5afb8cb59 login form: Fix closing TR
opening TR is not conditional, so the closing one should not be conditional
either. Fixes XHTML compliance.
2006-12-21 02:20:28 +00:00
toyomoyo 83e09b629a MDL-7861, fixing broken xhtml 2006-12-21 02:12:44 +00:00
toyomoyo 9d4eb0632b fixing the last comit, removing addtional < 2006-12-21 01:37:33 +00:00
toyomoyo 9d00db504a fix for MDL-7861, removing doulbe << 2006-12-21 01:31:46 +00:00
toyomoyo d4228481db fix for MDL-7861, strict xhtml 2006-12-21 01:14:57 +00:00
toyomoyo 63d6266282 fixing broken xhtml MDL-7861 2006-12-21 01:12:05 +00:00
stronk7 72da35d536 Add support for multilang titles in forum->posts
Merged from MOODLE_17_STABLE
2006-12-20 16:41:11 +00:00
stronk7 47c9c8f5dd Added one missing format_string() to post->subject
Merged from MOODLE_17_STABLE
2006-12-20 10:00:02 +00:00
toyomoyo 447ca67d35 MDL-7861, adding new xhtml compatible import forms 2006-12-20 08:05:26 +00:00
toyomoyo 661b912bfa fixing broken xhtml MLD-7861 2006-12-20 07:15:23 +00:00
vyshane 79b9651ec5 Missing </div>. MDL-7861. 2006-12-20 06:14:18 +00:00
vyshane 9e2679e395 Added missing html closing tags in function redirect() before the die call. MDL-7861. 2006-12-20 05:56:38 +00:00
vyshane 1577488f68 xhtml fixes for MDL-7861. 2006-12-20 05:55:22 +00:00
toyomoyo 5c8ea9d958 MDL-7861, fixing broken xhtml tags 2006-12-20 03:44:59 +00:00
vyshane 6e6014aea1 Fixed xhtml issues. MDL-7861. 2006-12-20 02:38:10 +00:00
vyshane 048e3e2121 xhtml fixes for MDL-7861. 2006-12-20 02:25:52 +00:00
toyomoyo 2ba9db3cd5 MDL-7861 fixng lesson xhtml tags 2006-12-20 02:17:13 +00:00
toyomoyo a0b939df01 fixing xhtml tags MDL-7861 2006-12-20 02:00:12 +00:00
toyomoyo 220dcd583c MDL-7861 fixing broken xhtml in lesson 2006-12-20 01:49:58 +00:00
vyshane d4a18e3460 Added missing footer for delete confirmation view. MDL-7861. 2006-12-20 01:15:15 +00:00
toyomoyo 402d802de4 fixing warning 2006-12-20 01:01:05 +00:00
toyomoyo 475ed85c57 MDL-7861, fixing broken xhtml tags 2006-12-20 00:48:49 +00:00
jamiesensei cc8cbf5591 got rid of extra help button that shouldn't have been there. 2006-12-19 11:43:32 +00:00
jamiesensei da43c002ff fix for MDL-7937 'Fatal error: Call to a member function on a non-object in /var/www/dev/lib/pear/HTML/QuickForm.php on line 602 error' 2006-12-19 11:18:06 +00:00
csantossaenz 25fe9d1972 Fixed a problem with double indexed elements in the GetValue method 2006-12-19 08:55:25 +00:00
csantossaenz 469a8d7505 Fixed a problem with double indexed elements in the GetValue method 2006-12-19 08:37:44 +00:00
toyomoyo b2603953be MDL-7861, taking out <br/>s in title tag 2006-12-19 07:19:13 +00:00
toyomoyo 5fabce28e3 adding missing tag MDL-7861 2006-12-19 07:05:48 +00:00
jamiesensei a23f0aaf95 * Added setAdvanced functionality see http://docs.moodle.org/en/Development:lib/formslib.php_setAdvanced
* Added MoodleQuickForm method closeHeaderBefore($elementName); http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#Use_Fieldsets_to_group_Form_Elements
* Added moodleform method add_action_buttons(); see http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#add_action_buttons.28.24cancel_.3D_true.2C_.24revert_.3D_true.2C_.24submitlabel.3Dnull.29.3B
* is_cancelled method added to moodleform http://docs.moodle.org/en/Development:lib/formslib.php_Usage#Basic_Usage_in_A_Normal_Page
* added hidden labels to elements within groups such as the date_selector select boxes and other elements in 'groups'
* quiz/mod.html migrated to formslib
* glossary/edit.html migrated to formslib
* extended registerNoSubmitButton() functionality to automatically add js to onclick to bypass client side js input validation.
* added no_submit_button_pressed() function that can be used in a similar way to is_cancelled() as a test in the main script to see if some button in the page has been pressed that is a submit button that is used for some dynamic functionality within the form and not to submit the data for the whole form.
* added new condition for disabledIf which allows to disable another form element if no options are selected from within a select element.
* added default 'action' for moodleform  - strip_querystring(qualified_me()) http://docs.moodle.org/en/Development:lib/formslib.php_Usage#Basic_Usage_in_A_Normal_Page
2006-12-19 07:03:08 +00:00
vyshane ac21137379 Making sure that restore views work in xhtml strict 1.0. MDL-7861. 2006-12-19 07:00:14 +00:00
toyomoyo 64034641cf MDL-7861, adding third param to error() function to print correct admin footer 2006-12-19 06:58:20 +00:00
toyomoyo 92a6d3f510 MDL-7861, adding third param to notice() function, so that the right footer is printed. Currently missing admin footer 2006-12-19 06:49:45 +00:00
toyomoyo b1b5e86829 removing extra tag MDL-7861 2006-12-19 06:19:16 +00:00
toyomoyo 8fc21fc00f MDL-7861, adding missing tag 2006-12-19 06:16:17 +00:00
toyomoyo f78aa86032 MDL-7861, strict xhtml for course/index page 2006-12-19 05:57:55 +00:00
vyshane b721223856 Merged from 1.7. Also contains some xhtml fixes for MDL-7861. 2006-12-19 05:02:22 +00:00
toyomoyo 866065f78b MDL-7861, fixing xhtml strict problems in scales 2006-12-19 04:37:28 +00:00
vyshane 97fbe07d4d Fixed some xhtml issues. MDL-7861. 2006-12-19 03:33:06 +00:00
toyomoyo 37aa59a932 no need to use javascript for a submit button 2006-12-19 02:34:38 +00:00
toyomoyo 4cb35c1b95 MDL-7861, fixing xhtml for lesson. When in strict mode, javascript button is not working 2006-12-19 01:52:39 +00:00
skodak 658e87e302 MDL-7903 Guests can not enter course that allows guests with key; merged from MOODLE_17_STABLE 2006-12-18 19:21:10 +00:00
tjhunt 3246ed335d MDL-7975 - Make import and export of truefalse questions more reliable. Merged from MOODLE_17_STABLE. 2006-12-18 18:07:49 +00:00
skodak b91b1f9297 MDL-7974 Weekend Days Settings Chooses Wrong Day after Saving 2006-12-18 18:07:03 +00:00
skodak 9f76d1d3f5 MDL-7973 Trailing spaces in PayPal email account cause problems... 2006-12-18 17:27:04 +00:00
skodak b71d4dd214 MDL-7957 Add proper form labels to elements in search and settings tabs 2006-12-18 17:10:35 +00:00
tjhunt 09db6da231 MDL-7972 - improve GIFT import export for truefalse questions.
Also clean up whitespace in question/format/gift/format.php.
MDL-7928 - Numerical question type should use * for the match anything answer - GIFT format part. - Merged from MOODLE_17_STABLE.
2006-12-18 16:38:58 +00:00
sam_marshall ad9947a857 MDL-7969 Documented requirement for first column in get_records_sql etc to be a unique field such as id. 2006-12-18 13:54:31 +00:00
skodak 0d3bb48dc8 MDL-7953 xhtml compliance in messaging - first step 2006-12-18 09:04:33 +00:00
skodak fd9b61e04f MDL-7861 added proper s() quoting into user image alt text and popup title 2006-12-18 08:08:15 +00:00
toyomoyo 904092cb4d DML-7861, fixing misnmatched tags 2006-12-18 07:55:40 +00:00
vyshane 9f4dff704b Merged from 1.7. 2006-12-18 06:26:23 +00:00
toyomoyo 78d112679d MLD-7861, making moodle xhtml strict. There are still errors in lesson mod 2006-12-18 06:13:04 +00:00
vyshane bc75cc5210 Added 2 new functions: question_get_feedback_image() and question_get_feedback_class(). 2006-12-18 06:07:44 +00:00
vyshane 2b0870563d Refactored printing of feedback images and printing of feedback html classes. See MDL-7467 for more details. 2006-12-18 06:04:47 +00:00
toyomoyo 88878a5be2 MDL-7681, fix for non xhtml strict tags and attributes 2006-12-18 05:24:01 +00:00
toyomoyo 3d23ca7e66 removing silly statement 2006-12-18 05:05:32 +00:00
toyomoyo e4f86bb041 MDL-7861, fixing minor xhtml strict problem 2006-12-18 05:03:36 +00:00
toyomoyo c581c003ff MDL-7890, warn on time limits, added string 2006-12-18 04:53:53 +00:00
toyomoyo fbd24d333b MDL-7861, making moodle xhtml strict, adding missing alt text 2006-12-18 04:53:02 +00:00
moodler 2d3da9b8eb XHTML compliance MDL-7861 2006-12-18 04:47:58 +00:00
moodler 0a5872450a Commented out header.php because it's not in CVS yet 2006-12-18 04:43:12 +00:00
moodler 2ae2200286 Removed bad character 2006-12-18 04:38:53 +00:00
moodler 3558a59b20 Latest tags file 2006-12-18 04:29:25 +00:00
moodler 5d7e1c2c67 Automatic installer.php lang files by installer_builder (20061218) 2006-12-18 03:38:22 +00:00
toyomoyo d3cc8d56c6 fixing broken xhtml 2006-12-18 01:56:21 +00:00
vyshane 134f2cc05a Removed tabs from source. 2006-12-18 01:18:18 +00:00
skodak c44ad6e93e MDL-7941Installation on Windows makes reference to libgd.dll in php.ini 2006-12-17 22:25:46 +00:00
skodak 488fa6f7f9 MDL-7959 improve rss template for Image gallery preset 2006-12-17 22:00:30 +00:00
skodak aa3b20e9df MDL-7945 Database learning activity does not use user defined RSS template, but continues to use default template. 2006-12-17 21:48:51 +00:00
skodak e076bccbc9 fixed number of rss articles in data mod settings - broken during new forms conversion 2006-12-17 21:12:23 +00:00
gbateson 244299a374 increased release number to v2.3.0, to differentiate this version fo the module from v2.2.0, which is used on Moodle 1.7 2006-12-17 02:27:40 +00:00
gbateson 54021a6f35 Modified README.TXT to reflect the fact that this version fo the module, v2.3.0, is not compatitble with Moodle 1.7 and eariler. 2006-12-17 02:22:38 +00:00
gbateson 76fcbbcb49 Modifications to reflect the fact that this version of the module, v2.2.0, only works with Moodle 1.7 2006-12-17 01:15:05 +00:00
tjhunt 55894a4205 MDL-7928 - Numerical question type should use * for the match anything answer. Merged from MOODLE_17_STABLE. 2006-12-15 18:30:39 +00:00
tjhunt 0dae5d33a7 MDL-7926 - set_field_select function. Merged from MOODLE_17_STABLE. 2006-12-15 18:23:31 +00:00
tjhunt 828df720a2 MDL-7925 - description question types were being created with defaultgrade = 1. It should be zero, so fix the bug, and reset any wrong ones in the database. Merged from MOODLE_17_STABLE. 2006-12-15 15:41:56 +00:00
toyomoyo 4e3ea0e0d9 adding long time warning MDL-7890 2006-12-15 05:34:35 +00:00
toyomoyo a880d5917b fixing broken xhtml 2006-12-15 05:30:56 +00:00
toyomoyo 027ce10e0e fixing broken html 2006-12-15 05:23:57 +00:00
toyomoyo cef5542133 fixing broken html 2006-12-15 05:06:53 +00:00
toyomoyo 935c40d856 added warning to warn possible long updates, MDL-7890 2006-12-15 04:39:19 +00:00
moodler 79135e13f5 Automatic installer.php lang files by installer_builder (20061215) 2006-12-15 03:14:33 +00:00
mits ebf046bc34 Fixed a missing closing brace }.
Thank you Joseph Rezeau: http://moodle.org/mod/forum/discuss.php?d=60788.
2006-12-14 14:10:07 +00:00
jamiesensei 19194f825a added setAdvanced MoodleQuickForm method. And added closeHeaderAfter method 2006-12-14 12:44:10 +00:00
skodak 102a58099a SC#341 fixed initilaization of navtail variable 2006-12-14 08:14:03 +00:00
vyshane 67c0e16eed Merged from 1.7. 2006-12-14 08:10:41 +00:00
vyshane 53a4443bae Merged from 1.7. 2006-12-14 07:48:40 +00:00
toyomoyo 3f5abcb20a accessibility fixes 2006-12-14 07:48:40 +00:00
vyshane e9880ed208 Merged from 1.7. 2006-12-14 04:47:29 +00:00
vyshane d7226dca93 New icons for question feedback.
MDL-7467
2006-12-14 02:34:32 +00:00
vyshane e0c256473d Changes for MDL-7467.
The images show each possible answer's "correctness":

Green tick - correct answer
Amber tick - partially correct answer
Red cross - wrong answer

Each image will have the appropriate alt text.

The answer that the student has picked is highlited by changing the background colour: light green, light amber or light yellow, depending on the correctness of the chosen answer. In addition to this, the image for that answer is much bigger in size than for the other possible answers. The alt text for this image will indicate that this answer was picked.

This way, the visual cues, the relative importance of each answer (chosen/non-chosen), and the relative relationships (correct/wrong) are kept. The chosen answer is emphasised by the background highlighting, by the bigger size of the icon, and by the alt text as well. I think this covers all the bases.
2006-12-14 02:32:32 +00:00
vyshane 07d9065d0b Tweaked CSS for question feedback. 2006-12-14 02:31:05 +00:00
toyomoyo a0ab421159 fixing broken html 2006-12-14 02:05:33 +00:00
skodak 40b6dd0116 MDL-5964 need html editor for comments in database mod + added format sql table field
MDL-7813 accessiblity fixes in comments
2006-12-13 23:09:34 +00:00
skodak bb828644ba xhtml and accessibility cleanup in data mod MDL-7813
* buttons reorganized - now displayed only with templates where usable
2006-12-13 21:02:01 +00:00
skodak 63efcb8c72 data preset coding style fixes 2006-12-13 20:32:13 +00:00
skodak aab98aaff1 data mod whitespace cleanup - there are already many accessibility related changes and fixes that are not backportable anyway and merging from previous versions is not expected 2006-12-13 20:26:11 +00:00
skodak b252c1ccf6 MDL-7822 Make imagegallery database template accessible - minor fixing 2006-12-13 09:58:55 +00:00
skodak 6c31d376c2 MDL-5696 fixed 'Checkbox' actually allows 'checkboxes' and empty 'options' (radio buttons too) 2006-12-13 09:53:59 +00:00
skodak 76a2fd8251 xhtml and accessibility cleanup in data mod MDL-7813
* preference form fixes

do not search for one character in data mod MDL-7911
2006-12-13 09:38:46 +00:00
skodak 007e4f6ede xhtml and accessibility cleanup in data mod MDL-7813
* image alt value is now called "Alternative text" because it should not be considered optional
2006-12-13 09:29:03 +00:00
skodak a032a46017 xhtml and accessibility cleanup in data mod MDL-7813
* fixed labels in preference form
2006-12-13 09:22:47 +00:00
toyomoyo 077f381461 accessiblity, associating <th> with respective row or col 2006-12-13 08:24:23 +00:00
toyomoyo fc9b712ef3 fixing accessibility issues 2006-12-13 05:25:45 +00:00
toyomoyo 54926e7818 various accessbility fixes 2006-12-13 03:03:43 +00:00
skodak e357c206db xhtml and accessibility cleanup in data mod MDL-7813
* image galery preset accessiblity fixes MDL-7822
* xhtml fixes
* fields now use s() and p() where needed
* added labels to all fields - imporved accessiblity for adding of new entries
* some other general bugfixing and cleanup

it is still not finished though, expect some more commits tomorrow
2006-12-12 23:34:55 +00:00
skodak 1a57f3aa8d MDL-7909 add optional id parameter to choose_from_menu() and print_textarea() - needed data mod changes 2006-12-12 22:08:50 +00:00
skodak 7850588ab8 MDL-7909 add optional id parameter to choose_from_menu() and print_textarea() + minor quoting improvement in choose_from_menu() 2006-12-12 22:06:37 +00:00
skodak 9706fa5684 MDL-7905 Add new available tag for element id for in database mod - fixed renaming of field
and other cleanup
2006-12-12 20:10:32 +00:00
skodak 740902d0ff MDL-7822 Make imagegallery database template accessible 2006-12-12 20:09:23 +00:00
skodak a5adbd0c39 MDL-7905 Add new available tag for element id for in database mod 2006-12-12 18:20:51 +00:00
sam_marshall dc268b2f24 MDL-7904: Trivial change to load_capability_def (so it works if run multiple times for the same file during one PHP run) 2006-12-12 17:23:31 +00:00
skodak bbb5ac9ae6 MDL-7901 allow empty spans in multilang block 2006-12-12 12:27:59 +00:00
csantossaenz 8e5d604263 Fixed problem with the update of cmi.entry adding conditions in the first php block 2006-12-12 11:57:00 +00:00
skodak f16242ce61 MDL-7887 Multilang upgrade to new tags in Moodle 1.8 2006-12-12 10:39:17 +00:00
tjhunt 9016b062e7 MDL-7602 - Multianswer question type only works with invalid HTML. Merged from MOODLE_17_STABLE. 2006-12-12 08:58:53 +00:00
toyomoyo 62fb666445 making default scope col for <th> 2006-12-12 08:11:49 +00:00
moodler 91a9559092 Fixed some potential XHTML strict errors MDL-7861 2006-12-12 07:30:37 +00:00
moodler 27f79fdab0 Added changes suggested by Nick in MDL-7883 to help debug XHTML strict
It only affects DEBUG_DEVELOPER mode, and causes the browser to break when it encounters non-strict XHTML.

I took out the changes for DEBUG_NORMAL for now, might be premature.
2006-12-12 07:24:32 +00:00
moodler d0b59e3bf6 Fixed a missing space which broken XHTML 1.0 strict 2006-12-12 07:12:11 +00:00
toyomoyo b5828a96a5 fix for MDL-7862, frames titles and frame accessibility for resources 2006-12-12 03:39:14 +00:00
tjhunt bb080d2046 MDL-7896 - error from random question type in adaptive mode. Merged from MOODLE_17_STABLE. 2006-12-11 23:46:15 +00:00
skodak 049bd7dbbd fixed cleantext producing two spaces between element attributes instead of one MDL-7894 2006-12-11 22:07:53 +00:00
mark-nielsen f2a3512bbd Merged in changes for MDL-7477 fix 2006-12-11 18:44:00 +00:00
tjhunt f4b7d5a3f9 Restore notices. 2006-12-11 17:12:04 +00:00
sam_marshall ae628043a0 MDL-7401 Course format database/backup/lang/stylesheet/capability support 2006-12-11 15:47:23 +00:00
bobopinna b7e771ce20 Added sequencing db support 2006-12-11 15:14:59 +00:00
bobopinna 0e1bf35071 Added sequencing tables 2006-12-11 15:13:44 +00:00
bobopinna 33b6a8f4c8 Added sequencing manifest parsing and db store 2006-12-11 15:12:02 +00:00
tjhunt 1ff4cfaf6a MDL-7886 - typo in overview report javascript. 2006-12-11 14:03:01 +00:00
nfreear f7a4bc03ff Fixes MDL-7885 "CSS unit errors in Standard theme, layout" - follows on from Jamie's fix 11/12. 2006-12-11 12:12:48 +00:00
nfreear fb132873d9 Fixes MDL-7884 "XML well-formed bug, need space before 'checked' attribute." (Merged from MOODLE_18_GROUPS) 2006-12-11 11:29:19 +00:00
jamiesensei fe2e0a749e fixing couple of syntax errors introduced into css 2006-12-11 10:10:26 +00:00
jamiesensei 84b4a843ed removed whitespace at the end of file causing headers already sent errors 2006-12-11 10:07:47 +00:00
skodak 5023c3abc8 MDL-6635 Template fields filtered twice 2006-12-11 09:35:27 +00:00
skodak a3318c36b8 MDL-7455 Database Activity Fatal Error after removing filed used for sorting 2006-12-11 09:17:05 +00:00
skodak 014145051e MDL-7858 Textarea field of database activity needs two translation strings. 2006-12-11 09:03:35 +00:00
skodak 5cd079644a MDL-7881 Reset js template should make the template empty 2006-12-11 08:55:40 +00:00
skodak be6d38eac4 MDL-7879 Removed available tags from CSS and Javascript template definition 2006-12-11 08:54:04 +00:00
vyshane 5b1675f420 Fix for MDL-7493. Added html id attribute for the image button used to toggle hide and show for blocks. This is used by javascript to replace the image on the fly. 2006-12-11 07:15:30 +00:00
vyshane 122223e8ab Fix for MDL-7493.
We basically replace the plus and minus hide buttons when the elementToggleHide javascript function is called.
2006-12-11 07:10:07 +00:00
toyomoyo 0d0e48d464 addming missing help file 2006-12-11 06:29:34 +00:00
toyomoyo c2adcc90b0 merged removed warning 2006-12-11 05:31:00 +00:00
toyomoyo e420932827 merged fix for MDL-7270, fixing warnings 2006-12-11 03:14:32 +00:00
skodak 986b73b818 MDL-5585 Clicking on available tag does not enter it into html editor when defining database templates 2006-12-10 23:18:43 +00:00
skodak 6871e4e431 MDL-6234 - reworked available tags when editing database templates; fixed closing optgroup tag 2006-12-10 23:09:52 +00:00
skodak 061e2ce31e MDL-6234 - reworked available tags when editing database templates 2006-12-10 22:38:42 +00:00
skodak f56f05dab1 MDL-5671 html editor can now be switched off on the fly while editing database templates; removed editor button from js and css template 2006-12-10 22:15:15 +00:00
skodak af7dc2f8db MDL-7826 added labels to text areas in data mod template definitions 2006-12-10 22:11:41 +00:00
skodak e21f9da6c8 MDL-7857 uninitialized context in mod/data/index.php 2006-12-10 20:21:10 +00:00
skodak cca1547e7c MDL-7716 In visible groups mode, It is possible to put a database entries in other group that it his 2006-12-10 20:16:03 +00:00
skodak 411f589fa7 MDL-6668 Database mod search error on Postgres; patch by Lorenzo Nicora 2006-12-10 19:25:46 +00:00
skodak 0c097262c7 MDL-5671 html editor can now be switched off on the fly while editing database templates 2006-12-10 19:08:46 +00:00
skodak 2840c21611 fixed timestart and timeend warning when adding new discussion 2006-12-10 18:33:07 +00:00
skodak e0a83a88ef fixed mfrom typo 2006-12-10 18:23:50 +00:00
skodak 9c1fbd3b81 MDL-6613 Apostrophe in locked field prevents user updating profile - patch by Iñaki Arenaza 2006-12-10 17:40:24 +00:00
skodak e59a895b90 MDL-7855 Sanitize field type when importing presents into data mod 2006-12-10 17:31:00 +00:00
moodler 8cadf658a9 Automatic installer.php lang files by installer_builder (20061210) 2006-12-10 03:01:01 +00:00
jamiesensei 44875d7898 added code to include hidden labels in groups in forms 2006-12-09 14:06:15 +00:00
skodak c1be9b31a2 MDL-7734 fixed warning when $course not defined when printing help button; merged from MOODLE_17_STABLE 2006-12-09 13:34:26 +00:00
jamiesensei 37601e884f small change to stop elements moving down to next line in IE with 800 px width. 2006-12-09 12:16:41 +00:00
jamiesensei 4dd564ddb2 small fix to disabledIf initiation 2006-12-09 11:45:24 +00:00
jamiesensei 11f260f4ee some changes to date_selector and date_time_selector. Now automatically disabledIf disable checkbox is checked. 'optional' option includes a disable checkbox. 2006-12-09 11:42:57 +00:00
moodler ce446e0907 Automatic installer.php lang files by installer_builder (20061209) 2006-12-09 03:10:00 +00:00
skodak f2584d0ea2 MDL-6519 Dollar ($) signs in data module text fields not preserved. 2006-12-08 22:29:11 +00:00
skodak 0c4fe7d832 MDL-7848 Database presets import breaks non-null restriction on description 2006-12-08 22:23:45 +00:00
skodak 449e6414e5 MDL-7823 Fixed hardcoded strings and xhtml compliance, code cleanup, improved access control in mod/data/preset.php
minor changes in language pack, should not cause legacy problems
2006-12-08 19:36:00 +00:00
mark-nielsen eb302b1914 Merged in fix for MDL-7418 2006-12-08 18:48:01 +00:00
toyomoyo 03bb25e1df merged fix for MDL-7766, calendar not displaying course events 2006-12-08 07:56:07 +00:00
vyshane 6d1f553bad Added language drop down to tag text as different languages for screen readers and to tag text as different languages for the multilang filter. MDL-7437. 2006-12-08 04:44:24 +00:00
vyshane c47a721112 New shortcut for language dropdown. 2006-12-08 04:42:39 +00:00
vyshane a15070d195 New strings required to fix MDL-7437. 2006-12-08 04:41:19 +00:00
toyomoyo 789154a65b merged fix for MDL-7819, admin still showing up in participants list 2006-12-08 04:28:58 +00:00
gbateson 30a281d3c1 Add information about columns in "ClickTrail Report" table 2006-12-08 04:22:57 +00:00
gbateson 070f9c8707 abandoned attempts are now included in all reports 2006-12-08 04:18:54 +00:00
toyomoyo 6e394912a5 merged fix for MDL-7794, inconsistent field length for city 2006-12-08 03:11:58 +00:00
gbateson 4db2e65f9d fix undefined property "cr_timefinish", when viewing click report 2006-12-08 02:44:23 +00:00
toyomoyo acf2052b05 merged fix for MDL-7592, get_course_students() bug 2006-12-08 02:22:25 +00:00
skodak 3b827a7e75 MDL-7839 Fixed use of capabilities in database entry rating 2006-12-07 20:06:11 +00:00
jamiesensei 46e648b610 added Sam's 'enabled' checkbox functionality 2006-12-07 10:39:28 +00:00
toyomoyo 22ae509e9c merged implementing moodle/user:viewdetails 2006-12-07 06:14:52 +00:00
jamiesensei dbc6607baa added some strings for labels for dateselector and datetimeselector day, month etc. elements. These are not used yet. 2006-12-07 05:37:41 +00:00
toyomoyo 5e8e6eb399 merged fix for MDL-7770, preventing users with no capability to view user profiles 2006-12-07 05:06:15 +00:00
toyomoyo 6170acad06 merged fix for MDL-7696, adding addslash for bulk messaging 2006-12-07 03:02:41 +00:00
toyomoyo 2ca05411a9 merged fix for MDL-7734, making help links respect course langs 2006-12-07 02:19:13 +00:00
toyomoyo 36f057ec14 fix for MDL-7810, shorten string name 2006-12-07 01:01:18 +00:00
skodak c088d6039d MDL-7821 wrong use of cm in data mod and added proper require_login() 2006-12-06 20:17:58 +00:00
sam_marshall de312b53bb MDL-7816 Added optional (checkbox) facility to quickform dateselector 2006-12-06 14:50:57 +00:00
skodak 196da4a45e MDL-7812 warning in sorting form in data module when no fields defined 2006-12-06 09:57:42 +00:00
skodak eb7ac7fc00 MDL-7806 Login results in fatal PHP error on enrol/database connect failure (patch by Clinton Graham) 2006-12-06 09:49:05 +00:00
toyomoyo aec86ae027 added new setting for allowvisiblecoursesinhiddencategories in appearance->front page 2006-12-06 07:57:54 +00:00
toyomoyo 6123004aaf merged avoid the user of deprecated function 2006-12-06 06:25:03 +00:00
toyomoyo c106eec62b merged, fix for MDL-7784, reference to user_student tables 2006-12-06 06:08:05 +00:00
moodler db0852c5d7 Merged mymoodleredirect fix from stable, see MDL-7583 2006-12-06 05:08:37 +00:00
toyomoyo bdbe41d031 merged fix on wrong counter 2006-12-06 04:54:31 +00:00
toyomoyo 8dc9a21139 adding scope="col" for table headers 2006-12-06 03:59:55 +00:00
toyomoyo 49108746a9 fix for MDL-7507. participants list, fix links to ordering links, added accesshide texts to links 2006-12-06 03:46:04 +00:00
mark-nielsen 3cea312333 Merged changes from MOODLE_17_STABLE 2006-12-06 02:26:28 +00:00
moodler c5c1ec895b Non-editing teachers should NOT have course import capability by default 2006-12-06 02:24:18 +00:00
mark-nielsen 15d2933a00 Merged in changes from MOODLE_17_STABLE for bug MDL-2006 2006-12-06 02:04:37 +00:00
skodak fed13a5e88 MDL-7807 duplicate error messages in client side validation, errorSpan inserted only once 2006-12-05 21:48:44 +00:00
skodak e35c9eeb5f MDL-7807 duplicate error messages in client side validation, fixed the rest of problems I hope 2006-12-05 21:43:33 +00:00
tjhunt fb6179a16c MDL-7804 - Essay questions do not backup properly. Merged from MOODLE_16_STABLE. 2006-12-05 18:47:40 +00:00
tjhunt 2e0ed03e5e Fix error when restoring into a newly created course. The course files folder may not exist yet, so need to do a recursive directory create. 2006-12-05 18:42:39 +00:00
tjhunt 89475b805d Fixed notice when restoring a backup file that was created with Users: none. 2006-12-05 18:38:56 +00:00
tjhunt b036f941e3 There was some random code between two functions definitions that was giving errors on restore. I assume it was just a copy and paste error, so I have deleted the offending lines so that restore works.
However, someone who understands SCORM should review this.
2006-12-05 18:34:29 +00:00
tjhunt edea4db46b Add $level parameters to each backup method. Merged from MOODLE_17_STABLE. 2006-12-05 18:14:57 +00:00
sam_marshall 7fa944ca85 MDL-7805 Block instance_delete was not called 2006-12-05 17:46:39 +00:00
jamiesensei e7004d051a fix for problem of duplicated error messages, client side validation not deleting old error message before displaying new ones. 2006-12-05 14:27:24 +00:00
jamiesensei a2e67a9a47 fix for error preventing adding of more choices in chat upate form 2006-12-05 13:32:32 +00:00
jamiesensei 0b82f5b913 fix for error in logic about where to redirect to after a cancel or after activity mod is successfully added or update. 2006-12-05 13:23:18 +00:00
jamiesensei 0befbdfd8f petr's patch to fix problem with htmlarea breaking clientside validation. Also using id's with same naming convention as formslib for htmlareas. 2006-12-05 13:21:40 +00:00
jamiesensei eca038b50b changed name of reset element in form from 'reset' to 'resetbutton' so that the element name doesn't conflict with js form method reset. 2006-12-05 11:58:43 +00:00
skodak d73e265e9a added cancel button to glossary comment form and fixed initialization of button arrays MDL-7778 2006-12-05 09:44:11 +00:00
skodak 5571b5f4f8 added cancel button to assignment forms MDL-7778 2006-12-05 09:37:31 +00:00
skodak 5d2b6c1c42 added cancel button to forms in login/ directory MDL-7778 2006-12-05 09:30:18 +00:00
skodak f71346e29a require_login not working properly MDL-7800 2006-12-05 09:19:26 +00:00
vyshane 57f876b732 Merged from 1.7 2006-12-05 08:15:01 +00:00
moodler 99ad7633a6 Merged cache clearing from stable 2006-12-05 07:17:04 +00:00
moodler 40cab82e64 Merged fix for last access time for my moodle, MDL-7609. 2006-12-05 07:00:43 +00:00
moodler caac897791 Merged fixes for switchroles from stable MDL-7605 2006-12-05 05:45:08 +00:00
moodler 265860e09c Automatic installer.php lang files by installer_builder (20061205) 2006-12-05 03:17:13 +00:00
skodak 1cbb09f1d1 MDL-7778 fixed cancel button failing on some pages (I hope) 2006-12-04 22:00:47 +00:00
nfreear f24a257d85 lib.php, moved to group/ (Part of MDL-7380, new groups) 2006-12-04 17:29:03 +00:00
tjhunt f60774823f MDL-7719. Merged from MOODLE_17_STABLE. 2006-12-04 16:21:40 +00:00
tjhunt 6542b1ecfe Typo in help. Thanks to Ken Wilson. 2006-12-04 16:08:00 +00:00
tjhunt f725489c9a Typo. Merged from MOODLE_17_STABLE. 2006-12-04 11:54:48 +00:00
jamiesensei 1c51317b2c small change to type of returned var from is_validated() 2006-12-04 10:59:07 +00:00
jamiesensei 3ba2c1871e *** empty log message *** 2006-12-04 10:55:50 +00:00
jamiesensei 19110c573d added new 'cancel' element type and introduced new is_cancelled() MoodleQuickForm method.
also used new cancel button in all mod_forms as well as a 'Revert' button and reworked logic about where to go on cancel or after submission for modedit.php
2006-12-04 09:36:30 +00:00
skodak 9c0f063b2c MDL-7737 Remove form referer checks - $CFG->secureforms optional checking 2006-12-04 09:13:51 +00:00
skodak 7b678e0a99 MDL-7767 Guests should not be able to hide course sections - section hiding is not stored in db for guests, only session is used now; merged from MOODLE_17_STABLE 2006-12-04 09:02:17 +00:00
vyshane ea3caf69cd Merged from 1.7. 2006-12-04 08:09:22 +00:00
moodler 4e75f4249f Merged timezone fixes for WA from stable 2006-12-04 07:01:02 +00:00
moodler f320591f83 Automatic installer.php lang files by installer_builder (20061204) 2006-12-04 03:09:49 +00:00
toyomoyo c05275675b merged stops showing admins from participants list 2006-12-04 03:05:40 +00:00
toyomoyo 30c82426e3 merged fixed a bug where admin can't unassign himself from non-admin role in site context 2006-12-04 01:54:24 +00:00
toyomoyo a08d5db719 merged fix for MDL-7773, restore_to not set for creators 2006-12-04 01:14:43 +00:00
skodak 8a3a634afd MDL-7783 Non-internal authentication change password URL doesn't work - patch by Iñaki Arenaza 2006-12-03 20:06:35 +00:00
skodak 28b52b8607 removed space from alt attribute, use empty "" insted according to accessibility recommendations 2006-12-03 15:34:37 +00:00
skodak 30e113f4fa MDL-7781 Move help button out from element label in new formslib 2006-12-03 14:28:40 +00:00
skodak 0c3f57fa69 MDL-7776 Switch required and help icon - rearanged fieldset too 2006-12-03 13:05:34 +00:00
skodak 980c7dcabe MDL-7777 Remove dot from "Required field." string 2006-12-03 11:31:41 +00:00
skodak 441e8334af MDL-7776 Switch required and help icon 2006-12-03 11:26:05 +00:00
skodak 3d6851692c MDL-7775 Remove links from required field icon - leave only onle help button per page 2006-12-03 11:10:21 +00:00
skodak 5301205a24 MDL-7757 URL check is too restrictive, allow port 2006-12-03 10:23:56 +00:00
skodak 4adc9c4f60 MDL-7768 forgot_password.php copnverted to use new forms:
* new forms
* minor refactoring and code cleanup
* secret is now cleared to prevent repeated use of change confirmation link, added new error message see MDL-7755 (patch by Andrew Walbran)
2006-12-02 19:05:24 +00:00
skodak 1437f0a5e3 conversion of login/change_password.php to new formslib and other changes:
* new formslib
* works only when logged in - added redirection to login page for guests or not logged in yet
* fixed redirects when logging in and on forced password change
* "Logged in as" users are not allowed to use this form
* general cleanup
2006-12-02 14:38:31 +00:00
skodak e4e29623f9 name of submit button changed to submitbutton 2006-12-02 11:38:08 +00:00
skodak 2acdaa6cd3 added proper labels and minor xhtml fix 2 2006-12-02 09:33:08 +00:00
skodak 990f50f2c0 added proper labels and minor xhtml fix 2006-12-02 09:30:45 +00:00
stronk7 2c41b2d72e Dictionary name wasn't being saved, so aspell didn't worked under 1.7
if the setting had been edited. MDL-7762

Merged from MOODLE_17_STABLE
2006-12-01 17:40:47 +00:00
thepurpleblob 953c76d621 Added or improved help re. category switching in import files 2006-12-01 16:21:29 +00:00
thepurpleblob 6575b04f25 Improved regep for category switching 2006-12-01 16:06:06 +00:00
nfreear 764d1d20dd Fixes MDL-6838, uses 'inline-list' class (label with ordered list <ol> not redendered with numbers) 2006-12-01 15:54:46 +00:00
nfreear 9dd68bc79b Fixes MDL-7244 "Missing accessibility label on login block input forms". (Previous commit of block_login.php was a mistake.) 2006-12-01 15:27:05 +00:00
nfreear 2e2bcd9505 Fixes MDL-6838, "label with ordered list <ol> not redendered with numbers" 2006-12-01 13:44:56 +00:00
nfreear 35befea728 Fixes MDL-7758 "Replace breadcrumb image with THEME->rarrow in unit test reports". 2006-12-01 10:21:11 +00:00
nfreear 702227c913 MDL-7758 "Replace breadcrumb image with THEME->rarrow in unit test reports". 2006-12-01 10:20:40 +00:00
nfreear 808c2a69fe Adding space in channel <img /> element. Minor whitespace cleanup. 2006-12-01 10:10:56 +00:00
skodak 81f5d4a102 MDL-7234 Smilies don't load in HTML editor for some languages 2006-12-01 09:48:40 +00:00
skodak 14bac768f3 Forgotten password page does not check secret MDL-7755 2006-12-01 09:13:06 +00:00
toyomoyo 59fd781a66 fix for MDL-7481, grade book student view should have table headers 2006-12-01 08:31:15 +00:00
vyshane 7ccc1ced38 Added more information on limitations of keyboard access. 2006-12-01 07:42:45 +00:00
jamiesensei a12034e4ab fixed 2 problems with css styling :
* some padding for htmleditor to stop label appearing in htmleditor toolbar.
* fix for vertical alignment of input elements
2006-12-01 06:33:23 +00:00
vyshane b725b819da Merged from 1.7. 2006-12-01 05:21:22 +00:00
vyshane 4a5548f928 Merged from 1.7. 2006-12-01 03:46:55 +00:00
vyshane da28afbb3b Merged from 1.7. 2006-12-01 02:40:47 +00:00
skodak 196d8ab1cd MDL-7506 added labels link to input fields on change password form and fixed minor warning 2006-11-30 21:17:03 +00:00
skodak 56909d267f MDL-7749 fixed stripslashes when saving admin configuration values 2006-11-30 20:37:14 +00:00
urs_hunkler 4649ac8436 'added clear:left and a little top distance to the htmlarea in adminsettings. If this works in all places a more general rule for all quickforms should be entered' 2006-11-30 12:12:34 +00:00
skodak 32776fef0e minor xhtml fixes 2006-11-30 09:50:01 +00:00
skodak 7203167d35 minor xhtml fix 2006-11-30 09:32:46 +00:00
skodak 4eb777c2b7 minor xhtml fix 2006-11-30 09:32:02 +00:00
skodak 8ddbd7a6d0 xhtml fix - misplaced tags 2006-11-30 09:28:06 +00:00
ethem d4205253d0 No urlencode 2006-11-30 09:16:43 +00:00
skodak bad545e935 minor xhtml fix 2006-11-30 09:16:36 +00:00
skodak e7e3055e95 minor xhtml fix 2006-11-30 09:04:06 +00:00
skodak 3307d3f65f minor xhtml fix 2006-11-30 08:55:49 +00:00
jamiesensei 67906614ad now using disabledIf method in course/edit 2006-11-30 08:47:52 +00:00
skodak 5157276977 minor xhtml fix 2006-11-30 08:42:11 +00:00
ethem c1cc7fb513 Brushed up a string. 2006-11-30 08:40:29 +00:00
vyshane c45152e346 Editor keyboard shortcuts. MDL-7466. 2006-11-30 08:33:29 +00:00
skodak 93741e6797 MDL-7736 added hidden description of the admin settings search box 2006-11-30 08:33:25 +00:00
skodak f2de62da39 minor xhtml fix 2006-11-30 08:32:30 +00:00
vyshane 195cc7072d New help button for keyboard shortcuts. 2006-11-30 08:31:43 +00:00
vyshane fb08106cfe Added help button for html editor shortcut keys. 2006-11-30 08:30:46 +00:00
toyomoyo 93a501c181 fix for MDL-7496, incorrect is read almost last, need to be said first 2006-11-30 08:27:58 +00:00
vyshane d550d20523 Added string for editorshortcutkeys. 2006-11-30 08:25:22 +00:00
vyshane a88d8eefb8 Help content for html editor shortcuts. 2006-11-30 08:22:52 +00:00
toyomoyo a5fd49611b fix for MDL-7469, changed help icon alt to "helpwiththis" if text is displayed with help icon 2006-11-30 06:03:02 +00:00
toyomoyo 26c65d5f44 changed help, abc to help with abc 2006-11-30 05:55:14 +00:00
skodak d04f52349f MDL-7438 cleaned up groups assign page 2006-11-29 22:32:32 +00:00
skodak 32636f90f6 MDL-7741 missing ? in start php tag 2006-11-29 22:30:54 +00:00
skodak fe4bc84ce1 MDL-7438 cleaned up metacourse children import page 2006-11-29 22:06:48 +00:00
skodak 718269e7f5 returned "Show all" back the the search row 2006-11-29 21:55:31 +00:00
skodak 574558f0e5 minor blog tag edit page cleanup MDL-7438 2006-11-29 21:49:36 +00:00
skodak 6117edc7c1 fix submission and notes edit to use new forms lib MDL-7740 2006-11-29 21:28:38 +00:00
skodak 2495b9a128 fixed addStopFieldsetElements of submitbutton 2006-11-29 20:57:28 +00:00
skodak d6d049718c accessibility cleanup in langimport.php - original patch by Nick Freear MDL-7438 + whitespace and old code cleanup 2006-11-29 20:17:13 +00:00
skodak a85e7029b7 fixed attachment typos 2006-11-29 19:53:21 +00:00
thepurpleblob ee259d0cd1 Category can now be specified in Moodle XML format. 2006-11-29 14:27:48 +00:00
thepurpleblob b39c7aada6 Added ability to specify destination category within GIFT file.
MDL-4163
2006-11-29 13:34:32 +00:00
thepurpleblob 08892d5be5 Fixed a notice. Tidied up format class call a bit. Added provision
for categories to be specified within import files - MDL-4163.
2006-11-29 13:32:00 +00:00
thepurpleblob f5c154078a Merged from STABLE. Addition function to find or create category path.
MDL-4163
2006-11-29 13:29:00 +00:00
thepurpleblob 98de921075 Help files for specifying category within GIFT file. MDL-4163 2006-11-29 13:26:09 +00:00
thepurpleblob 029a3c5224 Added strings for selecting category inside import file. MDL-4163 2006-11-29 13:07:23 +00:00
ethem 0ba9f5d68a + More more more security.
* Don't show login name, password and transaction key at the configuration page.
* RC4Encrypt these fields and move to the config_plugins table from the config table.
* Config page is fully https.
2006-11-29 11:05:56 +00:00
nfreear 0dda92522c Fixing bug in patch for MDL-7721 - missing Search button. Sorry! 2006-11-29 10:16:01 +00:00
toyomoyo c2d341983f undoing damage (hidden text, < > arrows) 2006-11-29 08:57:18 +00:00
toyomoyo 708fbe8819 format/notices 2006-11-29 04:44:00 +00:00
skodak 3108c00b83 added label to group form MDL-7438 2006-11-28 21:55:31 +00:00
skodak b6e5a6e6f0 Role assignment form buttons have no text MDL-7721; original patch by Nick Freear 2006-11-28 21:04:56 +00:00
skodak 2493fc103c ensure that layout table headers are not marked as th, but by label instead MDL-7438
th should be used only for data tables
2006-11-28 19:25:24 +00:00
tjhunt 485349ddf2 MDL-7720 - non-unicode-safe case-insensitive string comparison in shortanswer question type. Merged from MOODLE_17_STABLE. 2006-11-28 18:44:18 +00:00
tjhunt 2962ad61e4 Put back spaces in code that Martin Dougiamass stripped out of the lang strings without thinking about the consequences. Merged from MOODLE_17_STABLE. 2006-11-28 18:42:18 +00:00
nfreear e77718755b Fixing markup: <select ..> was <select ../>, multiple="multiple" and onfocus (was onFocus). 2006-11-28 17:20:41 +00:00
jamiesensei d4b26b9025 migrated mod/exercise/mod.html to formslib 2006-11-28 15:35:22 +00:00
nfreear ce27e6f42f Fix for MDL-6685 (and MDL-7122 "breadcrumb separator missing"). Merged from MOODLE_17_STABLE. 2006-11-28 15:26:40 +00:00
thepurpleblob b0b95fe6fb Merged from STABLE. Fix for MDL-7703. Fixed scope problem by moving all
functions inside the class. Also fixed some notices.
2006-11-28 15:14:37 +00:00
jamiesensei 4c523bed9e small change to formslib css 2006-11-28 15:14:22 +00:00
jamiesensei f88a9e6359 added help file for 'req' icon. 2006-11-28 15:13:16 +00:00
thepurpleblob 85474b2615 Merged from STABLE.
Examview 'SA' type questions now supported.
2006-11-28 11:51:50 +00:00
skodak 5772f71f1c fixed addStopFieldsetElements of submitbutton 2006-11-28 10:55:12 +00:00
skodak b8db24a59c Fix frames accessibility on Hotpot MDL-7468 2006-11-28 10:43:27 +00:00
nfreear 8430912a73 Fixes MDL-7603 <script Language..> should use 'type', user/index.php, course/report/participation/index.php 2006-11-28 10:23:26 +00:00
thepurpleblob a60b5c161f Merged from STABLE. Fixed a typo and a notice 2006-11-28 09:28:33 +00:00
toyomoyo 73ca1421cf fix for MDL-7494, add information to help screen readers deal with cloze questions 2006-11-28 08:53:13 +00:00
skodak d83d000ee3 Place information before controls on upload forms MDL-7491 2006-11-28 08:24:45 +00:00
jamiesensei 2dbd640932 some fixes for disabledIf and using disabledIf in course/edit_form.php 2006-11-28 08:04:00 +00:00
toyomoyo 04d6ac46dd fix for MDL-7497, add mouseless feedback to cloze questions 2006-11-28 07:07:34 +00:00
mark-nielsen 512ce79274 Merged changes from MOODLE_17_STABLE for MDL-7707 2006-11-28 05:54:43 +00:00
mark-nielsen bfec96420b Merged added file from MOODLE_17_STABLE 2006-11-28 03:59:59 +00:00
mark-nielsen ccafdbfe95 Merged differences from MOODLE_17_STABLE 2006-11-28 03:58:36 +00:00
vyshane f2f10676a8 Fix for MDL-7505. 2006-11-28 03:55:30 +00:00
moodler 45aaa939db Automatic installer.php lang files by installer_builder (20061128) 2006-11-28 03:11:54 +00:00
moodler dbe7e6f6b6 Merged better checks for datamodel inclusion from stable 2006-11-28 03:04:50 +00:00
moodler faf01ee4de FIxed problem when scorm->version is bad 2006-11-28 02:53:44 +00:00
toyomoyo 78e4f30a72 fix for MDL-7436, indicate resource type in the text link. 2006-11-28 02:22:17 +00:00
dwoolhead 23ff199c26 MDL-7699 Fixed redirect() to ../../ 2006-11-27 16:42:16 +00:00
jamiesensei 49eacbe328 added check to see if at least two choices have been entered when setting up or updating a choice activity. 2006-11-27 09:02:35 +00:00
skodak 9cdb766d61 Broken handling of magic quotes in admin settings and set_config in general MDL-7668 2006-11-27 08:44:38 +00:00
toyomoyo 5a86df5e9f fix for MDL-7487, addin guser setting for screen reader, MDL-7435, add new field for alt tag for user picture 2006-11-27 07:23:12 +00:00
vyshane 25f19a4c11 Merged from 1.7. 2006-11-27 04:49:09 +00:00
ikawhero 685fcb3e3b Added missing string 2006-11-27 04:03:44 +00:00
vyshane 2f11bfc0a4 Merged from 1.7. 2006-11-27 03:22:28 +00:00
moodler 5bb4bbb380 Automatic installer.php lang files by installer_builder (20061127) 2006-11-27 03:09:48 +00:00
toyomoyo 044beba968 fix for MDL-7486, replace < and > with words for accessiblity 2006-11-27 03:07:01 +00:00
skodak b708f1bf47 MDL-7631 Incorrect grading when Each attempt builds on the last and questions on more than one page 2006-11-26 23:00:28 +00:00
skodak 802fe94a28 Double quotes breaking short answers in a multianswer/cloze question MDL-6676 2006-11-26 21:57:43 +00:00
skodak c66c2c0278 MDL-1899 course->category cleanup 2006-11-26 21:44:04 +00:00
skodak 0591742ecb incorrect table width in Exercise MDL-7690 2006-11-26 21:37:07 +00:00
skodak b38d1d9b66 add risk icons and proper alt text to improve accessibility MDL-7484; icons are not final I hope ;-) 2006-11-26 21:27:35 +00:00
skodak edebb94faa MDL-7434 all images that convey information should have alt text to convey that information - part 8 2006-11-26 19:30:39 +00:00
skodak fa8a9ef352 MDL-7434 all images that convey information should have alt text to convey that information - part 7 2006-11-26 19:19:54 +00:00
skodak aafad5d1a3 MDL-7434 all images that convey information should have alt text to convey that information - part 6 2006-11-26 19:14:44 +00:00
skodak c36f12e145 MDL-7434 all images that convey information should have alt text to convey that information - part 5 2006-11-26 19:00:23 +00:00
skodak a2d9dff8fc MDL-7434 all images that convey information should have alt text to convey that information - part 4 2006-11-26 16:53:32 +00:00
skodak 7150b8ae20 MDL-7434 all images that convey information should have alt text to convey that information - part 3 2006-11-26 16:20:19 +00:00
skodak 2bbaf749c8 MDL-7434 all images that convey information should have alt text to convey that information - part 2 2006-11-25 18:09:33 +00:00
stronk7 d0e35419c5 Typo causing continue button in closed quizzes to fail. MDL-7685
Merged from MOODLE_17_STABLE
2006-11-25 17:13:19 +00:00
moodler 8fe3ab011f Automatic installer.php lang files by installer_builder (20061125) 2006-11-25 03:14:55 +00:00
skodak 344044b28e MDL-7434 all images that convey information should have alt text to convey that information - part 1 2006-11-24 20:16:37 +00:00
tjhunt 536a640218 Minor tweak to fieldset styles. 2006-11-24 18:52:16 +00:00
skodak 241dedf8c9 Fix course overview graph broken by notices MDL-7680 2006-11-24 18:31:41 +00:00
jamiesensei 74e01e6281 changed name of submit buttons to submitbutton instead of sumbit as submit was conflicting with method form.submit() 2006-11-24 16:38:22 +00:00
thepurpleblob be7be57822 Merged from STABLE 2006-11-24 13:03:32 +00:00
jamiesensei 8e308b00c7 little bit of white space cleaning up 2006-11-24 12:49:32 +00:00
jamiesensei 616b549a58 added some phpdoc comments to repeat_elements() method 2006-11-24 12:33:53 +00:00
jamiesensei ebd3c7ac94 added repeat_elements method to moodleform and used method for choice form 2006-11-24 12:20:26 +00:00
thepurpleblob dfdce7fba9 Merged from stable - colons can now be escaped
Resolves MDL-6915
2006-11-24 12:03:42 +00:00
jamiesensei e24b7f851a some restructuring of formslib - moving moodleform_mod definition to new file course\moodleform_mod.php and some changes to moodleform_mod standard elements setup and moodleform disabledIf API 2006-11-24 06:39:15 +00:00
toyomoyo 4d0387400e merged fix for MDL-7448, added enableForm() call to prevent chat lock up 2006-11-24 04:19:11 +00:00
toyomoyo c5d883fcfb merged fixed a warning 2006-11-24 02:04:48 +00:00
skodak 5259d5d8dd Missing s() on current value in admin_setting_configtext class MDL-7666 2006-11-23 20:59:18 +00:00
martinlanghoff f3b205b800 Cleaning up, completing, bugfixing, adding features to iCalendar export of
Moodle calendar.

* Adding strings
* Adding more information to iCalendar output
* Making iCalendar output compatible with a wider range of calender software
* Removing (non-functional) advanced options for now, and other superfluous
code
* Paying attention to all / course events option
* Adding authentication token system to allow subscription
* Adding JavaScript to generate URL for subscription
* Adding links from calendar page

Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2006-11-23 20:30:57 +00:00
martinlanghoff ea18531301 Cleaning up, completing, bugfixing, adding features to iCalendar export of
Moodle calendar.

* Adding strings
* Adding more information to iCalendar output
* Making iCalendar output compatible with a wider range of calender software
* Removing (non-functional) advanced options for now, and other superfluous
code
* Paying attention to all / course events option
* Adding authentication token system to allow subscription
* Adding JavaScript to generate URL for subscription
* Adding links from calendar page

Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2006-11-23 20:21:29 +00:00
skodak dc3306290d Students cannot enrol with PayPal plugin when using PHP4 MDL-7529 2006-11-23 20:16:36 +00:00
ethem 49c81fe0fd We are expecting multiple records, but in debug mode, it gives this error:
Error: Turn off debugging to hide this error.

SELECT id FROM enrol_authorize WHERE userid = '3' AND courseid = '2' AND status=0(with limits 0, 100)

Very strange error in get_record_sql !
2006-11-23 16:22:39 +00:00
nfreear 94181b2c2c Replaced isteacheredit with has_capability, as in moodlelib (Bug MDL-7380 "groups".) 2006-11-23 11:59:25 +00:00
nfreear bff18190d1 Fixes to g...group_displayname, g..grouping_displayname (Bug MDL-7380 "groups".) 2006-11-23 11:40:44 +00:00
nfreear 7cf77becec Fixes for interface change, groups_add_member, remove_member - lib and simpletest/test_groupinglib (Bug MDL-7380 "groups".) 2006-11-23 11:28:22 +00:00
jamiesensei 02f8f37d5d added defaults for when there is no submitted data to datetimeselector and small fix for forum\mod_form.php 2006-11-23 09:38:33 +00:00
moodler f4bf6a5b15 Merged two-line deletes from stable (causing notices) 2006-11-23 09:13:19 +00:00
vyshane d14d739d24 Merged from 1.7. 2006-11-23 08:36:22 +00:00
skodak c80a13c736 added new set_max_file_size method to moodleform MDL-6914 2006-11-23 08:24:58 +00:00
toyomoyo 4c2275d557 fix for MDL-7395, adding capaiblity mod/quiz:ignoretimelimits for quiz takers with disability. 2006-11-23 07:52:54 +00:00
toyomoyo 3a2e0fe97a fix for MDL-7472, explicitly label radio buttons in survey. Note you need $USER->screenreader flag for this to be active 2006-11-23 04:49:48 +00:00
vyshane ec67df2944 Updating YUI to 0.12.0. 2006-11-23 03:27:27 +00:00
vyshane 31cc9c810f Updated YUI libs to 0.12.0. 2006-11-23 03:25:34 +00:00
vyshane d38ed4fba2 Upgraded the YUI libs to version 0.12.0, released 14 Nov 2006. 2006-11-23 03:10:20 +00:00
moodler 6418486c69 Automatic installer.php lang files by installer_builder (20061123) 2006-11-23 03:06:30 +00:00
toyomoyo 5d1a5ef436 incrementing qnum so that questions numbers in multi will be unique 2006-11-23 03:01:16 +00:00
skodak 3acdf94569 Ensure all table headers are marked up with 'th' MDL-7438 2006-11-22 22:41:01 +00:00
skodak 6cb1b93e13 Online text assignment: on re-edit submission page provide a label for field so that screen-reader knows what it is for MDL-7479:
fixed format problems, converted to new forms library, whitespace cleanup, fixed redirection after saving
2006-11-22 21:45:39 +00:00
jamiesensei 7a3d8c602f added dependencies to form 2006-11-22 16:54:12 +00:00
jamiesensei 9403060aac fix for focus problem 2006-11-22 15:58:07 +00:00
jamiesensei abf11956f9 changed method name addDependency to disabledIf and removed data/mod.html 2006-11-22 15:19:20 +00:00
sam_marshall 1aa1044fdc MDL-7656 Changed print_object to escape html 2006-11-22 14:27:42 +00:00
jamiesensei 621c4b7d87 added dependencies to form 2006-11-22 11:09:24 +00:00
skodak 3f3944b2a9 MDL-6914 max upload file size now printed automatically as part of upload label 2006-11-22 09:59:48 +00:00
jamiesensei d01a38cb06 *** empty log message *** 2006-11-22 08:53:35 +00:00
vyshane 4b5c8f24db Merged from 1.7. 2006-11-22 08:26:59 +00:00
ethem 27a9ee2967 Fixed MDL-7642; </li> 2006-11-22 08:16:22 +00:00
skodak 2f8d5316a1 Forums index page, add table headers for section/week MDL-7480
and fixed section_links block for weekscss format
2006-11-22 07:48:35 +00:00
vyshane 607c1bc1c6 Merged from 1.7. 2006-11-22 07:36:41 +00:00
vyshane 22206b6722 Merged from 1.7. 2006-11-22 07:04:41 +00:00
toyomoyo 54dc87b845 adding 2 new fields 1) field for alt tag for user image, 2) field for a flag to tell moodle whehter the user uses a screen reader 2006-11-22 06:50:27 +00:00
toyomoyo f40aee6fd0 fix for MDL-7501, accessiblity of survey questions, duplicating row context 2006-11-22 03:58:00 +00:00
skodak 6fdfb3478c Social activities block always appears in edit mode to admin without turning editing on MDL-7639; merged from MOODLE_17_STABLE 2006-11-21 20:36:06 +00:00
bobopinna b3659259fd Splitted scoes optional data in a new table 2006-11-21 16:12:19 +00:00
jamiesensei 9c03bbaa04 more fixes for lockoptions behaviour; changes to forum/mod_form.php; removed forum/mod.html 2006-11-21 11:02:13 +00:00
jamiesensei 002bd26872 removed redundant return 2006-11-21 10:19:28 +00:00
jamiesensei 57cf1be250 a bug fix for custom element dateselector 2006-11-21 10:18:39 +00:00
jamiesensei 4a2d352a88 oops, removed print_object that was left in from debugging 2006-11-21 10:16:01 +00:00
jamiesensei 0e6303103b fixed a couple of bugs in custom elements 2006-11-21 10:14:38 +00:00
jamiesensei 6e372b2591 added commenting to addDependency method and used new functionality in forum\mod_form.php 2006-11-21 09:33:48 +00:00
jamiesensei 50ef8eb9bd adding lockoptions functionality to formslib library and added lockoptionsall() function which allows multiple dependencies for one dependent element and handles that properly. 2006-11-21 09:17:46 +00:00
toyomoyo c70095e440 using correct string 2006-11-21 06:46:26 +00:00
toyomoyo 5613dbca34 giving some indication a role assignment is a hidden one 2006-11-21 06:42:38 +00:00
toyomoyo 698fa43977 merged, adding capability checks 2006-11-21 05:31:46 +00:00
toyomoyo 1ed33201b1 merged fix for MDL-7426, removed link to teacher.php 2006-11-21 04:45:32 +00:00
vyshane 90ebdf654b Merged from 1.7. 2006-11-21 04:19:01 +00:00
toyomoyo 4827a1d19f merged fix for MDL-7540, wrong usage of context levels 2006-11-21 03:26:31 +00:00
moodler 5b47e13a01 Automatic installer.php lang files by installer_builder (20061121) 2006-11-21 03:13:58 +00:00
toyomoyo b6c59cf796 merged, fixed hard coded auth method "ldap" 2006-11-21 02:08:59 +00:00
skodak 6d3c57f409 Minor problems with roles selection in participants list MDL-7630 2006-11-20 20:47:17 +00:00
tjhunt 115faa2f7b Fix column names. 2006-11-20 17:47:30 +00:00
skodak 022f9b28ff bellow spelling fixed 2006-11-20 17:39:35 +00:00
skodak 54b2c994fd Advanced uploading of file interface typo MDL-7628 2006-11-20 16:56:39 +00:00
tjhunt 123545bc4f MDL-7607 - sync_metacourse is unnecessarily slow 2006-11-20 16:45:24 +00:00
skodak 3733f1e6c4 MDL-6332 fixed proper storing of unicodedb flag - after config table creation 2006-11-20 15:25:38 +00:00
ethem c33e8ec8f7 Daily echeck order notification 2006-11-20 14:48:16 +00:00
skodak 69aaada0f5 fixed problem with apostrophe in role names and description when creating roles during install and restore MDL-7611 2006-11-20 14:08:40 +00:00
ethem dd5f22e2be Help file: Uploading Authorize.net CSV file; Merged from MOODLE_17_STABLE. 2006-11-20 13:52:27 +00:00
skodak 665958c2b9 PARAM_PATH can be used only for relative paths, there is no parameter type for absolute paths that would be compatible with win32 - use PARAM_RAW for now, add file_exists validation later MDL-7617 2006-11-20 13:34:06 +00:00
thepurpleblob 0b3940f85c Various improvements to Examview input.
Fixes MDL-7087 and MDL-7349. Partial fix for MDL-7184 (Examview part)
2006-11-20 13:02:24 +00:00
ethem b9ce223956 Merged from MOODLE_17_STABLE. 2006-11-20 11:19:39 +00:00
skodak 3dc579ad6d removed JS submission from stats code MDL-7492 2006-11-20 10:19:55 +00:00
ethem 78ceee0741 It is time to refund for echeck (business checking). 2006-11-20 10:01:44 +00:00
ethem be09f12192 It is time to refund for echeck (business checking). 2006-11-20 09:49:26 +00:00
skodak 2532baa19e removed JS submission from admin/environment.php MDL-7492 2006-11-20 09:44:11 +00:00
vyshane d2a11d460a Merged from 1.7. 2006-11-20 09:21:27 +00:00
skodak 93bd08c964 removed JS submission from admin/stickyblocks.php MDL-7492 2006-11-20 09:02:41 +00:00
skodak 7f492d7a92 removed JS from admin/course/override.php MDL-7492 2006-11-20 08:34:25 +00:00
toyomoyo 7d0e5a95c3 adding attachment for blogs 2006-11-20 08:31:48 +00:00
skodak 89d30d0230 removed JS from admin/course/assign.php MDL-7492 2006-11-20 08:29:50 +00:00
ethem 98349513b2 Business checkings can be refunded only for echeck method. Not saving nor checking. Merged from 17stable. 2006-11-20 08:11:21 +00:00
toyomoyo d55114512d removed code to ignore site level course teacher assignemnts, since the contexts are separated now 2006-11-20 03:55:35 +00:00
vyshane 07637b9e9d Merged from 1.7. 2006-11-20 02:29:05 +00:00
tjhunt 6a126d3c3f Fix function arguments. 2006-11-19 21:28:15 +00:00
moodler 7c2e5f3863 Automatic installer.php lang files by installer_builder (20061119) 2006-11-19 03:08:18 +00:00
stronk7 c54f0c106a Prevent some false-positives detecting uses of old user_XXX tables.
See http://moodle.org/mod/forum/discuss.php?d=58976

Merged from MOODLE_17_STABLE
2006-11-18 20:28:00 +00:00
stronk7 db9940b605 PHP generated code must use $result instead of $status. MDL-7533
Merged from MOODLE_17_STABLE
2006-11-18 19:08:10 +00:00
gbateson dce744cc05 fix sort order of questions in legend, which caused mismatch between question numbers used in Detailed Statistics report and those used in the legend 2006-11-18 08:55:11 +00:00
moodler b64c6f6f9f Automatic installer.php lang files by installer_builder (20061118) 2006-11-18 03:08:43 +00:00
ethem df90fb983d Bumped version and new rename field upgrading for HEAD. 2006-11-17 17:54:17 +00:00
ethem 4902ed7c2f Changed db column(cclastfour) as refundinfo.
Because this field will be used to refund both cc and echeck.
Business checkings can be refunded, too; so mark as 1 this field for business checkings.
That is; refundinfo: is last four digit for credit cards, business checking for echecks.

Merged from MOODLE_17_STABLE.
2006-11-17 16:06:46 +00:00
ethem dfe254ceab Moved ABA validator and CC validator functions to enrol_form.php 2006-11-17 13:01:04 +00:00
vyshane a66ddf195f Merged from 1.7. 2006-11-17 09:09:25 +00:00
toyomoyo d42c64ba14 fix for MDL-7595, adding coursemanager config variable to determine what roles are displayed on course description page 2006-11-17 08:57:50 +00:00
ethem 8dfaffacfb Some cleanup: Removed enrolment_plugin_authorize->authorizeerror; because, new forms lib handles all errors. 2006-11-17 08:49:08 +00:00
ethem 4df4b15524 Business checks can be refunded. Point a flag for it. The cclastfour field will be renamed to refundinfo later. Merged from 17stable. 2006-11-17 08:21:11 +00:00
vyshane 88c5092a50 Merged from 1.7. 2006-11-17 05:54:21 +00:00
moodler 34941e0727 Merged function rename from stable MDL-7594 2006-11-17 04:02:47 +00:00
moodler ac433e390b Automatic installer.php lang files by installer_builder (20061117) 2006-11-17 03:07:31 +00:00
vyshane 1ca226c130 Merged from 1.7. 2006-11-17 02:58:56 +00:00
moodler 907e0fccf9 Removed B) MDL-7589 2006-11-17 02:12:08 +00:00
tjhunt bdf84aca92 Typo in function name. Merged from MOODLE_17_STABLE. 2006-11-16 16:46:11 +00:00
ethem 1bdf6d2677 <DIV>...</DIV> if other method available. 2006-11-16 16:18:20 +00:00
ethem 4e15f4b9df FIX: MDL-7561
Allow to be chosen the other payment method  if avaiable.
Now, new quick enrol form is ready for usage :)
2006-11-16 14:44:44 +00:00
ethem d948bfdde0 choosemethod is too long for heading, added <br /> 2006-11-16 14:19:52 +00:00
tjhunt f2603dcc89 MDL-7576 - review link does not work after attempt is closed. Thanks to Chad Badiyan for the fix. Merged from MOODLE_17_STABLE. 2006-11-16 12:43:10 +00:00
ethem 3c167c58c1 Show correct string;
Credit card method: Name on card
ECheck: Account owner
2006-11-16 12:38:39 +00:00
ethem 3c07bc5a32 Stop responding on error. 2006-11-16 12:23:40 +00:00
toyomoyo b06334e833 making hidden assignment work with multiple roles 2006-11-16 08:29:25 +00:00
vyshane 73d402efd0 Merged from 1.7. 2006-11-16 05:30:28 +00:00
toyomoyo ae9761ec77 merged, fixed a problem when a user has not visited a course, he is not shown. Changed get_user_roles to take in additional parameter 2006-11-16 05:17:43 +00:00
toyomoyo 91e568534e fix for MDL-7099, do not share user tags (better interface, now using a new text
field with comma separated value). Prevented the same text for both official and
personal tag (tag text is unique). Fixed capability check for removing personal
tags. Changed GUI so that new personal tags will be picked up from the text field.
2006-11-16 03:37:04 +00:00
vyshane 29ca8b882d Merged from 1.7. 2006-11-16 03:28:09 +00:00
vyshane 9e9ac8da37 Merged from 1.7 2006-11-16 02:27:00 +00:00
skodak 37aaf16c92 Response file not uploading when grading student submission when using secureforms MDL-7566; merged from MOODLE_17_STABLE 2006-11-15 20:57:42 +00:00
ethem f5fbea120f Fixed: MDL-7561
New forms api
2006-11-15 20:44:49 +00:00
skodak e3bc106621 remove use of get_String("thischarset") replace it with utf-8 MDL-7570 2006-11-15 20:39:26 +00:00
skodak 70ad6fdbe6 Broken next button when grading assignments MDL-7569; merged from MOODLE_17_STABLE 2006-11-15 19:39:17 +00:00
skodak e517b6dade MDL-6949 fixed enrolment choice in course edit form 2006-11-15 19:06:49 +00:00
tjhunt 84bf852c1b MDL-7428 - Quiz regrade removes student answers from essay questions that have been graded. Merged from MOODLE_16_STABLE. 2006-11-15 17:32:49 +00:00
tjhunt a4d79b0eb5 MDL-7567 Numerical questions occasionally mix up the order of their answers. Merged from MOODLE_16_STABLE. 2006-11-15 16:58:44 +00:00
nfreear 1b091f37c3 PostgreSQL script, based on ../install.sql (Bug MDL-7380 "groups".) 2006-11-15 15:24:30 +00:00
nfreear 06a387cdaa MySQL script, extracted from ../install.sql (Bug MDL-7380 "groups".) 2006-11-15 15:23:56 +00:00
sam_marshall 40d8670956 MDL-7513 Further tweak to the way defaultuser role works to unbreak one possible situation that my previous change just broke 2006-11-15 14:23:43 +00:00
sam_marshall 39dee8f200 MDL-7513 - made it so a hack for Guest role only applies to that role and doesn't remove the course:view capability from other roles at site level when specifically assigned 2006-11-15 13:36:57 +00:00
tjhunt 1492a48f3c MDL-7309 Add error checking to the Quiz DB upgrade script. This should prevent the mysterious failures that some people are seeing when upgrading quizzes from 1.5.x to 1.6.x. Merged from MOODLE_16_STABLE. 2006-11-15 12:59:49 +00:00
nfreear 76f233ad44 Whitespace and $CFG->prefix fix (Bug MDL-7380 "groups".) 2006-11-15 10:23:52 +00:00
vyshane 2a0d551ca5 Merged from 1.7 2006-11-15 08:34:17 +00:00
skodak e08df351e2 Add optional cli only and password protected access to cron.php MDL-7318; idea and patch submitted by Luke Hudson - thanks 2006-11-15 08:29:24 +00:00
toyomoyo 40a2a15f20 separating the site course context and the site context, could be buggy, please report bugs! 2006-11-15 08:23:27 +00:00
vyshane f68a7947bd Merged from 1.7 2006-11-15 08:07:32 +00:00
jamiesensei 373503035f little bit of clean up. removed extra global var and format element helpbutton is now included in element definition. 2006-11-15 07:49:43 +00:00
jamiesensei 5f649aaa79 migrated mod/lesson/mod.html to formslib 2006-11-15 07:44:33 +00:00
jamiesensei 3c7656b4b0 added two new elements button and choosecoursefile which inherits from button
added $supportsgroups bool parameter with default true to give method standard_coursemodule_elements($supportsgroups=true) on moodleform_mod
2006-11-15 07:40:49 +00:00
ethem 19384dfb70 MDL-6937
MDL-7561
MDL-7562

Need to be used new forms api.

Please see also:

* enrol.php: check_entry(), config_form(), process_config()
* localfuncs.php: validate_cc_form(), validate_echeck_form()
2006-11-15 07:39:04 +00:00
jamiesensei f388442b26 added removeOption method to allow removing options from a select drop down 2006-11-15 07:36:00 +00:00
jamiesensei 145dbd7cee added action to redirect back to course page or to url in session var if cancel has been pressed. 2006-11-15 07:34:34 +00:00
jamiesensei f1e6550be2 needed to add the option to pass an element id rather than a name to index.php as the choose parameter. XHTML strict doesn't allow giving a form a name attribute so we use the id of the form element to select the element to return the filename to. We use getElementById to find the element in the document. 2006-11-15 07:26:48 +00:00
toyomoyo 7cf0769e97 reenabling this for site level course, backup/restore/assign roles and so on.
This provides a course context for the site course
2006-11-15 07:17:46 +00:00
toyomoyo 33a893aa2b merged, adding missing fields 2006-11-15 06:28:37 +00:00
toyomoyo e1658dad73 merged, replacing deprecated functions 2006-11-15 06:23:28 +00:00
toyomoyo 3997cb4037 Adding hidden role assignment, currently used in course participants page and print_course function.
Please test.
2006-11-15 04:28:18 +00:00
toyomoyo 4158fd81ce merged fix for MDL-6928, correcting checks for auth_iscreator 2006-11-15 03:40:18 +00:00
vyshane d23157d82f Merged from 1.7 2006-11-15 03:31:28 +00:00
toyomoyo baecd8cd72 dropping studentcanpost in glossary, MDL_7170 2006-11-15 03:15:59 +00:00
toyomoyo 323edd4ba4 fixing indenting 2006-11-15 03:15:06 +00:00
moodler 9e0834fe51 Automatic installer.php lang files by installer_builder (20061115) 2006-11-15 03:12:00 +00:00
vyshane 7fdbbaea87 Merged from 1.7 2006-11-15 02:42:38 +00:00
toyomoyo ced6ca158f fixing alt tag to use capital "More" 2006-11-15 02:10:59 +00:00
skodak 470accb7af use timeupdated field in paypal table MDL-7555 2006-11-14 21:29:57 +00:00
skodak 919da6579c MDL-7536 add proper slashing to data from paypal callback 2006-11-14 21:12:17 +00:00
skodak 934bdbee95 MDL-7535 PayPal communication now fully utf-8 compatible, users must check/fix encoding setting in their PayPal account - see linked docs from PayPal enrolment config page 2006-11-14 20:52:15 +00:00
moodler 2562c1416c Initial commit of gu_utf8 installer file 2006-11-14 19:52:55 +00:00
stronk7 0b02aefb93 while working, it's better to compare with original data (un-slashed)
Merged from MOODLE_17_STABLE
2006-11-14 16:31:33 +00:00
tjhunt f9c92efef3 MDL-7531 Fix SQL that does not work in Oracle. Thanks to Mark Hetherington for the fix. Merged from MOODLE_17_STABLE. 2006-11-14 15:41:20 +00:00
skodak 547e5e7ab0 whitespace fix in PayPal plugin 2006-11-14 09:32:11 +00:00
skodak 5599d142f6 MDL-7838 Fixed wrong Paypal spelling, should be PayPal
MDL-7539 PayPal pay button XHTML compliance
MDL-3137 PayPal acceptace logo displayed on enrollment page
2006-11-14 09:26:22 +00:00
skodak 4849431074 add hooks to paypal plugin to allow testing on www.sandbox.paypal.com MDL-7528 2006-11-14 08:53:39 +00:00
jamiesensei 6b717125f9 changed width of form to 80% -aesthetic change 2006-11-14 06:09:36 +00:00
jamiesensei b2a0cb86d0 migrated journal/mod.html to formslib 2006-11-14 06:01:11 +00:00
jamiesensei ed904dce6d range third parameter doesn't work pre PHP 5.0 removed the use of this. 2006-11-14 05:38:10 +00:00
vyshane 3972629d1f Merged from 1.7 2006-11-14 05:34:38 +00:00
jamiesensei cc935f9174 fix for bug - not seeing standard elements on activity module form on some versions of PHP. 2006-11-14 05:18:39 +00:00
vyshane d4f36e7d2a Merged from 1.7. 2006-11-14 05:04:15 +00:00
vyshane d815886370 Merged from 1.7 2006-11-14 03:07:18 +00:00
jamiesensei 4ea750414e add custom submit button to registry 2006-11-14 03:00:26 +00:00
jamiesensei c65795d341 checking in files for some new custom elements. And added a default help button to the format drop down box. 2006-11-14 02:57:19 +00:00
vyshane 02059f4678 Merged from 1.7 2006-11-14 02:07:59 +00:00
stronk7 b09cba5084 Set Assoc mode always after DB connection. Discovered by MDL-7443
Merged from MOODLE_17_STABLE
2006-11-13 22:59:58 +00:00
stronk7 db15d4375e Fetchmode needs to be explicity set to ASSOC. Plus 1 missing library
added. MDL-7443

Merged from MOODLE_17_STABLE
2006-11-13 22:49:30 +00:00
skodak 8f425a8f72 MDL-7389 paypal plugin reports error when student correctly enrolled; merged from MOODLE_17_STABLE 2006-11-13 22:26:11 +00:00
nfreear 3a7963604f Interface fix in groups_add_member, remove_member - basicgrouplib.php, dbXX.php, test_XX.php (Bug MDL-7380 "groups".) 2006-11-13 16:25:16 +00:00
exe-cutor 574551d9c8 Merged user capabilities fix for 1.7 2006-11-13 11:54:07 +00:00
jamiesensei 630371c03a *** empty log message *** 2006-11-13 09:20:42 +00:00
jamiesensei d982f87978 shifted hidden elements from standard_coursemodule_elements() into standard_hidden_coursemodule_elements() so that they can be included in a form without the other visible standard elements. 2006-11-13 09:18:47 +00:00
ethem cac9c967df Merged from 17stable. 2006-11-13 08:43:16 +00:00
jamiesensei 085cfa7240 removing mod.html migrated to formslib 2006-11-13 07:56:01 +00:00
ethem 43d3fab9ff New feature: Show my payments only for users who has_capability('enrol/authorize:managepayments') 2006-11-13 07:53:32 +00:00
jamiesensei a02c77dc6e glossary form migrated to formslib
and other formslib forms now using $COURSE global
2006-11-13 07:52:01 +00:00
jamiesensei d4fe14d3e4 some changes to setHelpButton methods on elements and MoodleQuickForm to allow non standard help buttons such as the grades pop up window. 2006-11-13 07:43:22 +00:00
vyshane 3d436d5974 Error message to use lang string nopostdiscussion 2006-11-13 07:38:51 +00:00
ethem eb108480aa New feature: Show my payments only for users who has_capability('enrol/authorize:managepayments') 2006-11-13 07:36:58 +00:00
vyshane a4ea3ef30a Merged from 1.7 2006-11-13 07:32:21 +00:00
ikawhero 90a0c73001 Replacing with working image. 2006-11-13 06:26:44 +00:00
toyomoyo aa5a393738 merged fix for MDL-7441, wrong size for roles icon 2006-11-13 05:43:41 +00:00
toyomoyo 1d40c70b43 fix for MDL-7483, add table header to user picture on participants listing 2006-11-13 03:43:12 +00:00
vyshane 9fbccd3907 Merged from 1.7 2006-11-13 03:27:41 +00:00
toyomoyo 0ebb4add79 fix for MDL-7482, adding alt text for messaging controls 2006-11-13 02:41:50 +00:00
toyomoyo 7ee256eed3 fix for MDL-7474, provide alt text for ascending/descending icons in glossary 2006-11-13 02:20:47 +00:00
toyomoyo 8c64b8ade5 fix for MDL-7473, adding alt tag for printer friendly version 2006-11-13 02:07:10 +00:00
skodak c58efbf529 readded file uploads to forum post form, file processing was not updated because it would need a rewrite MDL-6961 2006-11-12 18:36:00 +00:00
ethem b29c7bb2ba Get course before require_login(); Merged from 17stable. 2006-11-12 13:26:14 +00:00
jamiesensei e0f4068409 new element type 'selectyesno' and some clean up to code for modvisible and modgroupmode elements. 2006-11-12 11:30:12 +00:00
jamiesensei d24206d657 fixed problem with select box element for 'forum type' which must sometimes display option which is otherwise unselectable. 2006-11-12 11:07:12 +00:00
skodak 1936c10e54 fixed obsoleted use of course->category to find site course - now used SITEID instead MDL-1899 2006-11-12 08:55:13 +00:00
jamiesensei da1320dab6 added many extra phpdoc style comments to file 2006-11-12 07:28:13 +00:00
moodler d24c8ceae1 Prevent admins from unassigning themselves MDL-7462 2006-11-12 06:12:15 +00:00
moodler 5a0440a0bc Automatic installer.php lang files by installer_builder (20061112) 2006-11-12 03:07:39 +00:00
skodak 810944af7f we are going 100% unicode now - removed use of $CFG->unicodedb and current_charset(); MDL-7439 - part 2, only hotpot and wiki left 2006-11-11 17:23:20 +00:00
skodak fb77310635 we are going 100% unicode now - romoved use of $CFG->unicodedb and current_charset() which is now obsole and always returns UTF-8; MDL-7439 2006-11-11 16:07:53 +00:00
moodler e75d555d35 Automatic installer.php lang files by installer_builder (20061111) 2006-11-11 03:12:18 +00:00
moodler 7e1e693da5 Automatic installer.php lang files by installer_builder (20061110) 2006-11-10 09:52:12 +00:00
toyomoyo 5fdb12fe29 merged, fields should be backed up regardless of whether user data is selected 2006-11-10 04:17:37 +00:00
toyomoyo c3bfe9fea8 merged, fields should be restored regardless of whether user data is to be restored 2006-11-10 04:11:10 +00:00
moodler e328beaee5 Automatic installer.php lang files by installer_builder (20061110) 2006-11-10 03:12:35 +00:00
jamiesensei 535e0ab6c3 migrated mod/forum/mod.html to new formslib 2006-11-10 03:04:34 +00:00
toyomoyo 83ab538806 added check to stop installation in admin/index.php if db is not unicode MDL-6858 2006-11-10 02:42:13 +00:00
toyomoyo 5d4e4271b0 eleminating dbencodingtests (always checked in 1.8 via environment) as 1.8 requires unicode 2006-11-10 02:34:59 +00:00
jamiesensei de5a83bc45 removed extra erroneous help button 2006-11-10 02:23:12 +00:00
jamiesensei df56998ab1 need to pass course as customdata to form definition 2006-11-10 01:27:51 +00:00
skodak 69cd298a27 code improvement in count_courses_notin_metacourse() MDL-7424 - thanks Eloy! 2006-11-09 23:35:06 +00:00
skodak 0e52f01f0e coding style changes MDL-6961 2006-11-09 23:04:55 +00:00
skodak 296c2a79e8 coding style changes MDL-MDL-6956 2006-11-09 22:33:52 +00:00
skodak cffb18cc3b coding style fixes MDL-6954 2006-11-09 22:16:44 +00:00
skodak 396254981f coding style fixes MDL-6949 2006-11-09 22:08:30 +00:00
skodak e24a1f364a coding style fixes MDL-6954 2006-11-09 21:58:12 +00:00
skodak 396169f176 tiny coding style fix 2006-11-09 21:34:14 +00:00
skodak 2378265e51 course/edit.php now uses new forms lib, the old one is gone; please report any problems in MDL-6949 2006-11-09 21:29:31 +00:00
skodak 3d397ee029 fixed metacourse issues in course/edit2.php MDL-6949 2006-11-09 21:22:49 +00:00
skodak 493cde249e Child courses import list empty MDL-7424; added new count_courses_notin_metacourse() function, the old one was kept for BC 2006-11-09 21:12:31 +00:00
jamiesensei 6403e67965 migrated mod/data/mod.html to formslib. Still to add lockoption functionality. 2006-11-09 19:44:20 +00:00
jamiesensei 3cd7940b0c moved the inclusion of mod/{modname}/lib.php to before form definition so that constants in there can be used in form defintion 2006-11-09 19:22:38 +00:00
jamiesensei 264867fdeb add code to redirect to modedit.php from course/mod.php for activities adding / updating using new formslib
migrated chat/mod.html to formslib definition of form is in chat/mod_form.php
2006-11-09 18:25:58 +00:00
jamiesensei e2294b9822 fixes for small bugs in datetimeselector and dateselector and added custom elements to formslib library for standard module forms 2006-11-09 18:08:34 +00:00
skodak 711af2eca3 yet another fix for initialization - keep unset($element) in getValidationScript() for now, need more tweaking later 2006-11-09 11:19:35 +00:00
skodak 0340a80da6 fixed wrong initialization - sorry 2006-11-09 11:16:40 +00:00
skodak 38f394b267 fixed trailing whitespace 2006-11-09 10:43:26 +00:00
skodak 05f5c40c85 added inline docs to moodleform class, minor file upload fix, postprocessing using validation_after_data() also in set_default() method 2006-11-09 10:42:44 +00:00
toyomoyo d471721cd7 adding new role duplicate funcitionality MDL-7392 2006-11-09 09:29:19 +00:00
moodler dae2952a59 Fix throttling capabilities so this works MDL-7414 2006-11-09 09:28:59 +00:00
skodak 49292f8c8d initial support for file uploads in new forms library, docs and minor changes to be done later 2006-11-09 08:38:40 +00:00
toyomoyo 555b75f424 merged category page cleaning - MDL-7409 2006-11-09 06:22:10 +00:00
toyomoyo 7ddf8aa59f adding more checks to make sure 1.8 is unicode only MDL-6332 2006-11-09 04:27:44 +00:00
ikawhero a2c07cfed1 Fixed typo 2006-11-09 03:51:16 +00:00
moodler b6b573e1f7 Merged MDL-7121 from stable (missing header) 2006-11-08 15:30:07 +00:00
nfreear 7fd4d8d0ef Fixes:
- required_param calls - added parameter type.
  - put 'require' first.
  - use @header, added charset.
(Bug MDL-7380 "groups".)
2006-11-08 12:26:17 +00:00
nfreear 1059371053 Fixes:
required_param call - added parameter type;
  set $usehtmleditor variable.
(Bug MDL-7380 "groups".)
2006-11-08 11:12:06 +00:00
moodler 981af8b8e1 Merged guest reply fix for MDL-7393 2006-11-08 09:45:09 +00:00
toyomoyo 89948e4575 merged fix upgrading from 1.6 not redirecting problem 2006-11-08 06:24:05 +00:00
jamiesensei bb40325e1b removed trusttext method from formslib which was unnecessary and revised trusttext use in mod/form/post.php 2006-11-08 06:22:58 +00:00
toyomoyo 507355b107 merged fix for MDL-6788, reformat blog edit page 2006-11-08 05:14:58 +00:00
toyomoyo 60f7d402ef merged fixing wrong default for gradebook roles when upgrading from < 1.7 2006-11-08 02:42:48 +00:00
koenr 89c5cbc525 MDL-7379 typo 2006-11-08 00:02:10 +00:00
nfreear 5326e5473c Fixed $maxbytes warning (Bug MDL-7380 "groups".) 2006-11-07 17:29:14 +00:00
nfreear 9459e87ff1 Interface fix in groups_add_member, remove_member - basicgrouplib.php, dbXX.php, test_XX.php (Bug MDL-7380 "groups".) 2006-11-07 17:15:27 +00:00
nfreear 17801172e9 Fix bugs from unit test, dbsetup.php, groupinglib.php groups_set_default_grouping_settings (Bug MDL-7380 "groups".) 2006-11-07 16:53:15 +00:00
nfreear fc1c3bfcae Fix bugs from unit test, dbsetup.php, groupinglib.php groups_set_default_group_settings (Bug MDL-7380 "groups".) 2006-11-07 16:44:19 +00:00
nfreear edbf03568f Add unit tests for groupinglib.php (Bug MDL-7380 "groups".) 2006-11-07 16:39:12 +00:00
nfreear 98bee88bc9 Fixed object initialisation warnings, db*.php (Bug MDL-7380 "groups".) 2006-11-07 16:14:52 +00:00
nfreear b1ba14f8c0 Fixes from unit test $groupinfo->picture, groups_users_in_common_group (Bug MDL-7380 "groups".) 2006-11-07 16:02:28 +00:00
nfreear d4003bf031 Fixes JS, email 25/10/06 from Juliette (Bug MDL-7380 "groups".) 2006-11-07 15:48:29 +00:00
nfreear 4fa153d43d Add unit tests for basicgrouplib.php (Bug MDL-7380 "groups".) 2006-11-07 15:44:22 +00:00
nfreear e9549320ab Added support for PostgreSQL database. (Bug MDL-7380 "groups".) 2006-11-07 15:17:26 +00:00
nfreear e5cc6173ab Fixed print_string calls - use lang/en_utf8/group.php - was groups.php (Bug MDL-7380 "groups".) 2006-11-07 14:51:01 +00:00
nfreear 99de75d7e2 Initial commit for Bug MDL-7380 "groups" - Juliette White's code. NOTE, for the moment the existing code/tables will be used by default. 2006-11-07 14:46:08 +00:00
nfreear 7ba3e75aac Fixed include-paths, replaced include, include_once with require_once. (Bug MDL-7380 "groups".) 2006-11-07 14:37:32 +00:00
mudrd8mz 6ea1cd02cb Merged fix of MDL-7361 from MOODLE-17-STABLE 2006-11-07 13:35:12 +00:00
moodler 5fb8186a1f Merged MDL-7375 from stable 2006-11-07 12:56:31 +00:00
moodler 5f8deafae6 Merged better mssql check from stable 2006-11-07 12:39:56 +00:00
nfreear 897e026f44 Initial commit for Bug MDL-7380 "groups" - Juliette White's code. NOTE, for the moment the existing code/tables will be used by default. 2006-11-07 11:42:49 +00:00
moodler 814c77c6f6 Merged string fixes from stable 2006-11-07 09:30:55 +00:00
jamiesensei 7f42315c13 whitespace clean up 2006-11-07 09:16:36 +00:00
jamiesensei 8adca237cf following on from last commit to post.php removing redundant post.html and adding post_form.php new formslib form description 2006-11-07 09:08:08 +00:00
skodak a392be33cf new unicode environment check for 1.8 and 1.7 MDL-6332; merged from MOODLE_17_STABLE 2006-11-07 09:07:40 +00:00
toyomoyo f4fc87e1b2 merged fix for MDL-6855 4) changing not null to true for defaultrole 2006-11-07 08:59:57 +00:00
jamiesensei 2b63df96c3 migrated mod/forum/post.php to formslib and fixed a string in course/edit_form.php 2006-11-07 08:48:18 +00:00
moodler 9f7c0b7c22 Tags for dev 2006-11-07 07:24:32 +00:00
toyomoyo d963740dcd merged, fixing wrong comment 2006-11-07 03:14:46 +00:00
moodler 57327fdd19 Automatic installer.php lang files by installer_builder (20061107) 2006-11-07 03:06:41 +00:00
moodler 319ef1a6ea Hide simpletest on oracle and mssql until it works MDL-7337 2006-11-07 02:53:39 +00:00
mjollnir_ d3674ed965 Merged from MOODLE_17_STABLE: fixed the journal upgrade. renaming a null column to not null is unhappy 2006-11-07 00:09:37 +00:00
skodak f97625121d prevent duplicate content in search engines MDL-7299; merged from MOODLE_17_STABLE 2006-11-06 21:49:22 +00:00
koenr 14d6a11d62 MDL-7328 Merged from stable 2006-11-06 21:28:24 +00:00
skodak da5104e60a better param handling SC#331; merged from MOODLE_17_STABLE 2006-11-06 20:35:01 +00:00
moodler 34bf3d4326 Further fix for MDL-7229 ... should work now. 2006-11-06 17:55:32 +00:00
stronk7 0d83d91c88 simple bumb (Sync with 17_STABLE) 2006-11-06 17:44:00 +00:00
stronk7 19e6237552 And, finally, IE is able to display IMS packages properly! B-)
One of the worst to solve bugs in my life! MDL-6417

Merged from MOODLE_17_STABLE
2006-11-06 17:22:13 +00:00
moodler d210e12e85 Merged MDL-7351 from stable 2006-11-06 12:51:27 +00:00
toyomoyo ae79dad8bf merged taking out warning 2006-11-06 08:27:31 +00:00
toyomoyo 2d95f70258 merged, fixing capabilities of block context 2006-11-06 06:16:00 +00:00
toyomoyo dd5e0901d7 merged taking out extra isteacher() 2006-11-06 02:33:13 +00:00
skodak ffbf004fa1 MDL-7176 fixed comment; merged from MOODLE_17_STABLE 2006-11-05 18:28:03 +00:00
moodler 4ff95223ad Merged changes for lang string fixes MDL-7263 2006-11-05 12:59:09 +00:00
moodler 397ebf4ef4 Merged MDL-7266 from stable. Thanks, Dan! 2006-11-05 12:27:12 +00:00
stronk7 3eda2b3a7e modify_database() will show the deprecated debugging after 2006101007
(Moodle 1.7 release version) MDL-5919
2006-11-05 09:45:19 +00:00
moodler f5bf7ea86a Merged reply link fix from stable 2006-11-05 09:35:01 +00:00
moodler 82b37f12e2 Merge loginas fix for site level 2006-11-05 06:46:20 +00:00
moodler 0287d6b339 Automatic installer.php lang files by installer_builder (20061105) 2006-11-05 03:11:40 +00:00
stronk7 981b3ae06f Now GD is checked before displaying course overview graphs. MDL-7204
Merged from MOODLE_17_STABLE
2006-11-04 23:30:29 +00:00
wildgirl 7fb0bc8abb MDL-6474 fix 2006-11-04 21:56:42 +00:00
stronk7 6c279afaef Now all the get_records() functions support only one field
to be specified in the SELECT clause. Not needed anymore to
write double "SELECT id, id..." queries. Results returned
follow exactly the same structure than normal recordsets
(first field = key) MDL-5877

Merged from MOODLE_17_STABLE
2006-11-04 17:01:34 +00:00
stronk7 bb5b7329bb Deprecating modify_database(). It shows debugging info
if release > 2006101004 (Beta2 +01) MDL-5919

Merged from MOODLE_17_STABLE
2006-11-04 16:22:49 +00:00
sam_marshall 2af5513789 MDL-7346 Changed enablerecordcache to be a limit for the size of cache, not just an on/off switch. 2006-11-03 17:29:15 +00:00
sam_marshall e3eb61244d MDL-7344 Change 'import child course' timeout to 180 seconds per course because role creation takes a while for thousands of users. (Merge from STABLE) 2006-11-03 14:39:19 +00:00
ethem 8174990c49 Show site name at top when selecting courses. 2006-11-03 12:36:52 +00:00
ethem 3baecd1d7e Get payment managers at COURSE level. Merged from 17stable. 2006-11-03 12:09:00 +00:00
ethem 726bf1ead2 get_teacher() to get_users_by_capability(). 2006-11-03 11:20:13 +00:00
toyomoyo e22482a73e fix for MDL-7300, mssql not null problem 2006-11-03 08:46:50 +00:00
moodler 1fcf39350b Merged blog select fix from stable 2006-11-03 08:43:54 +00:00
toyomoyo 3c8b7289d9 merged fox for MDL-7300, mssql error on group creation 2006-11-03 08:18:29 +00:00
toyomoyo 45ff09e49c merged fix for MDL-7031, removing control tags from add template 2006-11-03 03:27:10 +00:00
moodler a1da4b7cac Automatic installer.php lang files by installer_builder (20061103) 2006-11-03 03:01:19 +00:00
stronk7 49173d25a7 Ending fied/key/index PHP generators
Merged from MOODLE_17_STABLE
2006-11-02 23:09:39 +00:00
stronk7 ef856b2d52 Enablig rename_table() PHP generator
Merged from MOODLE_17_STABLE
2006-11-02 22:44:29 +00:00
ethem e40106c7db Fix for enrolurl(admin/users.php). Merged from 17stable. 2006-11-02 13:34:52 +00:00
toyomoyo b82fcee12a merged fix for MDL-6721 wiki broken for SPG 2006-11-02 08:50:52 +00:00
moodler 71483894b2 Petr's patch for MDL-7327 to modify require_capability login a bit (merged from stable) 2006-11-02 08:12:54 +00:00
toyomoyo 2753336a80 merged fixing paging bar problem 2006-11-02 05:54:01 +00:00
toyomoyo 649ee916d1 merged fix for MDL-7140 duplicate course name in header 2006-11-02 03:17:44 +00:00
moodler 30a5512df3 Automatic installer.php lang files by installer_builder (20061102) 2006-11-02 03:01:16 +00:00
toyomoyo 5169310847 merged fix for MDL-7112 select distinct on text field 2006-11-02 02:17:39 +00:00
toyomoyo 0b9873f2a5 merged fix for MDL_7112 select distinct on text fields 2006-11-02 02:10:53 +00:00
toyomoyo 82749af726 merged fix for MDL-7112 select distinct on text field 2006-11-02 02:02:41 +00:00
skodak a015506a14 hack for problems with concurrent use of $nomoodlecookie and capabilities in RSS feeds, see MDL-7243 - it should be replaced once we get to codes in urls; merged from MOODLE_17_STABLE 2006-11-01 21:03:09 +00:00
ethem af3e0ed2ea Make authorize.net config page secure.
See: http://moodle.org/mod/forum/discuss.php?d=56728
2006-11-01 12:36:19 +00:00
stronk7 720c5ef843 in/on/at too many ways to say "en" in Spanish. :-P
Merged from MOODLE_17_STABLE
2006-11-01 11:52:13 +00:00
moodler 304d08f0c4 Merged tidy-ups from stable 2006-11-01 09:44:01 +00:00
moodler 6dfb22349f An untested patch for MDL-7211 to fix firstclass hole (merged from stable) 2006-11-01 06:54:47 +00:00
moodler 7f094149b3 Fixed SQL for Oracle (forum searching) MDL-7317 2006-11-01 06:29:52 +00:00
toyomoyo c768b61057 merged fix for MDL-6928, LDAP course creation error 2006-11-01 03:51:04 +00:00
toyomoyo ccda44599a merged fix for restore support of user data from backups pre granular backup 2006-11-01 03:32:04 +00:00
skodak a3fd474190 fixed notice during restore; merged from MOODLE_17_STABLE 2006-10-31 22:46:41 +00:00
skodak 78675b3e3e Fix errors in quiz overview download MDL-7316; merged from MOODLE_17_STABLE 2006-10-31 22:19:15 +00:00
skodak d927bb5553 fixed incorrect use of require_capability() in lesson mod MDL-7314; merged from MOODLE_17_STABLE 2006-10-31 22:02:49 +00:00
skodak 7aa3e196a3 fixed gradebookroles cfg default value MDL-7253; merged from MOODLE_17_STABLE 2006-10-31 21:52:22 +00:00
skodak 80aede31d3 fixed capabilities in chat recent activity, removed broken optimization from message insert, fixed closing of box MDL-7313; merged from MOODLE_17_STABLE 2006-10-31 21:07:00 +00:00
stronk7 6f4bdb9c9b Prevent +/- operators (REGEXP) on glossary searches for MSSQL and Oracle. MDL-7312
Merged from MOODLE_17_STABLE
2006-10-31 20:34:12 +00:00
skodak b4a1805ab0 fixed group related typo in has_capability(); merged from MOODLE_17_STABLE 2006-10-31 20:24:57 +00:00
stronk7 6bb4875f35 Prevent +/- operators (REGEXP) on messages search. MDL-7312
Merged from MOODLE_17_STABLE
2006-10-31 20:22:10 +00:00
stronk7 7b3cf45951 Transform TOKEN searches into STRING searches and trim +- chars. MDL-7312
Merged from MOODLE_17_STABLE
2006-10-31 20:17:03 +00:00
stronk7 6bb0f67f53 Prevent +/- operators (REGEXP) on course searches for MSSQL and Oracle. MDL-7312
Merged from MOODLE_17_STABLE
2006-10-31 19:54:46 +00:00
skodak 97faae5833 Commented out session dump in user profile when in debug mode MDL-7311; merged from MOODLE_17_STABLE 2006-10-31 19:32:20 +00:00
ethem 7bb8485d6e Show notice at bottom. 2006-10-31 19:24:10 +00:00
stronk7 96caf38df2 Fixed searches, list of results and simplified SQL logic. All
those while trying to fix one LCASE() use. MDL-7310

Merged from MOODLE_17_STABLE
2006-10-31 19:17:19 +00:00
danmarsden a337045d86 merged choice fix from Stable MDL-7171 2006-10-31 19:00:55 +00:00
stronk7 42a2f77693 Now wiki supports Unicode searches
Merged from MOODLE_17_STABLE
2006-10-31 17:51:12 +00:00
tjhunt 9c23d3e8d6 Improved help file as per Ralf Hilgenstock's suggestion: http://moodle.org/mod/forum/discuss.php?d=57400. Merged from MOODLE_17_STABLE. 2006-10-31 15:13:47 +00:00
moodler f9c471dfd9 Merged MDL-7150 fixes (don't try to show grades when there aren't any) 2006-10-31 15:08:22 +00:00
moodler f440589b77 Merged fix from MDL-7239 2006-10-31 14:08:17 +00:00
tjhunt ee6c93555f MDL-5811 - Quiz editing outputs nasty junk before print_header sometimes. Second attempt at fixing. I forgot to mention the bug number in the previous commit to mod/quiz/edit.php. Merged from MOODLE_17_STABLE. 2006-10-31 12:06:52 +00:00
tjhunt dfa924cc99 Make the close_window function better. Merged from MOODLE_17_STABLE. 2006-10-31 11:59:54 +00:00
tjhunt d84d379e97 Fix junk being output before print_header, which happened sometimes. Merged from MOODLE_17_STABLE. 2006-10-31 10:47:34 +00:00
tjhunt d48b2c3f32 Add return option to notify(). Merged from MOODLE_17_STABLE. 2006-10-31 10:47:26 +00:00
skodak 3c0f610636 Change name when file name contains more of a point MDL-6897 - patch submitted by Toni Mas; merged from MOODLE_17_STABLE 2006-10-31 10:16:26 +00:00
moodler 1a1f496681 Merged MDL-6975 from stable 2006-10-31 09:15:47 +00:00
skodak 5a8ab2e9df adding of user events into calendar and posting of blogs is now enabled by default - MDL-7297 and MDL-7245; merged from MOODLE_17_STABLE 2006-10-31 09:09:40 +00:00
moodler 8c95ea4a84 Merged note about guest exception from stable 2006-10-31 09:00:42 +00:00
toyomoyo 47b87873e0 merged fix for MDL-7302, tagid lost when turning editting on and off 2006-10-31 08:50:55 +00:00
moodler 8c900bc3b0 Merged documentation for Roles from stable MDL-6923 2006-10-31 08:14:36 +00:00
toyomoyo 95f7634d4d merged removing evil semicolon 2006-10-31 07:34:03 +00:00
martinlanghoff e7812e9c62 lib/textlib.class: Cache dir is now created correctly, allowing speed increase (SR# 595)
Previous logic had dir created only when mbstring wasn't used, but the
typo3 lib needs to cache some data regardless, for the specCharsToASCII
function, which uses internal translation tables.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-10-31 05:03:54 +00:00
moodler 459e27f3a0 Killed infinite loop when upgrading teachers! (merge from stable) 2006-10-31 04:38:39 +00:00
moodler 23f5ee25aa Merge participant count from stable 2006-10-31 01:21:48 +00:00
stronk7 6df56bc473 Oracle optimization. Texts under 4000cc can be handled directly as varchar2,
so they don't need the 2-phase (insert/update) handling of LOBs

Merged from MOODLE_17_STABLE
2006-10-30 23:13:48 +00:00
stronk7 18fcece954 Fixed one bug on Oracle produced when we were inserting
records with returnid disabled and containing LOBs

Merged from MOODLE_17_STABLE
2006-10-30 22:59:49 +00:00
skodak 695e03f00a Adding of calendar events broken MDL-7297; merged from MOODLE_17_STABLE 2006-10-30 22:33:45 +00:00
skodak 4a58a22806 fixed double enableajax in previous commit MDL-7296; merged from MOODLE_17_STABLE 2006-10-30 21:04:04 +00:00
skodak 721d74b02c Disabled global search by default and marked as experimental MDL-7296 and AJAX moved to experimental too; merged from MOODLE_17_STABLE 2006-10-30 21:01:47 +00:00
stronk7 8b497bbce3 Prevent Oracle to fail when inserting records with log->info empty
(will be solved once we got all those NOT NULL fields fixed)

Merged from MOODLE_17_STABLE
2006-10-30 19:53:40 +00:00
stronk7 8451166cfb Fixing display of pivots when they are author names
Merged from MOODLE_17_STABLE
2006-10-30 19:32:44 +00:00
stronk7 e24d96baf6 Fixing some queries with duplicate column names. MDL-7294
Merged from MOODLE_17_STABLE
2006-10-30 19:02:58 +00:00
stronk7 2cb3ab13f7 Now glossary is using the proper sql_substr() function
Merged from MOODLE_17_STABLE
2006-10-30 18:34:21 +00:00
stronk7 06edab84e1 New function sql_substr() returns the proper substr() function for each DB
Merged from MOODLE_17_STABLE
2006-10-30 18:31:08 +00:00
stronk7 0db568393d Now lcase() and ucase() are out from glossary 2006-10-30 18:01:10 +00:00
stronk7 a91960b30f sql_as() is deprecated. Column aliases ALWAYS must use the AS keyword.
Merged from MOODLE_17_STABLE
2006-10-30 17:46:37 +00:00
stronk7 db3df7266a Deprecating sql_as (now the AS keyword is required in COLUMN aliases)
Merged from MOODLE_17_STABLE
2006-10-30 17:41:55 +00:00
stronk7 83a4eaa55a Updating wood to show the nav-bar properly.
Merged from MOODLE_17_STABLE
2006-10-30 16:55:17 +00:00
tjhunt 99aa18808f Make General feedback more tolerant of whitespace. Merged from MOODLE_17_STABLE. 2006-10-30 16:35:53 +00:00
thepurpleblob 06968068e9 fixed a notice 2006-10-30 16:22:58 +00:00
stronk7 4a575a6570 Added enablerecordcache setting to control the get_record() cache.
Note that some parts of Moodle can enable/disable it selectively.

Merged from MOODLE_17_STABLE
2006-10-30 15:58:46 +00:00
stronk7 7bcd11c137 Added some strings for the enablerecordcache setting.
Merged from MOODLE_17_STABLE
2006-10-30 15:54:10 +00:00
skodak c517c8f779 Wrong "settings" link in course Administration block on module pages MDL-7286; merged from MOODLE_17_STABLE 2006-10-30 14:58:09 +00:00
ethem 325d15409b If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
   In this case, you need to obtain an authorization code from user's bank.
   Initially, ask for credit card information from the customer
   like bank name, name on card, card number, expiry date and card validation code
   by means of phone, face-to-face or a billing application.
   Then, call the customer services of user's bank giving this information and demand an authorization code.
   Finally, after obtaining it, login as user to get the user enrolled.
   Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 13:07:20 +00:00
ethem c9befcd1be If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
   In this case, you need to obtain an authorization code from user's bank.
   Initially, ask for credit card information from the customer
   like bank name, name on card, card number, expiry date and card validation code
   by means of phone, face-to-face or a billing application.
   Then, call the customer services of user's bank giving this information and demand an authorization code.
   Finally, after obtaining it, login as user to get the user enrolled.
   Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 12:53:15 +00:00
skodak 714986dc40 Journal Module fixes fro 1.7 MDL-7159; merged from MOODLE_17_STABLE 2006-10-30 11:16:27 +00:00
ethem 2c46669ba1 New string: All Pending Orders 2006-10-30 11:16:09 +00:00
sam_marshall 82928b7954 [MDL-7287] Lesson - tweaked continue.php to include a file via filesystem not HTTP because I couldn't see any reason to do it the latter way and it breaks under our loadbalancing system 2006-10-30 11:02:08 +00:00
ethem 2760b4f4cc Show a link for echeck payments if an user has_capability('enrol/authorize:uploadcsv'). 2006-10-30 10:12:20 +00:00
moodler 75c3849a9e Merged drag class fixes from stable 2006-10-30 09:41:55 +00:00
gbateson 97a313023d correct the setting the fixed flag in JMatch quizzes 2006-10-30 08:55:35 +00:00
moodler e2850d158f SOme misc foxes to installing (fixed icons, removed test that broke etc)
that I did some time ago and never checked in
2006-10-30 08:47:55 +00:00
toyomoyo 3fae9f5718 merged fixed gradebookroles settings 2006-10-30 08:44:53 +00:00
ethem bf228101fd Get only courses made transactions. This lessens the course list; Merged from 17stable. 2006-10-30 08:33:00 +00:00
moodler 7ca163ba21 Merged AJAX GUI fixes from stable 2006-10-30 08:21:51 +00:00
moodler 49e5fe4733 Merged fixed typo 2006-10-30 07:56:39 +00:00
moodler 479afa41ec Merged ajax fix for MDL-7281 2006-10-30 07:48:02 +00:00
toyomoyo 39474844cb merged, do not remove context information when deleting the site course 2006-10-30 06:34:14 +00:00
jamiesensei 5c52df6797 changed focus when there is no error in the page to the first element in a form rather than no focus. 2006-10-30 06:27:15 +00:00
toyomoyo 0d6f531d8f merged fixing progress count 2006-10-30 05:40:46 +00:00
toyomoyo b6d9f011e2 merged, ignore site level course teacher assignments when upgrading from 1.6 or below 2006-10-30 05:26:59 +00:00
moodler 8a2cb2fa8d Merge better gradebookroles default from stable 2006-10-30 03:57:08 +00:00
toyomoyo 7f7d506381 merged fix for MDL-6895, adding optional param 2006-10-30 03:48:08 +00:00
toyomoyo 1d4d001cfd merged fix for MDL-7267, fixing keywords pivot 2006-10-30 03:38:13 +00:00
moodler 43bd99528d Automatic installer.php lang files by installer_builder (20061030) 2006-10-30 03:03:00 +00:00
moodler 5cc411ee1c Merged metal fixes from stable 2006-10-30 03:01:49 +00:00
koenr 1bfb0c61b7 MDL-6864 The links 'Language editing' could be more descriptive 2006-10-29 22:28:17 +00:00
koenr 7c79bbc59e MDL-7042 Missing string on admin/roles/manage.php 2006-10-29 21:54:56 +00:00
moodler 6605128ef8 Merged fixes for not-logged-in users from stable 2006-10-29 15:58:21 +00:00
moodler 0909d44eac Merged fixes for gradebookroles from stable MDL-7253 2006-10-29 15:02:45 +00:00
moodler 33951ee4f6 Merged missing langimport string from stable MDL-7258 2006-10-29 13:58:03 +00:00
moodler a2af00edf1 Merged fix for MDL-7248 from stable 2006-10-29 13:31:27 +00:00
jamiesensei cd9f129f81 added help button for format drop down 2006-10-29 10:19:48 +00:00
moodler 4505a8b762 Merged new help links from stable 2006-10-29 08:14:30 +00:00
moodler c867a1ad08 A small help file for permissions 2006-10-29 08:07:16 +00:00
moodler 669f2499a7 Merged some performance improvements from stable 2006-10-29 07:23:57 +00:00
moodler 499e78b4fd Merged user profile improvements from stable 2006-10-29 04:21:23 +00:00
moodler 6e150eb0f5 Make registration code a bit more unique 2006-10-29 02:31:53 +00:00
stronk7 8b755329fa Adding PIVOT as MSSQL reserved word
Merged from MOODLE_17_STABLE
2006-10-28 23:13:26 +00:00
skodak eebc919280 MDL-6940 - I decided to rewrite the glossary comments UI, the original code (pre 1.8) was not nice at all, it is IMHO more readable now and the forms implementation could be greatly simplified; this can also serve as sample trusttext implementation outside of forms code 2006-10-28 21:55:19 +00:00
stronk7 b716e2e069 Now record_cache is controlled by $CFG->enablerecordcache
Merged from MOODLE_17_STABLE
2006-10-28 19:56:34 +00:00
stronk7 2fd40f8cbe Moved cache cleaning code near the begin of functions. Sometimes
it wasnt' executed due to function ending. MDL-7196

Merged from MOODLE_17_STABLE
2006-10-28 17:53:00 +00:00
stronk7 0163b1d098 Adding one unmerged change from 17_STABLE. Was breaking some things... 2006-10-28 16:50:28 +00:00
stronk7 dddf32590f Dropping xmldb_dbg($message). Now it has been replaced by a new cleaner
debug system, with XMLDB hook for debug enabled by the creation of one
function called: xmldb_debug($message, $object), currently present in
lib/datalib.php MDL-7261
2006-10-28 15:24:04 +00:00
stronk7 62d4e774a3 New xmldb_debug($message, $object) added. It's the official hook
provided by XMLDB's debug() function. MDL-7261
2006-10-28 15:20:14 +00:00
stronk7 5bbe483102 Now, on error, the new XMLDB->debug($msg) function is called.
It provides the facility to hook to one external function, if
available: xmldb_debug($message, $xmldb_object) to perform
custom debugging/logging. MDL-7261
2006-10-28 15:18:40 +00:00
stronk7 23357d060b Update to 1.8dev 2006-10-28 11:02:54 +00:00
stronk7 d5c9d49be3 Fix main install.xml file. It was preventing HEAD installation. MDL-7262 2006-10-28 10:47:19 +00:00
stronk7 93f98abdb9 Improve error output of install_from_xmldb_file(). Part of MDL-7262
Merged from MOODLE_17_STABLE
2006-10-28 10:37:54 +00:00
moodler 68513b30de Automatic installer.php lang files by installer_builder (20061028) 2006-10-28 03:08:14 +00:00
skodak 3784137ef1 fix loginsteps string in moodle.php MDL-7249; merged from MOODLE_17_STABLE 2006-10-27 21:48:54 +00:00
skodak fbb8e0c7b6 Blog RSS is not being generated MDL-7256; merged from MOODLE_17_STABLE 2006-10-27 21:42:50 +00:00
skodak 73afaf5b69 Finish strings for graderoles MDL-7253; merged from MOODLE_17_STABLE 2006-10-27 21:07:18 +00:00
skodak 7b9c99798c Turn AJAX off for now at site level MDL-7254; merged from MOODLE_17_STABLE 2006-10-27 20:34:40 +00:00
stronk7 4bfb64aad2 Counting extra updates performed by Oracle & MSSQL in PERF 2006-10-27 17:49:25 +00:00
stronk7 068744a7a5 I forgot to globalize $record_cache in delete_record_XXX() functions.
Merged from MOODLE_17_STABLE
2006-10-27 17:14:58 +00:00
stronk7 9d98635b5e Minor improvements to the get_record() cache. Part of MDL-7196
1) Check the cache issset() before unset() it.
2) In the set_field() function, if fieldX = 'id',
   just delete such element from the cache,
   else the whole table
3) Add some more unset() operations against the cache in
   the delete_xxxx() dmllib functions.

Merged from MOODLE_17_STABLE
2006-10-27 16:56:34 +00:00
moodler 72f383b18c Merged blog RSS fix MDL-7251 2006-10-27 16:28:20 +00:00
sam_marshall 62eb0371dc MDL-7250 merged from stable 2006-10-27 16:27:28 +00:00
bobopinna 90e1b39acd Fixed a problem with TIMESPAN pattern matching 2006-10-27 08:04:15 +00:00
skodak bdeae2b9b8 Comments in data print the "by" and then the date but no username MDL-7235; merged from MOODLE_17_STABLE 2006-10-27 07:50:28 +00:00
bobopinna 4c2095defe Added support to adl.nav (Sequencing is needed to complete) 2006-10-27 06:51:25 +00:00
toyomoyo 4bda5c717c merged, taking care of a warning 2006-10-27 02:15:02 +00:00
gbateson c81aa39f92 fix detection and display of fixed items in JMatch (jmt file) 2006-10-27 00:53:24 +00:00
stronk7 5d0fc5c33d Deprecating old "upgrade" files. MDL-7214
Merged from MOODLE_17_STABLE
2006-10-26 22:46:02 +00:00
stronk7 3aac1dc9a0 Deprecating old "upgrade" files. MDL-7214
Merged from MOODLE_17_STABLE
2006-10-26 22:39:10 +00:00
skodak 276916a4bc fixed whitespace merge 2006-10-26 20:08:52 +00:00
stronk7 dfdd533230 New upgrade.php file added for this module. MDL-7214 2006-10-26 18:12:42 +00:00
stronk7 b8a342d7ac New upgrade.php file added for this module. MDL-7214 2006-10-26 17:33:40 +00:00
stronk7 19606d8bd5 New upgrade.php file added for this module. MDL-7214 2006-10-26 17:02:31 +00:00
stronk7 d7a7184730 New upgrade.php file added for this module. MDL-7214 2006-10-26 16:33:49 +00:00
stronk7 cff74cb145 New upgrade.php file added for this module. MDL-7214 2006-10-26 15:38:18 +00:00
moodler 2f32eed1ea Merged fixes from stable for MDL-7229 (opentogoogle capabilities) 2006-10-26 14:55:45 +00:00
ethem 63693fd835 I found a new function: user_has_role_assignment(). Merged from MOODLE_17_STABLE. 2006-10-26 14:44:53 +00:00
sam_marshall 8bcf97e1f9 The 'Activity is currently hidden' check in mod/forum/post.php incorrectly used 'manageactivities' capability instead of 'viewhiddenactivities', fixing. 2006-10-26 14:15:46 +00:00
bobopinna 23fee00632 Added link in sco title for launch the sco in browse mode 2006-10-26 11:18:00 +00:00
bobopinna 2aaf134c02 Added Write Once Error reveal 2006-10-26 11:14:47 +00:00
ikawhero 74807b43f3 Adding extra param fields to the user_info_field table to allow field type
plugins to store data. Plus a description field.
2006-10-26 11:07:25 +00:00
skodak 33a6f9a814 fixed breadcrums link; merged from MOODLE_17_STABLE 2006-10-26 10:34:03 +00:00
moodler 922633bd28 Merged from stable
Added a top-level cache to has_capability() to make it perform better
in cases where it's called a lot with repetitive values (which happens
a lot in things like forum mailouts) with only a small memory cost.
2006-10-26 09:43:58 +00:00
skodak 58e8f85ba6 Cron.php workaround for IE & RFC2616 - MDL-7221; merged from MOODLE_17_STABLE 2006-10-26 08:55:56 +00:00
ethem 009a965863 get_courses() is only getting visible courses. This is a problem when an user wants to view old payments. 2006-10-26 08:41:02 +00:00
jamiesensei c3c5f0bd86 migrated comment.php over to using new formslib. 2006-10-26 07:59:22 +00:00
moodler 92309430b8 Merged get_record caching from MDL-7196 in stable (thanks sam!) 2006-10-26 07:57:07 +00:00
vyshane 4e86c6d735 Merged from 1.7. 2006-10-26 07:46:22 +00:00
vyshane c0a35ad61e Merged from 1.7 2006-10-26 07:45:00 +00:00
jamiesensei effa85f482 added new form element class 'format' for adding format drop down box to forms. 2006-10-26 07:02:20 +00:00
martinlanghoff 7ca774ad51 lib/locallib: changed local db upgrades now xmldb friendly (like lib/db)
Author: Jonathan Harker <jonathan@catalyst.net.nz>
2006-10-26 04:18:23 +00:00
toyomoyo efb5888416 merged, fixing a bug where context with an override and assignment is adding up capability 2006-10-26 03:57:34 +00:00
moodler 266c9622a6 Automatic installer.php lang files by installer_builder (20061026) 2006-10-26 03:17:36 +00:00
stronk7 ecfeb03a72 First model of new upgrade.php scripts and comments in old ones.
Need validation before extending them everywhere across core. MDL-7214

Merged from MOODLE_17_STABLE
2006-10-25 23:29:44 +00:00
skodak 90bbe68955 MDL-7190 fixed wrong closing ) in cache md5 calculation, sorry! merged from MOODLE_17_STABLE 2006-10-25 23:18:40 +00:00
skodak d03a6500c4 MDL-7137 permission UI improvements merged into role overrides; s() used instead of htmlentities(); merged from MOODLE_17_STABLE 2006-10-25 21:20:56 +00:00
skodak a242baa0e3 editting of permissions enabled when adding new role MDL-7137; merged from MOODLE_17_STABLE 2006-10-25 19:21:46 +00:00
moodler f274fe073c Merged AS keyword fixes from stable MDL-7207 2006-10-25 09:04:25 +00:00
moodler 3d81c41e2e Merged fixes for AS keywords MDL-7207 2006-10-25 08:51:32 +00:00
toyomoyo 5a412dbf8f merged, added new config variables to control what roles get shown in the grade book 2006-10-25 08:51:26 +00:00
moodler 21c9bace87 Merged some recent changes from stable 2006-10-25 08:38:14 +00:00
skodak 8af16e43bc fixed add new blog entry and tag edit in blog block; merged from MOODLE_17_STABLE 2006-10-25 08:17:44 +00:00
toyomoyo 2851ba9b67 merged, using limited fields instead of u.* 2006-10-25 07:20:28 +00:00
moodler dd83687833 Make CAS work MDL-6931 2006-10-25 05:51:18 +00:00
martinlanghoff ba3f3a258b auth/fc/config.html: cleanup double newlines (leftover from whitespace cleanup) 2006-10-25 05:28:35 +00:00
toyomoyo 9fccc08003 fix in load_user_capability() merged when 2 contexts in overrides are not related 2006-10-25 03:47:59 +00:00
skodak 45155244af better cleaning of rss feeds SC#328; merged from MOODLE_17_STABLE 2006-10-24 22:40:07 +00:00
skodak d53ca6ad40 Strip ##TRUSTTEXT## when not in developer debug mode MDL-7190; minor format_text speedup; changed in md5 text cache calculation; merged from MOODLE_17_STABLE 2006-10-24 22:19:41 +00:00
stronk7 0217757b09 DeLIMITing Moodle core. Now the new $limitfrom,
$limitnum parameters are used instead. MDL-7168

Merged from MOODLE_17_STABLE
2006-10-24 22:00:29 +00:00
skodak 72f9446056 select_color.php popup should specify charset MDL-7193; patch by Hiroto Kagotani; merged from MOODLE_17_STABLE 2006-10-24 21:39:43 +00:00
skodak 8d2752e04b Lang file for auth specifies incorrect file path in lang/en_utf8/auth.php MDL-7205 revisited - new patch by Martin Langhoff; merged from MOODLE_17_STABLE 2006-10-24 21:30:25 +00:00
skodak ec7b71baeb Lang file for auth specifies incorrect file path in lang/en_utf8/auth.php MDL-7205 - found by Inaki Arenaza; merged from MOODLE_17_STABLE 2006-10-24 20:50:09 +00:00
skodak 00e12c7332 fixed When unassigning a role, forum_role_unassign unsubscribes the user even if you have other roles there MDL-7120; merged from MOODLE_17_STABLE 2006-10-24 20:22:30 +00:00
stronk7 5fd4e46dbd Dropping some hardocded "mdl" prefixes. MDL-7202
Merged from MOODLE_17_STABLE
2006-10-24 18:29:34 +00:00
moodler bf553d9e85 Allow autologin as guest when viewing discussions (come in via link, say) 2006-10-24 15:58:34 +00:00
moodler 82350116ba Merged roles gui changes from stable 2006-10-24 14:39:41 +00:00
moodler e2a3a0e741 Merged guest recent activity fixes from stable 2006-10-24 14:37:04 +00:00
jamiesensei 9e471e1165 migrated to formslib 2006-10-24 12:19:34 +00:00
jamiesensei 45ca9e8e2d added autofocus on first error and moved formslib include to inside request_form.php 2006-10-24 11:43:51 +00:00
jamiesensei 6cd72677f6 added focus on first element with error 2006-10-24 11:38:33 +00:00
jamiesensei e8a34ad424 migrated signup.php over to using new formslib 2006-10-24 11:10:48 +00:00
jamiesensei 2c41289045 added a method to return javascript to select form element with first error for use in focus in print_header 2006-10-24 11:05:50 +00:00
vyshane ea003a2338 Merged from 1.7. 2006-10-24 09:42:06 +00:00
vyshane f45cc76fb3 Merged from 1.7. 2006-10-24 08:13:13 +00:00
vyshane 2469f7ea85 Merged from 1.7 2006-10-24 08:11:38 +00:00
skodak 8e9eebe629 fixed risks associated with capabilitites in modules MDL-7174; merged from MOODLE_17_STABLE 2006-10-24 08:06:56 +00:00
skodak bcdb0f193d fixed risks associated with main capabilitites MDL-7174; merged from MOODLE_17_STABLE 2006-10-24 08:02:26 +00:00
bobopinna d11b69ff27 Added CAM support to SCORM 2004 3rd Edition 2006-10-24 07:35:11 +00:00
moodler cf36da6429 FIxed problem which was unenrolling some assigns at the site level! MDL-7189 2006-10-24 07:07:54 +00:00
toyomoyo aad6c6c222 merged fixing capabilities 2006-10-24 04:26:46 +00:00
vyshane 929089e754 Merged from 1.7 2006-10-24 03:26:55 +00:00
moodler fafa2265f6 Merged fix for trusttext from stable 2006-10-24 02:36:13 +00:00
moodler 527389f912 Merged guest enrol fixes. MDL-7182 2006-10-24 02:13:42 +00:00
toyomoyo 0c939d6ca7 merged, blog tab clean up 2006-10-24 02:10:46 +00:00
stronk7 422770d8cb Moving deprecated uses of sql_paging_limit() to the new $limitfrom,
$limitnum parameters in all the get_recordXXX() functions. MDL-7167

Merged from MOODLE_17_STABLE
2006-10-23 23:00:18 +00:00
skodak 28ee98c530 fixed moodle/calendar:manageentries capability in calendar; merged from MOODLE_17_STABLE 2006-10-23 22:28:52 +00:00
skodak ac15a2d5ff Assignment Reports incomplete MDL-6301 ; merged from MOODLE_17_STABLE 2006-10-23 21:02:57 +00:00
skodak ce5ce1369f Excel export returns a zero bytes file when system temp not writable MDL-7176; merged from MOODLE_17_STABLE 2006-10-23 19:26:20 +00:00
skodak 6a57abf8f7 error message when adding a link in editor MDL-7180 ; merged from MOODLE_17_STABLE 2006-10-23 18:31:08 +00:00
stronk7 92602651dc Now insert_record() is using $db->GenID() to retrieve
sequence numbers for Oracle. Just wondering if the same
function should be used by PostgreSQL too. MDL-7183

Merged from MOODLE_17_STABLE
2006-10-23 17:46:08 +00:00
stronk7 37c47abaca Suppress all the uses of LIMIT in the get_field_sql() calls. MDL-7173
Merged from MOODLE_17_STABLE
2006-10-23 16:03:52 +00:00
moodler 2f1a42481d This new function called load_all_capabilities() should be used whenever
you want to completely reload the capabilities for the current user.

Basically it will deal nicely with the default site-wide permissions
depending on the current user.

More background in the comments on MDL-6963

Merged from stable
2006-10-23 15:17:31 +00:00
moodler 18894ee462 Fixed &nbsp characters MDL-7179 2006-10-23 13:42:23 +00:00
moodler 89c355e5cb Merged fix for letting guests see discussion post button from stable 2006-10-23 13:23:16 +00:00
skodak da259fa10a Checkbox value not saved when saving changes from admin search page MDL-7177 + other fixes to make it behave more like settings.php; merged from MOODLE_17_STABLE 2006-10-23 12:05:33 +00:00
skodak fcade7d070 yet another context fix for Roles tab - I hope this one is final; merged from MOODLE_17_STABLE 2006-10-23 11:27:31 +00:00
skodak 1aaaa067df glossary tabs (when updating a glossary) is not aligned properly MDL-7172 ; merged from MOODLE_17_STABLE 2006-10-23 11:17:56 +00:00
andreabix 15b2035423 Stylistic problem solved 2006-10-23 08:00:13 +00:00
moodler 9d5210af22 Merged tidy-ups from stable 2006-10-23 07:46:57 +00:00
stronk7 f96a5db1c4 strip "old" harcoded "limit" clauses from the sql passed and
debug about them. MDL-7173

Merged from MOODLE_17_STABLE
2006-10-23 07:46:10 +00:00
moodler 523e1a21ff Merged choice fixes from stable 2006-10-23 07:01:18 +00:00
moodler b1f318a67f Merged guest key enrolment fix from stable MDL-6881 2006-10-23 06:38:15 +00:00
moodler e8e64fa336 Merged stats fix for MDL-7151 from stable 2006-10-23 05:22:16 +00:00
moodler a321d42bcd Better handling for guest in forums MDL-7125 2006-10-23 04:55:20 +00:00
moodler ebfc2f162c Merged capability name fix from stable 2006-10-23 03:29:54 +00:00
toyomoyo e73bfa2d73 merged replacing studentcanpost with proper capability 2006-10-23 03:23:09 +00:00
moodler a6f39157c6 Merged unenrol fixes from stable MDL-6964 MDL-7123 2006-10-23 03:12:37 +00:00
moodler 4e19d85bd9 Merged choice/guest fixes from stable MDL-7171 2006-10-23 03:00:30 +00:00
moodler 295df61cc4 Automatic installer.php lang files by installer_builder (20061023) 2006-10-23 02:58:41 +00:00
toyomoyo 6cb34d443d merged replacing studentcanpost with capability 2006-10-23 02:49:05 +00:00
toyomoyo 7f75d5fd2f merged, student_can_post should be done properly using capabilities 2006-10-23 02:25:32 +00:00
stronk7 b9c3b8c734 Prevent MSSQL to return from insert_record() before
trying to execute the updating of LOBs.

Merged from MOODLE_17_STABLE
2006-10-23 00:01:57 +00:00
stronk7 c1bf1b0073 Debugging sql_paging_limit() as deprecated and
enforcing get_field_sql() to return 1 record max

Merged from MOODLE_17_STABLE
2006-10-22 23:21:59 +00:00
stronk7 55d3af6f3a Killing all sql_paging_limit() uses
Merged from MOODLE_17_STABLE
2006-10-22 22:58:29 +00:00
stronk7 789ab3ff24 Killing all sql_paging_limit() uses
Merged from MOODLE_17_STABLE
2006-10-22 22:49:54 +00:00
stronk7 cb4c207832 Adding limitfrom and limitnum parameters to a bunch of
rarely executed functions...

Merged from MOODLE_17_STABLE
2006-10-22 22:37:30 +00:00
skodak 15850dcb29 fixed incorrect context in user Outline report; mergedf rom MOODLE_17_STABLE 2006-10-22 20:03:01 +00:00
skodak e2a305ff13 fixed $usercontext creation needed for Role tab when viewing user data; merged from MOODLE_17_STABLE 2006-10-22 19:59:07 +00:00
skodak 8a51efe99d fixed sql error when searching only by one letter and two radio buttons selected at the same time (visible in Konqueror) fixed as part of MDL-7160 ; merged from MOODLE_17_STABLE 2006-10-22 19:42:27 +00:00
skodak 1ac417517e fixed moodle/site:readallmessages MDL-7160 ; commented out unfinished buggy code; merged from MOODLE_17_STABLE 2006-10-22 19:20:02 +00:00
moodler 116cd201ea Merged lastcourseaccess fixes from MDL-7134 2006-10-22 08:31:06 +00:00
moodler 4067b96821 Merged missing </span> from stable 2006-10-22 08:25:51 +00:00
moodler 83703f0862 Merged some fixes for & in XHTML 2006-10-22 08:19:41 +00:00
moodler 4c57e8e502 Merged XHTML fixes from stable 2006-10-22 08:14:20 +00:00
moodler 4f1d9d0383 Merged filter fix from stable 2006-10-22 08:13:03 +00:00
moodler 721d14cbfe Merged fixes for recent activity from stable MDL-7134 2006-10-22 07:42:04 +00:00
moodler 7fa5403791 Automatic installer.php lang files by installer_builder (20061022) 2006-10-22 03:06:21 +00:00
skodak f8b922413a Seeing ####TRUSTTEXT#### in RSS feeds MDL-7147 - fixed RSS feeds in glossary; merged from MOODLE_17_STABLE 2006-10-21 21:15:26 +00:00
skodak ec41cb3c52 Seeing ####TRUSTTEXT#### in RSS feeds MDL-7147 - fixed RSS discussion feed type too; merged from MOODLE_17_STABLE 2006-10-21 21:05:44 +00:00
skodak 013f2e7cd9 fix has_capability() to work when $nomoodlecookie = true; MDL-7156 - needed for RSS file.php that is serving feeds; merged from MOODLE_17_STABLE 2006-10-21 20:42:50 +00:00
skodak e80ca6c658 fixed undefined modcontext in forum; merged from MOODLE_17_STABLE 2006-10-21 20:30:27 +00:00
stronk7 b4c7bb78fc Deleting some old oci8po files from CVS. 2006-10-21 18:28:28 +00:00
stronk7 8914508a4b Prevent add_field() to work if we are adding one not null field
to one non-empty table without specifying its default value.

Merged from MOODLE_17_STABLE
2006-10-21 18:19:47 +00:00
stronk7 e0251aea34 Added two more tests:
- To check adding numerial fields not null + default = 0
- To test set_field() with TEXT data

Merged from MOODLE_17_STABLE
2006-10-21 17:25:44 +00:00
stronk7 1fe2eb59c8 Minor typo fixed.
Merged from MOODLE_17_STABLE
2006-10-21 17:19:37 +00:00
moodler 81cc8046c4 Merged My Courses fixes from stable 2006-10-21 16:36:31 +00:00
stronk7 04c9f8dcc2 One typo (!==) was preventing defaults to be properly calculated for integers.
Thanks to Nigel McNie for being on that!

Merged from MOODLE_17_STABLE
2006-10-21 16:36:16 +00:00
moodler 49e6751073 Make sure LAMS is off if we don't need it (merged from stable) 2006-10-21 16:14:27 +00:00
moodler 318f210074 Merged fix for notice from stable 2006-10-21 16:00:43 +00:00
moodler 2176adf169 Merged some checks from stable 2006-10-21 14:53:47 +00:00
moodler 40bae73f93 Automatic installer.php lang files by installer_builder (20061021) 2006-10-21 02:58:55 +00:00
moodler bd4128e91f Merged enrolment-related fixes from stable 2006-10-20 17:53:50 +00:00
moodler a954633875 HIde admins from partipant listings in courses 2006-10-20 08:27:35 +00:00
toyomoyo 20374d723b merged fix for MDL-7119, users with no capability should not see roles tab 2006-10-20 08:09:53 +00:00
moodler ffd8a1cdc5 Added Javascript, CSS etc on edit page for database. MDL-7100 2006-10-20 07:35:00 +00:00
toyomoyo dc07b83298 merged fix for MDL-7106, glossary capability check 2006-10-20 07:01:51 +00:00
moodler 0d6d38f11a MERGED:
Changed default capability for database to allow guests to view by default
MDL-7118
2006-10-20 06:59:24 +00:00
moodler 4c523b757a New automatic installer lang file added 2006-10-20 06:52:11 +00:00
moodler 7b08a2ea3f Merged fixes for MDL-7116 from stable 2006-10-20 06:19:22 +00:00
toyomoyo f86b0db993 merged fix for MDL-7115, teacher page replaced by generic role assign page 2006-10-20 05:49:05 +00:00
moodler e4814bbcdc Merged sitecontext fix from stable 2006-10-20 05:18:24 +00:00
moodler 1ce1944e33 Merged fixes for guest display from stable 2006-10-20 05:16:12 +00:00
toyomoyo 80dfce19ae merged, fixed an infinite loop 2006-10-20 05:09:37 +00:00
moodler 5469bd9c2b Merged fix from stable (forum search form help button) 2006-10-20 03:35:29 +00:00
vyshane 286e1f0e18 Merged from 1.7 2006-10-20 03:18:06 +00:00
toyomoyo de51fa5657 merged fix for MDL-7107, missing capability check for assignroles link 2006-10-20 03:16:07 +00:00
moodler 01c7bd6f4c Automatic installer.php lang files by installer_builder (20061020) 2006-10-20 03:00:41 +00:00
toyomoyo ac57f76122 merged fox for MDL-7113, removing DISTINCT on TEXT field 2006-10-20 02:44:22 +00:00
toyomoyo 207355b438 merged, setting $CFG->unicodedb after converting db to unicode. Chaning the order of if clause to same some sqls 2006-10-20 02:08:21 +00:00
mjollnir_ 722c3bfede error reporting for xmldb (credit: Nigel McNie <nigel@catalyst.net.nz>) 2006-10-19 23:30:28 +00:00
skodak d9bd99476c temporary patch for the forum trouble that is breaking installs MDL-7114 ; merged from MOODLE_17_STABLE 2006-10-19 22:44:00 +00:00
skodak 82a4eee1a2 fixed rolesactive notice during installation; merged from MOODLE_17_STABLE 2006-10-19 22:18:22 +00:00
stronk7 211836549f Adding support for the new mssql_n driver
Merged from MOODLE_17_STABLE
2006-10-19 22:13:53 +00:00
skodak 6a1cfff27e Internal zipping broken on win32 MDL-7105 ; we are now using the new method to specify file names in zip archive because the old PCLZIP_OPT_REMOVE_PATH option is broken on win32 platforms 2006-10-19 22:13:03 +00:00
stronk7 b2ad03364b Adding support for the new mssql_n driver
Merged from MOODLE_17_STABLE
2006-10-19 22:07:21 +00:00
stronk7 ed4b4bf1d0 New ADOdb driver that extends the standard mssql one. All it does is
to prepend the 'N' char before any SQL literal sent to DB, mainly
because nobody (ODBTP, FreeTDS, ODBC, SQL*Server) seems to be doing
this task, and it prevents, in an high degree true cross-db compatibility.

Once we've moved to prepared statements and some of the developers for
any of the products above (hopefully MS, at server level) will avoid
the 'N', we'll be able to go back to another mssql drivers.

More info at:
  - http://docs.moodle.org/en/XMLDB_Problems (point 8)
  - http://tracker.moodle.org/browse/MDL-6877
2006-10-19 21:57:23 +00:00
stronk7 6d55d8538b Adding support for the new mssql_n driver
Two new strings added: mssql_n, databasesettingssub_mssql_n
One string modified: databasesettingssub_mssql

Merged from MOODLE_17_STABLE
2006-10-19 19:01:02 +00:00
stronk7 b9bc4d7460 Adding support for the new mssql_n driver
Merged from MOODLE_17_STABLE
2006-10-19 18:45:16 +00:00
stronk7 f9ec4d3722 Adding support for the new mssql_n driver
Merged from MOODLE_17_STABLE
2006-10-19 18:29:47 +00:00
stronk7 bf42ceed7f Addding support for the new mssql_n ADOdb driver that,
transparently, prepends the N char for all the string
literals being set to MSSQL (until MS Unicode - standard-
support will arrive).

Merged from MOODLE_17_STABLE
2006-10-19 17:29:37 +00:00
thepurpleblob eb4cb4c51e Focus is now loaded into Name edit field 2006-10-19 13:06:06 +00:00
tjhunt ef95c65ed1 Fix problem with multichoice question grading. Merged from MOODLE_17_STABLE. 2006-10-19 11:54:17 +00:00
tjhunt f6bde593c7 Missing addslashes. Merged from MOODLE_17_STABLE. 2006-10-19 10:24:04 +00:00
jamiesensei e995c46e24 fix for :
$this->_form->getElement('allowedmods')->
                        updateAttributes(array('disabled' => 'disabled')) ;
 that didn't work in PHP 4. (calling a method on a returned object)
2006-10-19 07:12:11 +00:00
toyomoyo c345209c19 merged fix for MDL-6549, fix for wrong publish to menu 2006-10-19 06:41:49 +00:00
toyomoyo b7cec865f4 merged, making the site context and site course context the same 2006-10-19 06:16:35 +00:00
vyshane 6f00683e98 Merged from 1.7 2006-10-19 04:33:56 +00:00
moodler ebf75284ee Automatic installer.php lang files by installer_builder (20061019) 2006-10-19 02:58:51 +00:00
toyomoyo c30f752c30 merged, adding addtional check to change_db_encoding to make sure db not already in unicode, upon successful conversion set the correct names 2006-10-19 02:14:43 +00:00
skodak 2b82319d94 Delete user fails if apostrophe in email address MDL-4762 ; found and solution provided by Inaki Arenaza - merged from MOODLE_17_STABLE 2006-10-18 21:46:14 +00:00
skodak e38204d175 fixed access check when editting notes in advanced upload assignment type; merged from MOODLE_17_STABLE 2006-10-18 21:34:06 +00:00
skodak 70b5660a51 fixed Notices after assignment deletion in Recent Activity MDL-7089 ; merged from MOODLE_17_STABLE 2006-10-18 21:02:30 +00:00
skodak efa0eb1dcd improved validation when deleting comments from glossary SC#325 ; merged from MOODLE_17_STABLE 2006-10-18 20:21:28 +00:00
skodak 4f93f5ba08 Notice when creating one forum... MDL-7063 ; merged from MOODLE_17_STABLE 2006-10-18 19:59:27 +00:00
skodak 95b451d5a9 changed email obfuscation character to * MDL-6935 ; merged from MOODLE_17_STABLE 2006-10-18 19:41:32 +00:00
thepurpleblob 07705e2fa6 put the cursor in the edit box rather than doing nothing for label 2006-10-18 13:03:50 +00:00
ethem 821267bccf Fixed merge chars: ======= 2006-10-18 12:45:28 +00:00
ethem 23741665cd Show results and send email to admin. Merged from 17stable. 2006-10-18 12:43:00 +00:00
skodak 1f8c654979 Deleting uploaded files when deleting an assignment instance + fixed quoting style + trailing whitespace MDL-6387 ; merged from MOODLE_17_STABLE 2006-10-18 11:14:48 +00:00
vyshane c081fdcaca Merged from 1.7 2006-10-18 09:47:44 +00:00
skodak 20d55a1b7b fix course reset unenrollment in to work with roles MDL-7069 ; merged from MOODLE_17_STABLE 2006-10-18 09:20:16 +00:00
vyshane 01059829c2 Merged from 1.7 2006-10-18 08:41:24 +00:00
toyomoyo 6ccb764f32 merged fix for MDL-7066, proper capability check for forum attachments 2006-10-18 08:01:15 +00:00
toyomoyo 5f6fc25b43 merged fix for MDL-7066, users will replypost set to prohit can not edit own post 2006-10-18 07:50:22 +00:00
vyshane fc2e40e30e Merged from 1.7 2006-10-18 07:42:44 +00:00
toyomoyo a6eb09d977 merged added code to force mysql db to change default encoding during fresh installation 2006-10-18 07:26:04 +00:00
vyshane 8b8a8779dc Merged from 1.7 2006-10-18 07:05:21 +00:00
toyomoyo 819e5a70c3 merged fix for MDL-7055 - prohibts at site level not working 2006-10-18 06:45:38 +00:00
toyomoyo 2058a0a1b2 merged fix for MDL-7065, adding translated string to breadcrumb 2006-10-18 05:41:45 +00:00
moodler fa266634a5 Automatic installer.php lang files by installer_builder (20061018) 2006-10-18 02:59:46 +00:00
stronk7 1afef7d9b3 Now insert/update/set of BINATY fields is supported by MSSQL
(and easier to add new DB in the furure) MDL-7062

Merged from MOODLE_17_STABLE
2006-10-17 23:37:58 +00:00
stronk7 b2b33a1fef Added 4 more tests to check CLOB/BLOB handling across all DBs. MDL-7062
Merged from MOODLE_17_STABLE
2006-10-17 23:31:49 +00:00
tjhunt 95ac8a4039 MDL-6315 - Manually grading a question 0 marks was not being registered. I took the opportunity to clean up the logic in this function a bit. Merged from MOODLE_16_STABLE. 2006-10-17 23:23:18 +00:00
tjhunt 9a8b42c981 MDL-6848 - Display problem with < > characters in shortanswer when outputting the correct answer. Merged from MOODLE_16_STABLE. 2006-10-17 22:17:17 +00:00
tjhunt 6a00f57926 MDL-6386 - stripslashes missing in multianswer qustions. Thank to Joseph Rezeau. Merged from MOODLE_16_STABLE. 2006-10-17 22:01:23 +00:00
tjhunt bc649d80d5 MDL-7054 - Prevent creation of question categories with blank names. Merged from MOODLE_16_STABLE. 2006-10-17 21:45:19 +00:00
skodak 1bacd276a7 fixed role_capabilities table name typo; merged from MOODLE_17_STABLE 2006-10-17 21:41:24 +00:00
skodak b9ecde8738 Fix forum reset - remove "DELETE .. USING ... " mysqlisms MDL-7053 ; merged from MOODLE_17_STABLE 2006-10-17 21:06:50 +00:00
skodak 8c18200652 Automatic deletion of users when deleteunconfirmed is setted to 'never' MDL-6726; merged from MOODLE_17_STABLE patch submitted by Jesús Torres 2006-10-17 20:47:12 +00:00
skodak 4090bcaee3 Activitynames filter case insensitive again for non-ascii languages MDL-6054 - I hope it will not be choking on invalid UTF-8 data; merged from MOODLE_17_STABLE 2006-10-17 19:46:35 +00:00
skodak 9de4787365 Broken longtimenosee option - PHP notice errors during cron MDL-7058; found and solution submitted by Jenny Gray; merged from MOODLE_17_STABLE 2006-10-17 19:16:38 +00:00
skodak 22fdde3941 moodle.php strings for log file restore needs some fix - xhtml compliance and removed \n - MDL-7056; merged from MOODLE_17_STABLE 2006-10-17 18:57:05 +00:00
stronk7 e45346f98e Fixed typo that was preventing correct BLOB storage under Oracle.
Merged from MOODLE_17_STABLE
2006-10-17 18:31:56 +00:00
tjhunt ad6e05238f MDL-6760 - cannot insert the string 'null' into the database. You can now. Merged from MOODLE_17_STABLE. 2006-10-17 15:58:09 +00:00
tjhunt 026bec73b8 Fix bug with numerical questions with multiple answers. Merged from MOODLE_17_STABLE. 2006-10-17 15:56:52 +00:00
cap2501 4006726277 Disabled debug flag to improve performance
(the flags are set per 'class' on class.prototype.debug)
2006-10-17 15:53:48 +00:00
cap2501 9569653d63 Disabled logging of Debug Messages to improve performance 2006-10-17 15:52:05 +00:00
thepurpleblob 181eb9dd1f fix for bug MDL-7040. Form focus not defined 2006-10-17 12:41:55 +00:00
jamiesensei 073fe8f980 oops, forgot to set to PARAM_RAW for summary field which uses htmleditor on last commit. 2006-10-17 11:44:13 +00:00
jamiesensei b6241ce2c8 fixed some whitespace problems 2006-10-17 11:38:46 +00:00
jamiesensei e13cc88f02 migrated to new formslib code. Also removed $course variable which was been used in a number of places in this file but not set anywhere. 2006-10-17 11:08:13 +00:00
tjhunt 172f6d95e1 Fix bugs with GIFT import. Merged from MOODLE_17_STABLE. 2006-10-17 10:56:35 +00:00
thompson697 cf0b1faded Apply modularity to the creation of the log file during restore to a new course.
Remove the responsibility for loging the application of the course start date offset, from activity modules to the backup module.
Merged from stable branch
2006-10-17 10:05:41 +00:00
moodler 352b8da86a Merged two recent checkins from Moodle 1.7, stripslashes and navbar fixes 2006-10-17 09:10:15 +00:00
vyshane 88890f4d1c Fix for MDL-6363 2006-10-17 07:22:20 +00:00
skodak a32a53d2a4 RSS update and caching broken for some feeds MDL-7045; merged from MOODLE_17_STABLE 2006-10-17 07:09:18 +00:00
skodak d543939cd9 Typo improvement in assignment.php string MDL-7046; merged from MOODLE_17_STABLE 2006-10-17 06:29:03 +00:00
toyomoyo 8c449ca33f merged fix for 6884 2006-10-17 06:25:50 +00:00
vyshane 4fc45e1dde Merge from 1.7 2006-10-17 05:33:18 +00:00
toyomoyo ac52f2910b merged fix for MDL-6968 2006-10-17 05:18:52 +00:00
toyomoyo f0ef40c55f merged proper fix for MDL-6926 2006-10-17 04:46:34 +00:00
toyomoyo 8e3f0e3d41 merged fix for MDL-6926 2006-10-17 04:38:33 +00:00
vyshane 7f933d8f71 Merged from 1.7. 2006-10-17 04:00:57 +00:00
moodler d265ada364 Automatic installer.php lang files by installer_builder (20061017) 2006-10-17 03:00:43 +00:00
koenr cb2fa92677 strings necessary for 1.6 should not be deleted or altered since translations are not branched 2006-10-17 00:20:21 +00:00
koenr f55900359d strings necessary for 1.6 should not be deleted or altered since translations are not branched 2006-10-16 22:49:32 +00:00
koenr 3e7c65ab11 strings necessary for 1.6 should not be deleted or altered since translations are not branched 2006-10-16 21:19:26 +00:00
koenr 96901f3a67 strings necessary for 1.6 should not be deleted or altered since translations are not branched 2006-10-16 20:58:29 +00:00
stronk7 ba4aa5ec72 Added one more XMLDB test for find_sequence_name()
Merged from MOODLE_17_STABLE
2006-10-16 17:58:01 +00:00
stronk7 d5eff6795e Added support for getSequenceFromDB() to PG.
Merged from MOODLE_17_STABLE
2006-10-16 17:36:13 +00:00
tjhunt 879caa5172 Make things a bit more robust. Sorry, I can't remember exactly what the problem was that this fixed any more. It has been sitting around for a couple of weeks and I had forgotten to commit it. 2006-10-16 15:23:54 +00:00
tjhunt 2559409081 Changes to dmllib seem to have broken quiz backup. This makes it work again. Merged from MOODLE_17_STABLE. 2006-10-16 14:54:55 +00:00
tjhunt 7c9d46c96e Related to MDL-6249 - unit tests for address_in_subnet. Merged from MOODLE_17_STABLE. 2006-10-16 13:40:26 +00:00
tjhunt df90796155 MDL-6249 - easier way for human beings (as opposed to network engineers) to specify IP ranges. Merged from MOODLE_17_STABLE. 2006-10-16 13:38:36 +00:00
jamiesensei c08ac01627 added new dummy function to moodleform to allow some defintion to be done for the form dependent on data values. 2006-10-16 12:07:44 +00:00
tjhunt 3a3771d2b9 MDL-6650 - Previewing individual random questions from the quiz editing screen was not working, and anyway, I'm not sure it makes any sense, so I removed that preview link. Merged from MOODLE_17_STABLE. 2006-10-16 11:05:45 +00:00
tjhunt fdc8e778d5 MDL-6984 - Problem with Blackboard 5 import in PHP5. Fix based on a suggestion from Arthur Manning. Merged from MOODLE_16_STABLE. 2006-10-16 10:14:45 +00:00
ethem c7003d87b9 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()

merged from 17stable.
2006-10-16 09:53:03 +00:00
ethem 9c746ce766 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()

merged from 17stable.
2006-10-16 09:39:08 +00:00
ethem b5db746b7d + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()
2006-10-16 09:30:25 +00:00
skodak ea17d55da1 MDL-6444 Typo in Course/Report/Participation/index.php, patch by Stephen Bourget; merged from MOODLE_17_STABLE 2006-10-16 09:06:35 +00:00
skodak 23a97d83e8 reverting moved $SITE reinitialisation into setting method, it was not a good idea after all; merged from MOODLE_17_STABLE 2006-10-16 08:54:37 +00:00
skodak b27b0d5a03 MDL-6985 Role Short name cannot be modified; merged from MOODLE_17_STABLE 2006-10-16 08:34:44 +00:00
skodak 6192fd6860 fixed error message when empty site full or short name - moved $SITE reinitialisation into setting method; merged from MOODLE_17_STABLE 2006-10-16 07:54:22 +00:00
skodak c4ea5e7801 PARAM_MULTILANG is now alias of PARAM_TEXT; merged from MOODLE_17_STABLE 2006-10-16 07:46:35 +00:00
koenr 58945eadef MDL-6986 2006-10-16 07:45:16 +00:00
skodak b89639f9ef fixed error message when empty site full or short name; merged from MOODLE_17_STABLE 2006-10-16 07:37:41 +00:00
moodler 47bc16f607 It is now no longer possible to upgrade to 1.8 or later from non-Unicode
Moodle.   Admins get a message explaining they need to upgrade to 1.7.x first.

MDL-6857
2006-10-16 07:32:05 +00:00
skodak e268cc4a5d moved header after the redirects and require_logout; merged from MOODLE_17_STABLE 2006-10-16 06:52:01 +00:00
moodler 8c5eb1ffa9 Automatic installer.php lang files by installer_builder (20061016) 2006-10-16 03:01:57 +00:00
vyshane 84a2c43127 Merged from 1.7 2006-10-16 02:54:41 +00:00
vyshane 182311e493 Merged from 1.7 (lang string change) 2006-10-16 02:53:45 +00:00
vyshane c4ce5def5a Merged from 1.7 2006-10-16 02:45:38 +00:00
danmarsden ff8d654f00 Fix for MDL-6550 - patch from Graeme Byrne thanks! :-)
+ remove a bit of unneeded space! :-)
2006-10-16 00:01:13 +00:00
stronk7 32ac847351 New block upgrade functions must be called:
xmldb_block_BLOCKNAME_upgrade()

Part of MDL-6786, just for consistency. Merged from MOODLE_17_STABLE
2006-10-15 23:04:06 +00:00
stronk7 6b7be6d74f Now set_field() supports Oracle LOBs. Better error handling of oracle_update_lobs()
Merged from MOODLE_17_STABLE
2006-10-15 20:21:27 +00:00
stronk7 73ad2d0c29 Now update_record() supports LOBs under Oracle. Plus prevent empty objects to be updated.
Merged from MOODLE_17_STABLE
2006-10-15 19:40:33 +00:00
stronk7 1a8078073e Minor changes + debug info in UpdateXlob()
Merged from MOODLE_17_STABLE
2006-10-15 18:37:01 +00:00
stronk7 b825e563c0 - Introducing the first version of the new mssql_n adodb driver (not finished, just for experimenting).
- Now insert_record() is handling Oracle CLOBS and BLOBS properly (really annoying the number of hacks needed).
- Creating one new global object to cache $db->MetaColumns() calls per request, because it's being used
in a lot of places inside dmllib.
TODO: hack update_record() and set_field() to allow Oracle LOBs
      enclose all the Oracle function calls into one db transaction

Merged from MOODLE_17_STABLE
2006-10-15 16:41:55 +00:00
moodler 671af7d187 Automatic installer.php lang files by installer_builder (20061015) 2006-10-15 02:58:38 +00:00
jamiesensei 5bc97c9862 Fixed a bug with client side validation of form fields.
Added some default error messages for rules specified in lang pack as err_{rulename} Use the default by setting the rule message to null.
2006-10-14 12:32:31 +00:00
moodler f1e4c519df Fixed some words 2006-10-14 07:29:34 +00:00
moodler 6a20759456 Automatic installer.php lang files by installer_builder (20061014) 2006-10-14 02:59:33 +00:00
stronk7 1037988787 Now admin/index.php checks for proper prefixes (MDL-6230)
Merged from MOODLE_17_STABLE
2006-10-13 23:49:48 +00:00
gustav_delius 549a78703b When javascript was turned off the group menu did not work because the Go button linked to course/view.php rather than mod/forum/view.php 2006-10-13 23:27:37 +00:00
stronk7 86453d8bd6 Now installer:(MDL-6823)
- performs Oracle charset checks (both client and server)
- prefix checks
- shows differnt information foreach DB flavour
- provide one link to Moodle Docs for MSSQL and Oracle
- the ODBC connector has been marked as experimental due
  to confirmed problems by MS

Merged from MOODLE_17_STABLE
2006-10-13 18:20:52 +00:00
stronk7 e0f5f27736 Some more strings added to the installer to make it more resposible.
Merged from MOODLE_17_STABLE
2006-10-13 17:25:07 +00:00
stronk7 b676fc8718 Added new strings for DB select/configure
Merged from MOODLE_17_STABLE
2006-10-13 11:34:43 +00:00
skodak a81bf9c3ce refactored course/edit2.php and edit_form MDL-6914 ; set $CFG->use_new_forms=1; in config.php if you want to test it ;-) 2006-10-13 09:58:53 +00:00
moodler e561e6fe6c Automatic installer.php lang files by installer_builder (20061013) 2006-10-13 03:00:53 +00:00
toyomoyo ffd0ab657b merged fix for warnings 2006-10-13 02:54:51 +00:00
gbateson 29c7c23082 removed a debug line which showed up in Rottmeier DropDown quizzes 2006-10-12 21:48:20 +00:00
jamiesensei 5da7b0b2b4 new edit3.php demos Petr's new API 2006-10-12 14:21:15 +00:00
jamiesensei c56f18269e added some methods to give a choice of
setDefault and setDefaults
setHelpButton and setHelpButtons
setType and setTypes
2006-10-12 14:15:59 +00:00
stronk7 906eebf6ad Small change in rename_field() so objects won't become modified at all
in the process.

Merged from MOODLE_17_STABLE
2006-10-12 12:28:36 +00:00
skodak e7dcb0fccc moodleform->validation() receives slashed $data now to make it similar to data_submitted() and prevent potential SQL injections 2006-10-12 09:53:32 +00:00
toyomoyo 10b7946ff3 merged fix for warnigns 2006-10-12 08:33:52 +00:00
toyomoyo 627dc89d22 merged fix for warnings 2006-10-12 08:26:19 +00:00
gbateson b4c2849e21 correct handling of correct, wrong and ignored answers in Rottmeier DropDown 2.4 quizzes 2006-10-12 08:08:52 +00:00
gbateson 247ed91b7f remove unnecessary <br /> before summary textbox when in edit mode (as opposed to add mode) 2006-10-12 08:06:58 +00:00
toyomoyo 71cfb1043c merged fix for warnings 2006-10-12 08:01:58 +00:00
gbateson 97782e0c07 add global $CFG to hotpot_restore_dates function 2006-10-12 08:01:22 +00:00
vyshane e1c15ef7c9 Merged from 1.7 2006-10-12 07:35:55 +00:00
skodak 7f40a229a4 New version of formslib.php (see MDL-6914 for more details), course/edit2.php is disabled for now - working on edit3.php ;-)
More inline comments/docs today.
2006-10-12 07:33:57 +00:00
toyomoyo 794fa9321b merged removed warning during restore 2006-10-12 07:33:04 +00:00
moodler 215965673b Merged MDL-6885 from stable 2006-10-12 07:28:22 +00:00
toyomoyo 121d921b4c merged fixing notices 2006-10-12 06:58:14 +00:00
toyomoyo 18d751fc38 merged fixed warning druing restore 2006-10-12 06:13:42 +00:00
moodler 854792457c Merged tooltips from stable 2006-10-12 04:02:22 +00:00
toyomoyo 8db6090013 merged fix warnings during restore 2006-10-12 03:36:58 +00:00
moodler c6d33fce5b Merged fixes from stable 2006-10-12 03:31:48 +00:00
toyomoyo 2df5f8f53d merged fix warnings during restore 2006-10-12 03:30:43 +00:00
moodler e7ff63a5e9 Automatic installer.php lang files by installer_builder (20061012) 2006-10-12 03:00:49 +00:00
toyomoyo e9dafcec20 merged fixing warnings during restore 2006-10-12 02:49:28 +00:00
toyomoyo e8dc3e8df6 merged fixing warnings 2006-10-12 02:39:59 +00:00
toyomoyo 1f4d6e9af8 merged fixing warnings 2006-10-12 02:31:40 +00:00
toyomoyo 75a8c12838 merged, getting rid of warnings 2006-10-12 02:13:58 +00:00
skodak 9d2afb7095 import of new adodb 4.93 with our small fixes and tweaks MDL-6919; it should be now possible to solve MDL-6760 can't use the word null in a question answer in the commit message 2006-10-11 18:40:14 +00:00
tjhunt 014094c42d Take out 8) smiliey that interfeers with ligitimate content like (1998). Merged from MOODLE_17_STABLE. 2006-10-11 16:30:51 +00:00
moodler 5da199169b Merged fixes from MOODLE_16_STABLE which were never merged into HEAD 2006-10-11 09:22:42 +00:00
skodak 0160a028c2 fixed wrong } in hotpot_restore_dates() 2006-10-11 09:21:30 +00:00
gbateson 25d13710ed standardized lock/unlock of dates (also name and feedbackurl); added standard "Groups" and "Show" settings at end of form. 2006-10-11 08:34:52 +00:00
toyomoyo a8510c5a2a merged fix for 6900 2006-10-11 07:39:11 +00:00
vyshane db5308e25b Merged from 1.7 2006-10-11 06:58:35 +00:00
toyomoyo 25a0f2d8dc merged fix added "new role" in the drop down 2006-10-11 06:35:33 +00:00
jamiesensei e9d39a3215 added new form element datetimeselector 2006-10-11 06:30:03 +00:00
moodler bface4fe3c Merged fix for MDL-6910 2006-10-11 06:25:45 +00:00
moodler 2d5a4f255b Merged fixes for MDL-6907 from stable 2006-10-11 06:21:58 +00:00
moodler f4e2d38aaf Improved has_capability for admins using switchrole in modules 2006-10-11 05:49:26 +00:00
vyshane 37fb48e0f5 Merged from 1.7 2006-10-11 05:45:44 +00:00
toyomoyo 89491dbd2a merged fix for MDL-6882 2006-10-11 05:24:33 +00:00
toyomoyo c5846d4627 merged fixed wrong capaiblity checks 2006-10-11 03:48:09 +00:00
toyomoyo 96986241f5 merged change, fixed a bug where'0' is written when calling capability_assign() 2006-10-11 02:18:09 +00:00
gbateson 29651b84a5 use "noattemptstoshow" message instead of "noattempts" 2006-10-11 01:40:48 +00:00
gbateson 2ddc00d223 move restore dates in a HotPot record to a separate function 2006-10-11 01:32:40 +00:00
gbateson 2267e61012 allow selection of groups in reports 2006-10-11 01:30:27 +00:00
sam_marshall 352b1adb8c Wiki: fixed issue if you tried to set a page content to completely blank (you need to switch the html editor into text mode to get this, otherwise it puts in <br/>, but one of our QA people managed to find it anyway).
Also corrected whitespace on some of the lock stuff (weird - how did those tabs get in there? hrm)
2006-10-10 17:23:24 +00:00
2306 changed files with 182261 additions and 149913 deletions
+279 -306
View File
@@ -1,330 +1,303 @@
<?PHP // $Id$
// config.php - allows admin to edit all configuration variables
<?php
require_once('../config.php');
/**
* Allows admin to edit all auth plugin settings.
*
* JH: copied and Hax0rd from admin/enrol.php and admin/filters.php
*
*/
require_once($CFG->libdir.'/adminlib.php');
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$auth = optional_param('auth', '', PARAM_SAFEDIR);
$action = optional_param('action', '', PARAM_ACTION);
$auth = optional_param('auth', '', PARAM_SAFEDIR);
// get currently installed and enabled auth plugins
$authsavailable = get_list_of_plugins('auth');
//revert auth_plugins_enabled
if (isset($CFG->auth_plugins_enabled)) {
set_config('auth', $CFG->auth_plugins_enabled);
delete_records('config', 'name', 'auth_plugins_enabled');
unset($CFG->auth_plugins_enabled);
}
get_enabled_auth_plugins(true); // fix the list of enabled auths
if (empty($CFG->auth)) {
$authsenabled = array();
} else {
$authsenabled = explode(',', $CFG->auth);
}
if (!isset($CFG->registerauth)) {
set_config('registerauth', '');
}
if (!isset($CFG->auth_instructions)) {
set_config('auth_instructions', '');
}
if (!empty($auth) and !exists_auth_plugin($auth)) {
error(get_string('pluginnotinstalled', 'auth', $auth), $url);
}
$focus = '';
////////////////////////////////////////////////////////////////////////////////
// process actions
/// If data submitted, then process and store.
$status = '';
if ($config = data_submitted()) {
switch ($action) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
case 'save':
if (data_submitted() and confirm_sesskey()) {
$config = (array)$config;
// 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))));
// extract and sanitize the auth key explicitly
$modules = get_list_of_plugins("auth");
if (in_array($config['auth'], $modules)) {
$auth = $config['auth'];
} else {
notify("Error defining the authentication method");
}
// load the auth plugin library
require_once("{$CFG->dirroot}/auth/$auth/lib.php");
$err = array();
if (function_exists('auth_validate_form')) {
auth_validate_form($config, $err);
}
if (count($err) == 0) {
foreach ($config as $name => $value) {
if (preg_match('/^pluginconfig_(.+?)$/', $name, $matches)) {
$plugin = "auth/$auth";
$name = $matches[1];
if (! set_config($name, $value, $plugin)) {
notify("Problem saving config $name as $value for plugin $plugin");
}
} else { // normal handling for
if (! set_config($name, $value)) {
notify("Problem saving config $name as $value");
}
}
}
redirect("auth.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
// 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;
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
}
$modules = get_list_of_plugins("auth");
$options = array();
foreach ($modules as $module) {
$options[$module] = get_string("auth_$module"."title", "auth");
}
asort($options);
if (!empty($auth) && in_array($auth, $modules)) {
} else {
$auth = $config->auth;
}
// changepassword link replaced by individual auth setting
if (!empty($config->changepassword)) {
if (empty($config->{'auth_'.$auth.'_changepasswordurl'})) {
$config->{'auth_'.$auth.'_changepasswordurl'} = $config->changepassword;
}
set_config('changepassword','');
}
$auth = clean_param($auth,PARAM_SAFEDIR);
require_once("$CFG->dirroot/auth/$auth/lib.php"); //just to make sure that current authentication functions are loaded
if (! isset($config->guestloginbutton)) {
$config->guestloginbutton = 1;
}
if (! isset($config->alternateloginurl)) {
$config->alternateloginurl = '';
}
if (! isset($config->auth_instructions)) {
$config->auth_instructions = "";
}
if (! isset($config->changepassword)) {
$config->changepassword = "";
}
if (! isset($config->{'auth_'.$auth.'_changepasswordurl'})) {
$config->{'auth_'.$auth.'_changepasswordurl'} = '';
}
if (! isset($config->{'auth_'.$auth.'_changepasswordhelp'})) {
$config->{'auth_'.$auth.'_changepasswordhelp'} = '';
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
$guestoptions[0] = get_string("hide");
$guestoptions[1] = get_string("show");
$createoptions[0] = get_string("no");
$createoptions[1] = get_string("yes");
$strauthentication = get_string("authentication");
$strauthenticationoptions = get_string("authenticationoptions","auth");
$strsettings = get_string("settings");
$strusers = get_string("users");
admin_externalpage_print_header($adminroot);
echo "<center><b>";
echo "<form target=\"{$CFG->framename}\" name=\"authmenu\" method=\"post\" action=\"auth.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
print_string("chooseauthmethod","auth");
echo '&nbsp;&nbsp;';
choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?sesskey=$USER->sesskey&auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
echo "</b></center><br />";
print_simple_box_start("center", "100%");
print_heading($options[$auth]);
print_simple_box_start("center", "60%", '', 5, 'informationbox');
print_string("auth_$auth"."description", "auth");
print_simple_box_end();
echo "<hr />";
print_heading($strsettings);
echo "<table border=\"0\" width=\"100%\" cellpadding=\"4\">";
require_once("$CFG->dirroot/auth/$auth/config.html");
$CFG->pagepath = 'auth/' . $auth;
echo '<tr><td colspan="3">';
print_heading(get_string('auth_common_settings', 'auth'));
echo '<td/></tr>';
if ($auth != "email" and $auth != "none" and $auth != "manual") {
// display box for URL to change password. NB now on a per-method basis (multiple auth)
echo "<tr valign=\"top\">";
echo "<td align=\"right\" nowrap=\"nowrap\">";
print_string("changepassword", "auth");
echo ":</td>";
echo "<td>";
$passurl = $config->{'auth_'.$auth.'_changepasswordurl'};
echo "<input type=\"text\" name=\"auth_{$auth}_changepasswordurl\" size=\"40\" value=\"$passurl\" />";
echo "</td>";
echo "<td>";
print_string("auth_changepasswordurl_expl","auth",$auth);
echo "</td></tr>";
// display textbox for lost password help. NB now on a per-method basis (multiple auth)
echo "<tr valign=\"top\">";
echo "<td align=\"right\" nowrap=\"nowrap\">";
print_string("auth_changepasswordhelp", "auth");
echo ":</td>";
echo "<td>";
$passhelp = $config->{'auth_'.$auth.'_changepasswordhelp'};
echo "<textarea name=\"auth_{$auth}_changepasswordhelp\" cols=\"30\" rows=\"10\" wrap=\"virtual\">";
echo $passhelp;
echo "</textarea>\n";
echo "</td>";
echo "<td>";
print_string("auth_changepasswordhelp_expl","auth",$auth);
echo "</td></tr>";
}
echo "<tr valign=\"top\">";
echo "<td align=\"right\" nowrap=\"nowrap\">";
print_string("guestloginbutton", "auth");
echo ":</td>";
echo "<td>";
choose_from_menu($guestoptions, "guestloginbutton", $config->guestloginbutton, "");
echo "</td>";
echo "<td>";
print_string("showguestlogin","auth");
echo "</td></tr>";
if (function_exists('auth_user_create')){
echo "<tr valign=\"top\">";
echo "<td align=\"right\" nowrap=\"nowrap\">";
print_string("auth_user_create", "auth");
echo ":</td>";
echo "<td>";
choose_from_menu($createoptions, "auth_user_create", $config->auth_user_create, "");
echo "</td>";
echo "<td>";
print_string("auth_user_creation","auth");
echo "</td></tr>";
}
/// An alternate url for the login form. It means we can use login forms that are integrated
/// into non-moodle pages
echo '<tr valign="top">';
echo '<td algin="right" nowrap="nowrap">';
print_string('alternateloginurl', 'auth');
echo '</td>';
echo '<td>';
echo '<input type="text" size="40" name="alternateloginurl" alt="'.get_string('alternateloginurl', 'auth').'" value="'.$config->alternateloginurl.'" />';
echo '</td>';
echo '<td>';
print_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot.'/login/index.php'));
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<p align="center"><input type="submit" value="'.get_string('savechanges').'"></p>';
echo '</form>';
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
exit;
/// Functions /////////////////////////////////////////////////////////////////
//
// Good enough for most auth plugins
// but some may want a custom one if they are offering
// other options
// Note: pluginconfig_ fields have special handling.
function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) {
echo '<tr><td colspan="3">';
if ($retrieveopts) {
print_heading(get_string('auth_data_mapping', 'auth'));
} else {
print_heading(get_string('auth_fieldlocks', 'auth'));
}
echo '<td/></tr>';
$lockoptions = array ('unlocked' => get_string('unlocked', 'auth'),
'unlockedifempty' => get_string('unlockedifempty', 'auth'),
'locked' => get_string('locked', 'auth'));
$updatelocaloptions = array('oncreate' => get_string('update_oncreate', 'auth'),
'onlogin' => get_string('update_onlogin', 'auth'));
$updateextoptions = array('0' => get_string('update_never', 'auth'),
'1' => get_string('update_onupdate', 'auth'));
$pluginconfig = get_config("auth/$auth");
// helptext is on a field with rowspan
if (empty($helptext)) {
$helptext = '&nbsp;';
}
foreach ($user_fields as $field) {
// Define some vars we'll work with
if(empty($pluginconfig->{"field_map_$field"})) {
$pluginconfig->{"field_map_$field"} = '';
}
if(empty($pluginconfig->{"field_updatelocal_$field"})) {
$pluginconfig->{"field_updatelocal_$field"} = '';
}
if (empty($pluginconfig->{"field_updateremote_$field"})) {
$pluginconfig->{"field_updateremote_$field"} = '';
}
if (empty($pluginconfig->{"field_lock_$field"})) {
$pluginconfig->{"field_lock_$field"} = '';
case 'disable':
// remove from enabled list
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
set_config('auth', implode(',', $authsenabled));
}
// define the fieldname we display to the user
$fieldname = $field;
if ($fieldname === 'lang') {
$fieldname = get_string('language');
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} else {
$fieldname = get_string($fieldname);
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
break;
echo '<tr valign="top"><td align="right">';
echo $fieldname;
echo '</td><td>';
if ($retrieveopts) {
$varname = 'field_map_' . $field;
echo "<input name=\"pluginconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\">";
echo '<div align="right">';
echo get_string('auth_updatelocal', 'auth') . '&nbsp;&nbsp;';
choose_from_menu($updatelocaloptions, "pluginconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, "");
echo '<br />';
if ($updateopts) {
echo get_string('auth_updateremote', 'auth') . '&nbsp;&nbsp;';
'&nbsp;&nbsp;';
choose_from_menu($updateextoptions, "pluginconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, "");
echo '<br />';
}
echo get_string('auth_fieldlock', 'auth') . '&nbsp;&nbsp;';
choose_from_menu($lockoptions, "pluginconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, "");
echo '</div>';
} else {
choose_from_menu($lockoptions, "pluginconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, "");
case 'enable':
// add to enabled list
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
set_config('auth', implode(',', $authsenabled));
}
echo '</td>';
if (!empty($helptext)) {
echo '<td rowspan="' . count($user_fields) . '">' . $helptext . '</td>';
$helptext = '';
break;
case 'down':
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
}
echo '</tr>';
// move down the list
if ($key < (count($authsenabled) - 1)) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key + 1];
$authsenabled[$key + 1] = $fsave;
set_config('auth', implode(',', $authsenabled));
}
break;
case 'up':
$key = array_search($auth, $authsenabled);
// check auth is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
}
// move up the list
if ($key >= 1) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key - 1];
$authsenabled[$key - 1] = $fsave;
set_config('auth', implode(',', $authsenabled));
}
break;
default:
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);
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
if ($authplugin->can_signup()) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
}
}
foreach ($authsavailable as $auth) {
if (array_key_exists($auth, $displayauths)) {
continue; //already in the list
}
$authplugin = get_auth_plugin($auth);
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
if ($authplugin->can_signup()) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
}
}
// 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($adminroot);
//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">';
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($adminroot);
?>
+180
View File
@@ -0,0 +1,180 @@
<?php
/**
* Edit configuration for an individual auth plugin
*/
require_once '../config.php';
require_once $CFG->libdir.'/adminlib.php';
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$auth = required_param('auth', PARAM_SAFEDIR);
$authplugin = get_auth_plugin($auth);
$err = array();
// save configuration changes
if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$frm = stripslashes_recursive($frm);
$authplugin->validate_form($frm, $err);
if (count($err) == 0) {
// save plugin config
if ($authplugin->process_config($frm)) {
// save field lock configuration
foreach ($frm as $name => $value) {
if (preg_match('/^lockconfig_(.+?)$/', $name, $matches)) {
$plugin = "auth/$auth";
$name = $matches[1];
if (!set_config($name, $value, $plugin)) {
error("Problem saving config $name as $value for plugin $plugin");
}
}
}
redirect("auth.php");
exit;
}
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
} else {
$frm = get_config("auth/$auth");
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
$modules = get_list_of_plugins('auth');
foreach ($modules as $module) {
$options[$module] = get_string("auth_{$module}title", 'auth');
}
asort($options);
// output configuration form
admin_externalpage_print_header($adminroot);
// choose an authentication method
echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />\n";
echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// auth plugin description
print_simple_box_start('center', '80%');
print_heading($options[$auth]);
print_simple_box_start('center', '60%', '', 5, 'informationbox');
print_string("auth_{$auth}description", 'auth');
print_simple_box_end();
echo "<hr />\n";
$authplugin->config_form($frm, $err, $user_fields);
print_simple_box_end();
echo '<p style="text-align: center"><input type="submit" value="' . get_string("savechanges") . "\" /></p>\n";
echo "</div>\n";
echo "</form>\n";
admin_externalpage_print_footer($adminroot);
exit;
/// Functions /////////////////////////////////////////////////////////////////
// Good enough for most auth plugins
// but some may want a custom one if they are offering
// other options
// Note: lockconfig_ fields have special handling.
function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) {
echo '<tr><td colspan="3">';
if ($retrieveopts) {
print_heading(get_string('auth_data_mapping', 'auth'));
} else {
print_heading(get_string('auth_fieldlocks', 'auth'));
}
echo '</td></tr>';
$lockoptions = array ('unlocked' => get_string('unlocked', 'auth'),
'unlockedifempty' => get_string('unlockedifempty', 'auth'),
'locked' => get_string('locked', 'auth'));
$updatelocaloptions = array('oncreate' => get_string('update_oncreate', 'auth'),
'onlogin' => get_string('update_onlogin', 'auth'));
$updateextoptions = array('0' => get_string('update_never', 'auth'),
'1' => get_string('update_onupdate', 'auth'));
$pluginconfig = get_config("auth/$auth");
// helptext is on a field with rowspan
if (empty($helptext)) {
$helptext = '&nbsp;';
}
foreach ($user_fields as $field) {
// Define some vars we'll work with
if (!isset($pluginconfig->{"field_map_$field"})) {
$pluginconfig->{"field_map_$field"} = '';
}
if (!isset($pluginconfig->{"field_updatelocal_$field"})) {
$pluginconfig->{"field_updatelocal_$field"} = '';
}
if (!isset($pluginconfig->{"field_updateremote_$field"})) {
$pluginconfig->{"field_updateremote_$field"} = '';
}
if (!isset($pluginconfig->{"field_lock_$field"})) {
$pluginconfig->{"field_lock_$field"} = '';
}
// define the fieldname we display to the user
$fieldname = $field;
if ($fieldname === 'lang') {
$fieldname = get_string('language');
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} else {
$fieldname = get_string($fieldname);
}
if ($retrieveopts) {
$varname = 'field_map_' . $field;
echo '<tr valign="top"><td align="right">';
echo '<label for="lockconfig_'.$varname.'">'.$fieldname.'</label>';
echo '</td><td>';
echo "<input id=\"lockconfig_{$varname}\" name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
echo '<div style="text-align: right">';
echo '<label for="menulockconfig_field_updatelocal_'.$field.'">'.get_string('auth_updatelocal', 'auth') . '</label>&nbsp;';
choose_from_menu($updatelocaloptions, "lockconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, "");
echo '<br />';
if ($updateopts) {
echo '<label for="menulockconfig_field_updateremote_'.$field.'">'.get_string('auth_updateremote', 'auth') . '</label>&nbsp;';
choose_from_menu($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, "");
echo '<br />';
}
echo '<label for="menulockconfig_field_lock_'.$field.'">'.get_string('auth_fieldlock', 'auth') . '</label>&nbsp;';
choose_from_menu($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, "");
echo '</div>';
} else {
echo '<tr valign="top"><td align="right">';
echo '<label for="menulockconfig_field_lock_'.$field.'">'.$fieldname.'</label>';
echo '</td><td>';
choose_from_menu($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, "");
}
echo '</td>';
if (!empty($helptext)) {
echo '<td rowspan="' . count($user_fields) . '">' . $helptext . '</td>';
$helptext = '';
}
echo '</tr>';
}
}
?>
+1 -1
View File
@@ -59,7 +59,7 @@
print_heading($strblockname);
print_simple_box('<center>'.get_string('configwarning', 'admin').'</center>', 'center', '50%');
print_simple_box(get_string('configwarning', 'admin'), 'center', '50%');
echo '<br />';
echo '<form method="post" action="block.php">';
+14 -11
View File
@@ -17,7 +17,6 @@
$delete = optional_param('delete', 0, PARAM_INT);
$multiple = optional_param('multiple', 0, PARAM_INT);
/// Print headings
$strmanageblocks = get_string('manageblocks');
@@ -29,6 +28,7 @@
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strmultiple = get_string('blockmultiple', 'admin');
$strshowblockcourse = get_string('showblockcourse');
admin_externalpage_print_header($adminroot);
@@ -165,11 +165,8 @@
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'generaltable generalbox');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
foreach ($blockbyname as $blockname => $blockid) {
@@ -184,14 +181,21 @@
}
$count = count_records('block_instance', 'blockid', $blockid);
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey={$USER->sesskey}\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$count</a>";
}
else {
$blocklist = "$count";
}
$class = ''; // Nothing fancy, by default
if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.$USER->sesskey.'" title="'.$strhide.'">'.
'<img src="'.$CFG->pixpath.'/i/hide.gif" height="16" width="16" alt="" /></a>';
'<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon" alt="'.$strhide.'" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.$USER->sesskey.'" title="'.$strshow.'">'.
'<img src="'.$CFG->pixpath.'/i/show.gif" height="16" width="16" alt="" /></a>';
'<img src="'.$CFG->pixpath.'/i/show.gif" class="icon" alt="'.$strshow.'" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}
if ($blockobject->instance_allow_multiple()) {
@@ -208,8 +212,8 @@
$table->add_data(array(
'<span'.$class.'>'.$blockobject->get_title().'</span>',
$count,
$blockobject->get_version(),
$blocklist,
'<span'.$class.'>'.$blockobject->get_version().'</span>',
$visible,
$multiple,
$delete,
@@ -228,9 +232,8 @@
$table->define_headers(array($strname, $strdelete));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'incompatible');
$table->set_attribute('class', 'generaltable generalbox');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
-185
View File
@@ -1,185 +0,0 @@
<?php // $Id$
// config.php - allows admin to edit all configuration variables
require_once('../config.php');
$focus = '';
if ($site = get_site()) { // If false then this is a new installation
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
}
/// This is to overcome the "insecure forms paradox"
if (isset($secureforms) and $secureforms == 0) {
$match = 'nomatch';
} else {
$match = '';
}
/// If data submitted, then process and store.
if ($config = data_submitted($match)) {
if (!empty($USER->id)) { // Additional identity check
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
}
validate_form($config, $err);
if (count($err) == 0) {
foreach ($config as $name => $value) {
if ($name == "sessioncookie") {
$value = eregi_replace("[^a-zA-Z0-9_]", "", $value);
}
if ($name == "defaultallowedmodules") {
$value = implode(',',$value);
}
if ($name == 'hiddenuserfields') {
if (in_array('none', $value)) {
$value = '';
} else {
$value = implode(',',$value);
}
}
if ($name == "locale") {
$value = trim($value);
}
$conf = new object();
$conf->name = $name;
$conf->value = $value;
if ($current = get_record('config', 'name', $name)) {
$conf->id = $current->id;
if (! update_record('config', $conf)) {
error("Error: Could not update $name to $value");
}
} else {
if (! insert_record('config', $conf)) {
error("Error: could not add new variable $name !");
}
}
}
redirect('index.php');
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
}
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
$strconfigvariables = get_string('configvariables', 'admin');
if ($site) {
print_header("$site->shortname: $strconfigvariables", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strconfigvariables", $focus);
print_heading($strconfigvariables);
} else {
print_header();
print_heading($strconfigvariables);
print_simple_box(get_string('configintro', 'admin'), 'center', "50%");
echo '<br />';
}
/// Get all the configuration fields and helptext
require('configvars.php');
/// Cycle through the sections to get the sectionnames
$linktext = '';
foreach($configvars as $sectionname=>$section) {
if ($linktext !== '') {
$linktext .= ' | ';
}
$linktext .= '<a href="#configsection'.$sectionname.'">'.get_string('configsection'.$sectionname, 'admin').'</a>';
}
echo "<center>$linktext</center>\n";
echo '<form method="post" action="config.php" name="form">';
echo '<center><input type="submit" value="'.get_string('savechanges').'" /></center>';
/// Cycle through each section of the configuration
foreach ($configvars as $sectionname=>$section) {
print_heading('<a name="configsection'.$sectionname.'"></a>'.get_string('configsection'.$sectionname, 'admin'));
$table = NULL;
$table->data = array();
foreach ($section as $configvariable=>$configobject) {
$table->data[] = array ( $configvariable.': ',
$configobject->field
);
if ($configobject->display_warning()) {
$table->data[] = array ( '&nbsp;',
'<span class="configwarning">'.$configobject->warning.'</span>'
);
}
$table->data[] = array ( '&nbsp;',
'<span class="confighelp">'.$configobject->help.'</span>'
);
$table->align = array ('right', 'left');
}
print_table($table);
}
echo '<center>';
echo '<input type="hidden" name="sesskey" value="'.$sesskey.'" />';
echo '<input type="submit" value="'.get_string('savechanges').'" />';
echo '</center>';
echo '</form>';
/// Lock some options
$httpsurl = str_replace('http://', 'https://', $CFG->wwwroot);
if ($httpsurl != $CFG->wwwroot) {
if (ini_get('allow_url_fopen')) {
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
echo '<script type="text/javascript">'."\n";
echo '<!--'."\n";
echo "eval('document.form.loginhttps.disabled=true');\n";
echo '-->'."\n";
echo '</script>'."\n";
}
}
}
if ($site) {
print_footer();
}
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
// Currently no checks are needed ...
return true;
}
?>
-660
View File
@@ -1,660 +0,0 @@
<?php // $Id$
// Shane Elliott
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
/// Add new sitewide configuration variables to this file.
/// $configvars is parsed by config.php
/// It is an array of arrays of objects
/// $configvars[sectionname][configvariablename] = configvar object
$configvars = array();
/// no, yes strings and menu options are used in a number of places
/// so we define them here to save time on repeatedly calling
/// get_string()
$stryes = get_string('yes');
$strno = get_string('no');
$noyesoptions[0] = $strno;
$noyesoptions[1] = $stryes;
/// A class to hold the configurable information
/// $field - the html code for the form field
/// $help - help text for the field
/// $warning - optional warning text to be displayed
/// method display_warning() - a generic function that can be used in an extended class
/// e.g. enablerssfeeds
class configvar {
var $field;
var $help;
var $warning;
function configvar($help, $field, $warning='') {
$this->help = $help;
$this->field = $field;
$this->warning = $warning;
}
function display_warning() {
return false;
}
}
////////////////////////////////////////////////////////////////////
/// Miscellaneous config variables
////////////////////////////////////////////////////////////////////
$misc = array();
/// maxeditingtime
unset($options);
$options[3600] = get_string('numminutes', '', 60);
$options[2700] = get_string('numminutes', '', 45);
$options[1800] = get_string('numminutes', '', 30);
$options[900] = get_string('numminutes', '', 15);
$options[300] = get_string('numminutes', '', 5);
$options[60] = get_string('numminutes', '', 1);
$misc['maxeditingtime'] = new configvar (get_string('configmaxeditingtime', 'admin'),
choose_from_menu ($options, 'maxeditingtime', $config->maxeditingtime, '', '', '', true) );
/// debug
unset($options);
$options[5] = $strno;
$options[15] = $stryes;
$misc['debug'] = new configvar (get_string('configdebug', 'admin'),
choose_from_menu ($options, 'debug', $config->debug, '', '', '', true) );
$misc['perfdebug'] = new configvar (get_string('configperfdebug', 'admin'),
choose_from_menu ($options, 'perfdebug', $config->perfdebug, '', '', '', true) );
/// enablerssfeeds
class configvarrss extends configvar {
function display_warning() {
return (!function_exists('utf8_encode'));
}
}
$misc['enablerssfeeds'] = new configvarrss (get_string('configenablerssfeeds', 'admin'),
choose_from_menu ($noyesoptions, 'enablerssfeeds', $config->enablerssfeeds, '', '', '', true),
'<font color="red"> You need to add XML support to your PHP installation.</font>' );
$misc['mymoodleredirect'] = new configvar (get_string('configmymoodleredirect','admin'),
choose_from_menu($noyesoptions,'mymoodleredirect',$config->mymoodleredirect,'','','',true));
unset($options);
$options[5] = get_string('worldblogs','blog');
$options[4] = get_string('siteblogs','blog');
$options[3] = get_string('courseblogs','blog');
$options[2] = get_string('groupblogs','blog');
$options[1] = get_string('personalblogs','blog');
$options[0] = get_string('disableblogs','blog');
$misc['bloglevel'] = new configvar (get_string('configbloglevel', 'admin'),
choose_from_menu ($options, 'bloglevel', $config->bloglevel,'','','',true));
////////////////////////////////////////////////////////////////////
/// OPERATING SYSTEM config variables
////////////////////////////////////////////////////////////////////
$operatingsystem = array();
/// gdversion
unset($options);
$options[0] = get_string('gdnot');
$options[1] = get_string('gd1');
$options[2] = get_string('gd2');
$installed = check_gd_version();
$operatingsystem['gdversion'] = new configvar (get_string('configgdversion', 'admin'),
choose_from_menu ($options, 'gdversion', $installed, '', '', '', true) );
/// dbsessions
$operatingsystem['dbsessions'] = new configvar (get_string('configdbsessions', 'admin'),
choose_from_menu ($noyesoptions, 'dbsessions', $config->dbsessions, '', '', '', true) );
/// sessiontimeout
unset($options);
$options[14400] = get_string('numhours', '', 4);
$options[10800] = get_string('numhours', '', 3);
$options[7200] = get_string('numhours', '', 2);
$options[5400] = get_string('numhours', '', '1.5');
$options[3600] = get_string('numminutes', '', 60);
$options[2700] = get_string('numminutes', '', 45);
$options[1800] = get_string('numminutes', '', 30);
$options[900] = get_string('numminutes', '', 15);
$options[300] = get_string('numminutes', '', 5);
$operatingsystem['sessiontimeout'] = new configvar (get_string('configsessiontimeout', 'admin'),
choose_from_menu ($options, 'sessiontimeout', $config->sessiontimeout, '', '', '', true) );
/// sessioncookie
$operatingsystem['sessioncookie'] = new configvar (get_string('configsessioncookie', 'admin'),
'<input name="sessioncookie" type="text" size="10" value="'.s($config->sessioncookie).'" alt="sessioncookie" />' );
$operatingsystem['sessioncookiepath'] = new configvar (get_string('configsessioncookiepath', 'admin'),
'<input name="sessioncookiepath" type="text" size="10" value="'.s($config->sessioncookiepath).'" alt="sessioncookiepath" />' );
/// zip
$operatingsystem['zip'] = new configvar (get_string('configzip', 'admin'),
'<input name="zip" type="text" size="30" value="'.s($config->zip).'" alt="zip" />' );
/// unzip
$operatingsystem['unzip'] = new configvar (get_string('configunzip', 'admin'),
'<input name="unzip" type="text" size="30" value="'.s($config->unzip).'" alt="unzip" />' );
$operatingsystem['pathtodu'] = new configvar(get_string('configpathtodu', 'admin'),
'<input name="pathtodu" type="text" size="30" value="'.s($config->pathtodu).'" alt="pathtodu" />');
/// slasharguments
unset($options);
$options[0] = "file.php?file=/1/pic.jpg";
$options[1] = "file.php/1/pic.jpg";
$operatingsystem['slasharguments'] = new configvar (get_string('configslasharguments', 'admin'),
choose_from_menu ($options, 'slasharguments', $config->slasharguments, '', '', '', true) );
/// proxyhost
$operatingsystem['proxyhost'] = new configvar (get_string('configproxyhost', 'admin'),
'<input name="proxyhost" type="text" size="30" value="'.s($config->proxyhost).'" alt="proxyhost" />' );
/// proxyport
$operatingsystem['proxyport'] = new configvar ('',
'<input name="proxyport" type="text" size="5" value="'.s($config->proxyport).'" alt="proxyport" />' );
////////////////////////////////////////////////////////////////////
/// PERMISSIONS config variables
////////////////////////////////////////////////////////////////////
$permissions = array();
/// teacherassignteachers
$permissions['teacherassignteachers'] = new configvar (get_string('configteacherassignteachers', 'admin'),
choose_from_menu ($noyesoptions, 'teacherassignteachers', $config->teacherassignteachers, '', '', '', true) );
/// allowunenroll
$permissions['allowunenroll'] = new configvar (get_string('configallowunenroll', 'admin'),
choose_from_menu ($noyesoptions, 'allowunenroll', $config->allowunenroll, '', '', '', true) );
/// allusersaresitestudents
$permissions['allusersaresitestudents'] = new configvar (get_string('configallusersaresitestudents', 'admin'),
choose_from_menu ($noyesoptions, 'allusersaresitestudents', $config->allusersaresitestudents, '', '', '', true) );
/// showsiteparticipantslist
unset($options);
$options[0] = get_string('siteteachers');
$options[1] = get_string('allteachers');
$options[2] = get_string('studentsandteachers');
$permissions['showsiteparticipantslist'] = new configvar (get_string('configshowsiteparticipantslist', 'admin'),
choose_from_menu ($options, 'showsiteparticipantslist', $config->showsiteparticipantslist, '', '', '', true) );
/// forcelogin
$permissions['forcelogin'] = new configvar (get_string('configforcelogin', 'admin'),
choose_from_menu ($noyesoptions, 'forcelogin', $config->forcelogin, '', '', '', true) );
/// forceloginforprofiles
$permissions['forceloginforprofiles'] = new configvar (get_string('configforceloginforprofiles', 'admin'),
choose_from_menu ($noyesoptions, 'forceloginforprofiles', $config->forceloginforprofiles, '', '', '', true) );
/// opentogoogle
$permissions['opentogoogle'] = new configvar (get_string('configopentogoogle', 'admin'),
choose_from_menu ($noyesoptions, 'opentogoogle', $config->opentogoogle, '', '', '', true) );
/// maxbytes
$options = get_max_upload_sizes();
$permissions['maxbytes'] = new configvar (get_string('configmaxbytes', 'admin'),
choose_from_menu ($options, 'maxbytes', $config->maxbytes, '', '', 0, true) );
/// messaging
$permissions['messaging'] = new configvar (get_string('configmessaging', 'admin'),
choose_from_menu ($noyesoptions, 'messaging', $config->messaging, '', '', '', true) );
/// allowobjectembed
$permissions['allowobjectembed'] = new configvar (get_string('configallowobjectembed', 'admin'),
choose_from_menu ($noyesoptions, 'allowobjectembed', $config->allowobjectembed, '', '', '', true) );
/// enabletrusttext
$permissions['enabletrusttext'] = new configvar (get_string('configenabletrusttext', 'admin'),
choose_from_menu ($noyesoptions, 'enabletrusttext', $config->enabletrusttext, '', '', '', true) );
unset($options);
$options['none'] = 'No courses';
$options['all'] = 'All courses';
$options['requested'] = 'Requested courses';
$permissions['restrictmodulesfor'] = new configvar (get_string('configrestrictmodulesfor','admin'),
' <script language="JavaScript">
function togglemodules(index) {
if (index == 0) {
document.getElementById(\'allowedmodules\').disabled=true;
}
else {
document.getElementById(\'allowedmodules\').disabled=false;
}
}
</script>'.
choose_from_menu($options,'restrictmodulesfor',$config->restrictmodulesfor,'','togglemodules(this.selectedIndex);','',true) );
$permissions['restrictbydefault'] = new configvar (get_string('configrestrictbydefault','admin'),
choose_from_menu($noyesoptions, 'restrictbydefault',$config->restrictbydefault,'','','',true) );
$allowstr = '<select name="defaultallowedmodules[]" id="allowedmodules" multiple="multiple" size="10"'.((empty($config->restrictmodulesfor)) ? "disabled=\"disabled\"" : "").'>';
$allowedmodules = array();
if (!empty($config->defaultallowedmodules)) {
$allowedmodules = explode(',',$config->defaultallowedmodules);
}
// On a fresh install of Moodle, this could be empty; prevent a warning on the following loop.
if (!$mods = get_records("modules")) {
$mods = array();
}
$s = "selected=\"selected\"";
$allowstr .= '<option value="0" '.((empty($allowedmodules)) ? $s : '').'>'.get_string('allownone').'</option>'."\n";
foreach ($mods as $mod) {
$selected = "";
if (in_array($mod->id,$allowedmodules))
$selected = $s;
$allowstr .= '<option '.$selected.' value="'.$mod->id.'">'.$mod->name.'</option>'."\n";
}
$allowstr .= '</select>';
$permissions['defaultallowedmodules'] = new configvar (get_string('configdefaultallowedmodules','admin'),$allowstr);
/// course requests
$reqcourse['enablecourserequests'] = new configvar (get_string('configenablecourserequests', 'admin'),
choose_from_menu ($noyesoptions,'enablecourserequests',$config->enablecourserequests,'','','',true) );
/// default category for course requests
require_once($CFG->dirroot.'/course/lib.php');
$reqcourse['defaultrequestedcategory'] = new configvar (get_string('configdefaultrequestedcategory', 'admin'),
choose_from_menu (make_categories_options(), 'defaultrequestedcategory',$config->defaultrequestedcategory,'','','',true) );
$reqcourse['requestedteachername'] = new configvar (get_string('configrequestedteachername','admin'),
'<input type="text" name="requestedteachername" size="20" maxlength="100" value="'.s($config->requestedteachername).'" />');
$reqcourse['requestedteachersname'] = new configvar (get_string('configrequestedteachersname','admin'),
'<input type="text" name="requestedteachersname" size="20" maxlength="100" value="'.s($config->requestedteachersname).'" />');
$reqcourse['requestedstudentname'] = new configvar (get_string('configrequestedstudentname','admin'),
'<input type="text" name="requestedstudentname" size="20" maxlength="100" value="'.s($config->requestedstudentname).'" />');
$reqcourse['requestedstudentsname'] = new configvar (get_string('configrequestedstudentsname','admin'),
'<input type="text" name="requestedstudentsname" size="20" maxlength="100" value="'.s($config->requestedstudentsname).'" />');
////////////////////////////////////////////////////////////////////
/// INTERFACE config variables
////////////////////////////////////////////////////////////////////
$interface = array();
/// language settings
$interface['lang'] = new configvar ( get_string('configlang', 'admin'),
choose_from_menu(get_list_of_languages(), 'lang', $config->lang, '', '', '', true) );
/// language menu
$interface['langmenu'] = new configvar ( get_string('configlangmenu', 'admin'),
choose_from_menu($noyesoptions, 'langmenu', $config->langmenu, '', '', '', true) );
/// language list
$interface['langlist'] = new configvar ( get_string('configlanglist', 'admin'),
'<input name="langlist" type="text" size="60" value="'.s($config->langlist).'" alt="langlist" />' );
/// language menu
$interface['langcache'] = new configvar ( get_string('configlangcache', 'admin'),
choose_from_menu($noyesoptions, 'langcache', $config->langcache, '', '', '', true) );
/// locale
$interface['locale'] = new configvar ( get_string('configlocale', 'admin'),
'<input name="locale" type="text" size="15" value="'.s($config->locale).'" alt="locale" />' );
/// docroot
$interface['docroot'] = new configvar ( get_string('configdocroot', 'admin'),
'<input name="docroot" type="text" size="60" value="'.s($config->docroot).'" alt="docroot" />' );
/// doctonewwindow
$interface['doctonewwindow'] = new configvar ( get_string('configdoctonewwindow', 'admin'),
choose_from_menu($noyesoptions, 'doctonewwindow', $config->doctonewwindow, '', '', '', true) );
/// timezone
$interface['timezone'] = new configvar ( get_string('configtimezone', 'admin'),
choose_from_menu (get_list_of_timezones(), 'timezone', $config->timezone, get_string('serverlocaltime'), '', '99', true ) );
/// country
$interface['country'] = new configvar ( get_string('configcountry', 'admin'),
choose_from_menu (get_list_of_countries(), 'country', $config->country, get_string('selectacountry'), '', 0, true) );
/// framename
if (empty($config->framename)) {
$config->framename = "_top";
}
$interface['framename'] = new configvar (get_string('configframename', 'admin'),
'<input name="framename" type="text" size="15" value="'.s($config->framename).'" alt="framename" />' );
/// language list
$interface['themelist'] = new configvar ( get_string('configthemelist', 'admin'),
'<input name="themelist" type="text" size="60" value="'.s($config->themelist).'" alt="themelist" />' );
/// user themes
$interface['allowuserthemes'] = new configvar (get_string('configallowuserthemes', 'admin'),
choose_from_menu ($noyesoptions, 'allowuserthemes', $config->allowuserthemes, '', '', '', true) );
/// course themes
$interface['allowcoursethemes'] = new configvar (get_string('configallowcoursethemes', 'admin'),
choose_from_menu ($noyesoptions, 'allowcoursethemes', $config->allowcoursethemes, '', '', '', true) );
/// allowuserblockhiding
$interface['allowuserblockhiding'] = new configvar (get_string('configallowuserblockhiding', 'admin'),
choose_from_menu ($noyesoptions, 'allowuserblockhiding', $config->allowuserblockhiding, '', '', '', true) );
/// showblocksonmodpages
$interface['showblocksonmodpages'] = new configvar (get_string('configshowblocksonmodpages', 'admin'),
choose_from_menu ($noyesoptions, 'showblocksonmodpages', $config->showblocksonmodpages, '', '', '', true) );
/// tabselectedtofront
$interface['tabselectedtofront'] = new configvar (get_string('tabselectedtofront', 'admin'),
choose_from_menu ($noyesoptions, 'tabselectedtofront', $config->tabselectedtofront, '', '', '', true) );
////////////////////////////////////////////////////////////////////
/// USER config variables
////////////////////////////////////////////////////////////////////
$user = array();
/// sitepolicy
$user['sitepolicy'] = new configvar (get_string('configsitepolicy', 'admin'),
'<input type="text" name="sitepolicy" size="60" value="'.$config->sitepolicy.'" alt="sitepolicy" />' );
/// fullnamedisplay
unset($options);
$options['language'] = get_string('language');
$options['firstname lastname'] = get_string('firstname') . ' + ' . get_string('lastname');
$options['lastname firstname'] = get_string('lastname') . ' + ' . get_string('firstname');
$options['firstname'] = get_string('firstname');
$user['fullnamedisplay'] = new configvar (get_string('configfullnamedisplay', 'admin'),
choose_from_menu ($options, 'fullnamedisplay', $config->fullnamedisplay, '', '', '', true) );
/// extendedusernamechars
$user['extendedusernamechars'] = new configvar (get_string('configextendedusernamechars', 'admin'),
choose_from_menu ($noyesoptions, 'extendedusernamechars', $config->extendedusernamechars, '', '', '', true) );
/// autologinguests
$user['autologinguests'] = new configvar (get_string('configautologinguests', 'admin'),
choose_from_menu ($noyesoptions, 'autologinguests', $config->autologinguests, '', '', '', true) );
/// hiddenuserfields
$fields = array('none', 'description', 'city', 'country', 'webpage', 'icqnumber', 'skypeid', 'yahooid', 'aimid', 'msnid', 'lastaccess');
if (empty($config->hiddenuserfields)) {
$config->hiddenuserfields = 'none';
}
$configfields = array_flip(explode(',', $config->hiddenuserfields));
$fieldoptions = '';
foreach ($fields as $value) {
$fieldoptions .= '<option value="'.$value.'"';
if (isset($configfields[$value])) {
$fieldoptions .= ' selected="selected"';
}
$fieldoptions .= '>'.get_string($value).'</option>';
}
$user['hiddenuserfields'] = new configvar (get_string('confighiddenuserfields', 'admin'),
'<select id="menuhiddenuserfields" name="hiddenuserfields[]" size="10" multiple="multiple">'.$fieldoptions.'</select>' );
////////////////////////////////////////////////////////////////////
/// SECURITY config variables
////////////////////////////////////////////////////////////////////
$security = array();
/// displayloginfailures
unset($options);
$options[''] = get_string('nobody');
$options['admin'] = get_string('administrators');
$options['teacher'] = get_string('administratorsandteachers');
$options['everybody'] = get_string('everybody');
$security['displayloginfailures'] = new configvar (get_string('configdisplayloginfailures', 'admin'),
choose_from_menu($options, 'displayloginfailures', $config->displayloginfailures, '', '', '', true) );
/// notifyloginfailures
unset($options);
$options[''] = get_string('nobody');
$options['mainadmin'] = get_string('administrator');
$options['alladmins'] = get_string('administratorsall');
$security['notifyloginfailures'] = new configvar (get_string('confignotifyloginfailures', 'admin'),
choose_from_menu($options, 'notifyloginfailures', $config->notifyloginfailures, '', '', '', true) );
/// notifyloginthreshold
unset($options);
for ($i=1; $i<=100; $i++) {
$options[$i] = "$i";
}
$security['notifyloginthreshold'] = new configvar (get_string('confignotifyloginthreshold', 'admin'),
choose_from_menu($options, 'notifyloginthreshold', $config->notifyloginthreshold, '', '', '', true) );
/// secureforms
$security['secureforms'] = new configvar (get_string('configsecureforms', 'admin'),
choose_from_menu ($noyesoptions, 'secureforms', $config->secureforms, '', '', '', true) );
/// loginhttps
$security['loginhttps'] = new configvar (get_string('configloginhttps', 'admin'),
choose_from_menu ($noyesoptions, 'loginhttps', $config->loginhttps, '', '', '', true) );
/// runclamonupload
$security['runclamonupload'] = new configvar (get_string('configrunclamonupload', 'admin'),
choose_from_menu($noyesoptions, 'runclamonupload', $config->runclamonupload, '', '', '', true) );
/// pathtoclam
$security['pathtoclam'] = new configvar (get_string('configpathtoclam', 'admin'),
'<input type="text" name="pathtoclam" size="30" value="'.$config->pathtoclam.'" alt="pathtoclam" />' );
/// quarantinedir
$security['quarantinedir'] = new configvar (get_string('configquarantinedir', 'admin'),
'<input type="text" name="quarantinedir" size="30" value="'.$config->quarantinedir.'" alt="quarantinedir" />' );
/// clamfailureonupload
unset($options);
$options['donothing'] = get_string('configclamdonothing', 'admin');
$options['actlikevirus'] = get_string('configclamactlikevirus', 'admin');
$security['clamfailureonupload'] = new configvar (get_string('configclamfailureonupload', 'admin'),
choose_from_menu($options, 'clamfailureonupload', $config->clamfailureonupload, '', '', '', true) );
////////////////////////////////////////////////////////////////////
/// MAINTENANCE config variables
////////////////////////////////////////////////////////////////////
$maintenance = array();
/// longtimenosee
unset($options);
$options[0] = get_string('never');
$options[1000] = get_string('numdays', '', 1000);
$options[365] = get_string('numdays', '', 365);
$options[180] = get_string('numdays', '', 180);
$options[150] = get_string('numdays', '', 150);
$options[120] = get_string('numdays', '', 120);
$options[90] = get_string('numdays', '', 90);
$options[60] = get_string('numdays', '', 60);
$options[30] = get_string('numdays', '', 30);
$options[21] = get_string('numdays', '', 21);
$options[14] = get_string('numdays', '', 14);
$options[7] = get_string('numdays', '', 7);
$maintenance['longtimenosee'] = new configvar (get_string('configlongtimenosee', 'admin'),
choose_from_menu ($options, 'longtimenosee', $config->longtimenosee, '', '', '', true) );
/// deleteunconfirmed
unset($options);
$options[0] = get_string('never');
$options[168] = get_string('numdays', '', 7);
$options[144] = get_string('numdays', '', 6);
$options[120] = get_string('numdays', '', 5);
$options[96] = get_string('numdays', '', 4);
$options[72] = get_string('numdays', '', 3);
$options[48] = get_string('numdays', '', 2);
$options[24] = get_string('numdays', '', 1);
$options[12] = get_string('numhours', '', 12);
$options[6] = get_string('numhours', '', 6);
$options[1] = get_string('numhours', '', 1);
$maintenance['deleteunconfirmed'] = new configvar (get_string('configdeleteunconfirmed', 'admin'),
choose_from_menu ($options, 'deleteunconfirmed', $config->deleteunconfirmed, '', '', '', true) );
/// loglifetime
unset($options);
$options[0] = get_string('neverdeletelogs');
$options[1000] = get_string('numdays', '', 1000);
$options[365] = get_string('numdays', '', 365);
$options[180] = get_string('numdays', '', 180);
$options[150] = get_string('numdays', '', 150);
$options[120] = get_string('numdays', '', 120);
$options[90] = get_string('numdays', '', 90);
$options[60] = get_string('numdays', '', 60);
$options[30] = get_string('numdays', '', 30);
$maintenance['loglifetime'] = new configvar (get_string('configloglifetime', 'admin'),
choose_from_menu ($options, 'loglifetime', $config->loglifetime, '', '', '', true) );
////////////////////////////////////////////////////////////////////
/// MAIL config variables
////////////////////////////////////////////////////////////////////
$mail = array();
/// smtphosts
$mail['smtphosts'] = new configvar (get_string('configsmtphosts', 'admin'),
'<input name="smtphosts" type="text" size="30" value="'.s($config->smtphosts).'" alt="smtphosts" />' );
/// smtpuser
$mail['smtpuser'] = new configvar (get_string('configsmtpuser', 'admin'),
'<input name="smtpuser" type="text" size="10" value="'.s($config->smtpuser).'" alt="smtpuser" />' );
/// smtppass
$mail['smtppass'] = new configvar ('',
'<input name="smtppass" type="password" size="10" value="'.s($config->smtppass).'" alt="smtppass" />' );
/// noreplyaddress
$mail['noreplyaddress'] = new configvar (get_string('confignoreplyaddress', 'admin'),
'<input name="noreplyaddress" type="text" size="30" value="'.s($config->noreplyaddress).'" alt="noreplyaddress" />' );
/// digestmailtime
$hours = array();
for ($i=0; $i<=23; $i++) {
$hours[$i] = sprintf("%02d",$i);
}
$mail['digestmailtime'] = new configvar (get_string('configdigestmailtime', 'admin'),
choose_from_menu($hours, 'digestmailtime', $config->digestmailtime, '', '', 0, true) );
/// allowemailaddresses
$mail['allowemailaddresses'] = new configvar (get_string('configallowemailaddresses', 'admin'),
'<input name="allowemailaddresses" type="text" size="60" value="'.s($config->allowemailaddresses).'" alt="allowemailaddresses" />' );
/// denyemailaddresses
$mail['denyemailaddresses'] = new configvar (get_string('configdenyemailaddresses', 'admin'),
'<input name="denyemailaddresses" type="text" size="60" value="'.s($config->denyemailaddresses).'" alt="denyemailaddresses" />' );
if (!empty($CFG->unicodedb)) { ///These options are only available if running under unicodedb
/// sitemailcharset
unset($options);
unset($charsets);
$charsets = get_list_of_charsets();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
$mail['sitemailcharset'] = new configvar (get_string('configsitemailcharset', 'admin'),
choose_from_menu($options, 'sitemailcharset', $config->sitemailcharset, '', '', '', true));
/// allowusermailcharset
$mail['allowusermailcharset'] = new configvar (get_string('configallowusermailcharset', 'admin'),
choose_from_menu($noyesoptions, 'allowusermailcharset', $config->allowusermailcharset, '', '', '', true));
}
/// enable stats
if (empty($CFG->disablestatsprocessing)) {
$stats['enablestats'] = new configvar (get_string('configenablestats','admin'),
choose_from_menu($noyesoptions, 'enablestats', $config->enablestats, '', '', '', true) );
unset($options);
$options['none'] = get_string('none');
$options[60*60*24*7] = get_string('numweeks','moodle',1);
$options[60*60*24*14] = get_string('numweeks','moodle',2);
$options[60*60*24*21] = get_string('numweeks','moodle',3);
$options[60*60*24*28] = get_string('nummonths','moodle',1);
$options[60*60*24*56] = get_string('nummonths','moodle',2);
$options[60*60*24*84] = get_string('nummonths','moodle',3);
$options[60*60*24*112] = get_string('nummonths','moodle',4);
$options[60*60*24*140] = get_string('nummonths','moodle',5);
$options[60*60*24*168] = get_string('nummonths','moodle',6);
$options['all'] = get_string('all');
$stats['statsfirstrun'] = new configvar (get_string('configstatsfirstrun','admin'),
choose_from_menu($options,'statsfirstrun',$config->statsfirstrun,'','','',true) );
unset($options);
$options[0] = get_string('untilcomplete');
$options[60*60] = '1 '.get_string('hour');
$options[60*60*2] = '2 '.get_string('hours');
$options[60*60*3] = '3 '.get_string('hours');
$options[60*60*4] = '4 '.get_string('hours');
$options[60*60*5] = '5 '.get_string('hours');
$options[60*60*6] = '6 '.get_string('hours');
$options[60*60*7] = '7 '.get_string('hours');
$options[60*60*8] = '8 '.get_string('hours');
if (empty($config->statsruntimestarthour)) {
$config->statsruntimestarthour = 0;
}
if (empty($config->statsruntimestartminute)) {
$config->statsruntimestartminute = 0;
}
$stats['statsmaxruntime'] = new configvar (get_string('configstatsmaxruntime','admin'),
choose_from_menu($options,'statsmaxruntime',$config->statsmaxruntime,'','','',true) );
$stats['statsruntimestart'] = new configvar (get_string('configstatsruntimestart','admin'),
print_time_selector("statsruntimestarthour","statsruntimestartminute",make_timestamp(2000,1,1,$config->statsruntimestarthour,$config->statsruntimestartminute),5,true) );
$stats['statsuserthreshold'] = new configvar (get_string('configstatsuserthreshold','admin'),
'<input type="text" name="statsuserthreshold" size="4" value="'.$config->statsuserthreshold.'" />');
}
////////////////////////////////////////////////////////////////////
$configvars['interface'] = $interface;
$configvars['security'] = $security;
$configvars['operatingsystem'] = $operatingsystem;
$configvars['maintenance'] = $maintenance;
$configvars['mail'] = $mail;
$configvars['user'] = $user;
$configvars['permissions'] = $permissions;
$configvars['requestedcourse'] = $reqcourse;
$configvars['misc'] = $misc;
if (empty($CFG->disablestatsprocessing)) {
$configvars['stats'] = $stats;
}
?>
+101 -36
View File
@@ -17,7 +17,11 @@
/// from the command line.
define('FULLME', 'cron');
/// Do not set moodle cookie because we do not need it here, it is better to emulate session
$nomoodlecookie = true;
/// The current directory in PHP version 4.3.0 and above isn't necessarily the
/// directory of the script when run from the command line. The require_once()
/// would fail, so we'll have to chdir()
@@ -29,31 +33,53 @@
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir.'/adminlib.php');
if (!$alreadyadmin = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
unset($_SESSION['USER']);
unset($USER);
unset($_SESSION['SESSION']);
unset($SESSION);
$USER = get_admin(); /// Temporarily, to provide environment for this script
// we need to override the admin timezone to the moodle timezone!
$USER->timezone = $CFG->timezone;
/// extra safety
@session_write_close();
/// check if execution allowed
if (isset($_SERVER['REMOTE_ADDR'])) { // if the script is accessed via the web.
if (!empty($CFG->cronclionly)) {
// This script can only be run via the cli.
print_error('cronerrorclionly', 'admin');
exit;
}
// This script is being called via the web, so check the password if there is one.
if (!empty($CFG->cronremotepassword)) {
$pass = optional_param('password', '', PARAM_RAW);
if($pass != $CFG->cronremotepassword) {
// wrong password.
print_error('cronerrorpassword', 'admin');
exit;
}
}
}
//unset test cookie, user must login again anyway
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
/// switch to site language and locale
if (!empty($CFG->courselang)) {
unset ($CFG->courselang);
}
if (!empty($SESSION->lang)) {
unset ($SESSION->lang);
}
/// emulate normal session
$SESSION = new object();
$USER = get_admin(); /// Temporarily, to provide environment for this script
/// ignore admins timezone, language and locale - use site deafult instead!
$USER->timezone = $CFG->timezone;
$USER->lang = '';
moodle_setlocale();
$USER->theme = '';
course_setup(SITEID);
/// send mime type and encoding
@header('Content-Type: text/plain; charset='.current_charset());
if (check_browser_version('MSIE')) {
//ugly IE hack to work around downloading instead of viewing
@header('Content-Type: text/html; charset=utf-8');
echo "<xmp>"; //<pre> is not good enough for us here
} else {
//send proper plaintext header
@header('Content-Type: text/plain; charset=utf-8');
}
/// no more headers and buffers
while(@ob_end_flush());
/// increase memory limit (PHP 5.2 does different calculation, we need more memory now)
@raise_memory_limit('128M');
/// Start output log
@@ -107,11 +133,25 @@
}
}
mtrace("Finished blocks");
mtrace('Finished blocks');
if (!empty($CFG->langcache)) {
mtrace('Updating languages cache');
get_list_of_languages();
get_list_of_languages(true);
}
mtrace('Removing expired enrolments ...', ''); // See MDL-8785
$timenow = time();
if ($oldenrolments = get_records_select('role_assignments', "timeend > 0 AND timeend < '$timenow'")) {
mtrace(count($oldenrolments).' to delete');
foreach ($oldenrolments as $oldenrolment) {
if (role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid)) {
mtrace("Deleted expired role assignment $oldenrolment->roleid for user $oldenrolment->userid from context $oldenrolment->contextid");
}
}
mtrace('Done');
} else {
mtrace('none found');
}
@@ -132,8 +172,8 @@
if ($assigns = get_users_longtimenosee($longtime)) {
foreach ($assigns as $assign) {
if ($context = get_context_instance(CONTEXT_COURSE, $assign->courseid)) {
if (role_unassign(0, $assign->userid, 0, $context->id)) {
mtrace("Deleted student enrolment for user $assign->userid from course $assign->courseid");
if (role_unassign(0, $assign->id, 0, $context->id)) {
mtrace("Deleted assignment for user $assign->id from course $assign->courseid");
}
}
}
@@ -143,11 +183,13 @@
/// Delete users who haven't confirmed within required period
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_unconfirmed($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted unconfirmed user for ".fullname($user, true)." ($user->id)");
if (!empty($CFG->deleteunconfirmed)) {
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_unconfirmed($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted unconfirmed user for ".fullname($user, true)." ($user->id)");
}
}
}
}
@@ -157,11 +199,13 @@
/// Delete users who haven't completed profile within required period
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_not_fully_set_up($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted not fully setup user $user->username ($user->id)");
if (!empty($CFG->deleteunconfirmed)) {
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_not_fully_set_up($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted not fully setup user $user->username ($user->id)");
}
}
}
}
@@ -224,7 +268,7 @@
//Execute backup's cron
//Perhaps a long time and memory could help in large sites
@set_time_limit(0);
@raise_memory_limit("128M");
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
// if we are running from Apache, give httpd a hint that
// it can recycle the process after it's done. Apache's
@@ -276,6 +320,22 @@
unset($enrol);
}
/// Run the auth cron, if any
$auths = get_enabled_auth_plugins();
mtrace("Running auth crons if required...");
foreach ($auths as $auth) {
$authplugin = get_auth_plugin($auth);
if (method_exists($authplugin, 'cron')) {
mtrace("Running cron for auth/$auth...");
$authplugin->cron();
if (!empty($authplugin->log)) {
mtrace($authplugin->log);
}
}
unset($authplugin);
}
if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) {
// check we're not before our runtime
@@ -287,7 +347,7 @@
if (!empty($CFG->statsmaxruntime)) {
$time = $CFG->statsmaxruntime+(60*30); // add on half an hour just to make sure (it could take that long to break out of the loop)
}
if (!get_field_sql('SELECT id FROM '.$CFG->prefix.'stats_daily LIMIT 1')) {
if (!get_field_sql('SELECT id FROM '.$CFG->prefix.'stats_daily')) {
// first run, set another lock. we'll check for this in subsequent runs to set the timeout to later for the normal lock.
set_cron_lock('statsfirstrunlock',true,$time,true);
$firsttime = true;
@@ -330,4 +390,9 @@
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
/// finishe the IE hack
if (check_browser_version('MSIE')) {
echo "</xmp>";
}
?>
+1 -1
View File
@@ -20,7 +20,7 @@
if (!empty($topframe)) {
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
"<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> Database performance");
"<a $CFG->frametarget href=\"index.php\">$stradministration</a> -> Database performance");
exit;
}
+7 -4
View File
@@ -52,8 +52,9 @@
print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
echo "<form target=\"{$CFG->framename}\" name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
echo "<div>";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
$table = new stdClass();
$table->head = array(get_string('name'), get_string('enable'), get_string('default'), $str->settings);
@@ -63,6 +64,7 @@
$table->data = array();
$modules = get_list_of_plugins("enrol");
$enabledplugins = explode(',', $CFG->enrol_plugins_enabled);
foreach ($modules as $module) {
// skip if directory is empty
@@ -73,7 +75,7 @@
$name = get_string("enrolname", "enrol_$module");
$plugin = enrolment_factory::factory($module);
$enable = '<input type="checkbox" name="enable[]" value="'.$module.'"';
if (stristr($CFG->enrol_plugins_enabled, $module) !== false) {
if (in_array($module, $enabledplugins)) {
$enable .= ' checked="checked"';
}
if ($module == 'manual') {
@@ -96,7 +98,8 @@
print_table($table);
echo "<center><input type=\"submit\" value=\"".get_string("savechanges")."\"></center>\n";
echo "<div style=\"text-align:center\"><input type=\"submit\" value=\"".get_string("savechanges")."\" /></div>\n";
echo "</div>";
echo "</form>";
admin_externalpage_print_footer($adminroot);
+7 -14
View File
@@ -44,17 +44,10 @@
admin_externalpage_print_header($adminroot);
echo "<form target=\"{$CFG->framename}\" name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
echo "<div align=\"center\"><p><b>";
/// Choose an enrolment method
echo get_string('chooseenrolmethod').': ';
choose_from_menu ($options, "enrol", $enrol, "",
"document.location='enrol_config.php?enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", "");
echo "</b></p></div>";
echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
echo "<div>";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
echo "<input type=\"hidden\" name=\"enrol\" value=\"".$enrol."\" />";
/// Print current enrolment type description
print_simple_box_start("center", "80%");
@@ -68,10 +61,10 @@
$enrolment->config_form($frm);
echo "<center><p><input type=\"submit\" value=\"".get_string("savechanges")."\"></p></center>\n";
echo "</form>";
echo "<p class=\"centerpara\"><input type=\"submit\" value=\"".get_string("savechanges")."\" /></p>\n";
print_simple_box_end();
echo "</div>";
echo "</form>";
admin_externalpage_print_footer($adminroot);
+6 -6
View File
@@ -91,7 +91,7 @@
/// Start of main box
print_simple_box_start('center');
echo "<center>".$stradminhelpenvironment."</center><br />";
echo "<div style=\"text-align:center\">".$stradminhelpenvironment."</div><br />";
/// Get current Moodle version
$current_version = $CFG->release;
@@ -121,11 +121,11 @@
}
/// Print form and popup menu
echo '<center><form method="post" action="environment.php">';
echo $strmoodleversion.' ';
choose_from_menu ($versions, 'version', $version, null, 'this.form.submit();' );
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '</form></center>';
echo '<div style="text-align:center">'.$strmoodleversion.' ';
popup_form("$CFG->wwwroot/$CFG->admin/environment.php?version=",
$versions, 'selectversion', $version, '');
echo '</div>';
/// End of main box
print_simple_box_end();
+56
View File
@@ -35,6 +35,11 @@
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.7">
<UNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="unicoderecommended" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
@@ -45,6 +50,7 @@
<VENDOR name="postgres" version="7.4" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
@@ -63,4 +69,54 @@
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.8">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="7.4" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+5 -7
View File
@@ -59,10 +59,10 @@
// run through submitted data
// reject if does not start with filter_
foreach ($config as $name => $value) {
set_config( $name,$value );
set_config($name, stripslashes($value));
}
}
redirect( "$CFG->wwwroot/$CFG->admin/filters.php", get_string('changessaved'), 1);
redirect("$CFG->wwwroot/$CFG->admin/filters.php");
exit;
}
@@ -74,27 +74,25 @@
admin_externalpage_print_header($adminroot);
print_heading( $filtername );
print_simple_box("<center>".get_string("configwarning", "admin")."</center>", "center", "50%");
print_simple_box(get_string("configwarning", "admin"), "center", "50%");
echo "<br />";
print_simple_box_start("center",'');
?>
<form action="filter.php?filter=<?php echo urlencode($param->filter); ?>" method="post">
<div style="text-align: center">
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
<center>
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
<input type="submit" name="reset" value="<?php echo print_string('resettodefaults'); ?>" />
</center>
</div>
</form>
<?php
print_simple_box_end();
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+8 -13
View File
@@ -182,15 +182,10 @@
// construct the flexible table ready to display
$table = new flexible_table(FILTER_TABLE);
$table->define_columns(array('name', 'hideshow', 'order', 'settings'));
$table->column_style('hideshow', 'text-align', 'center');
$table->column_style('order', 'text-align', 'center');
$table->column_style('settings', 'text-align', 'center');
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'flexible generaltable generalbox');
$table->set_attribute('style', 'margin:auto;');
$table->set_attribute('cellpadding', '5');
$table->set_attribute('id', 'filters');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// iterate through filters adding to display table
@@ -201,13 +196,13 @@
// 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\" height=\"16\" width=\"16\" alt=\"hide\" /></a>";
$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\" height=\"16\" width=\"16\" alt=\"show\" /></a>";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/show.gif\" class=\"icon\" alt=\"$txt->show\" /></a>";
$hidden = true;
$displayname = "<span class=\"dimmed_text\">$name</span>";
}
@@ -217,17 +212,17 @@
if (!$hidden) {
if ($updowncount>1) {
$updown .= "<a href=\"$myurl&amp;action=up&amp;filterpath=$upath\">";
$updown .= "<img src=\"$img/up.gif\" alt=\"up\" /></a>&nbsp;";
$updown .= "<img src=\"$img/up.gif\" alt=\"$txt->up\" /></a>&nbsp;";
}
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" height=\"16\" width=\"16\" alt=\"\" />&nbsp;";
$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=\"down\" /></a>";
$updown .= "<img src=\"$img/down.gif\" alt=\"$txt->down\" /></a>";
}
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" height=\"16\" width=\"16\" alt=\"\" />";
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" class=\"icon\" alt=\"\" />";
}
++$updowncount;
}
+2 -2
View File
@@ -40,7 +40,7 @@ while(!feof($fd)) {
$user = get_record("user","id",$log->userid);
$course = get_record("course","id",$log->course);
$subject = get_string('virusfoundsubject','moodle',$site->fullname);
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
$a->date = userdate($log->time);
$a->action = $action;
@@ -78,7 +78,7 @@ function notify_admins_unknown($file,$a) {
global $site;
$admins = get_admins();
$subject = get_string('virusfoundsubject','moodle',$site->fullname);
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
$body = get_string('virusfoundlateradminnolog','moodle',$a);
foreach ($admins as $admin) {
email_to_user($admin,$admin,$subject,$body);
+149 -55
View File
@@ -27,7 +27,9 @@
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$agreelicence = optional_param('agreelicence',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);
/// check upgrade status first
@@ -36,6 +38,11 @@
}
upgrade_check_running("Upgrade already running in this session, please wait!<br />Click on the exclamation marks to ignore this warning (<a href=\"index.php?ignoreupgradewarning=1\">!!!</a>).", 10);
/// set install/upgrade autocontinue session flag
if ($autopilot) {
$_SESSION['installautopilot'] = $autopilot;
}
/// Check some PHP server settings
$documentationlink = '<a href="http://docs.moodle.org/en/Installation">Installation docs</a>';
@@ -52,6 +59,13 @@
error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
}
if (empty($CFG->prefix) && $CFG->dbfamily != 'mysql') { //Enforce prefixes for everybody but mysql
error('$CFG->prefix can\'t be empty for your target DB (' . $CFG->dbtype . ')');
}
if ($CFG->dbfamily == 'oracle' && strlen($CFG->prefix) > 2) { //Max prefix length for Oracle is 2cc
error('$CFG->prefix maximum allowed length for Oracle DBs is 2cc.');
}
/// Check that config.php has been edited
@@ -83,6 +97,14 @@
$CFG->version = "";
}
if (is_readable("$CFG->dirroot/version.php")) {
include_once("$CFG->dirroot/version.php"); # defines $version
}
if (!$version or !$release) {
error('Main version.php was not readable or specified');# without version, stop
}
/// Check if the main tables have been installed yet or not.
if (! $tables = $db->Metatables() ) { // No tables yet at all.
@@ -100,31 +122,43 @@
}
}
}
$linktoscrolltoerrors = '<script type="text/javascript" src="' . $CFG->wwwroot . '/lib/scroll_to_errors.js"></script>';
if (! $maintables) {
/// hide errors from headers in case debug enabled in config.php
$origdebug = $CFG->debug;
$CFG->debug = DEBUG_MINIMAL;
error_reporting($CFG->debug);
if (empty($agreelicence)) {
$strlicense = get_string("license");
if (empty($agreelicense)) {
$strlicense = get_string('license');
print_header($strlicense, $strlicense, $strlicense, "", "", false, "&nbsp;", "&nbsp;");
print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
print_heading(get_string("copyrightnotice"));
print_simple_box_start('center');
echo text_to_html(get_string("gpl"));
print_simple_box_end();
print_heading(get_string('copyrightnotice'));
print_box(text_to_html(get_string('gpl')), 'copyrightnotice');
echo "<br />";
notice_yesno(get_string("doyouagree"), "index.php?agreelicence=true",
notice_yesno(get_string('doyouagree'), "index.php?agreelicense=1",
"http://docs.moodle.org/en/License");
print_footer('none');
exit;
}
if (empty($confirmrelease)) {
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="agreelicense" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</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;
}
$strdatabasesetup = get_string("databasesetup");
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
"", $linktoscrolltoerrors, false, "&nbsp;", "&nbsp;");
"", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
/// return to original debugging level
$CFG->debug = $origdebug;
error_reporting($CFG->debug);
@@ -133,6 +167,13 @@
/// Both old .sql files and new install.xml are supported
/// But we prioritise install.xml (XMLDB) if present
change_db_encoding(); // first try to change db encoding to utf8
if (!setup_is_unicodedb()) {
// If could not convert successfully, throw error, and prevent installation
print_error('unicoderequired', 'admin');
}
$status = false;
if (file_exists("$CFG->libdir/db/install.xml")) {
$status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
@@ -142,13 +183,21 @@
error("Error: Your database ($CFG->dbtype) is not yet fully supported by Moodle or install.xml is not present. See the lib/db directory.");
}
// all new installs are in unicode - keep for backwards compatibility and 1.8 upgrade checks
set_config('unicodedb', 1);
/// Continue with the instalation
$db->debug = false;
if ($status) {
//ugly hack - install new groups: MDL-9217
require_once("$CFG->dirroot/group/db/upgrade.php");
install_group_db();
// Install the roles system.
moodle_install_roles();
set_config('statsrolesupgraded',time());
// Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
// (this should only have any effect during initial install).
$adminroot = admin_get_root();
@@ -164,15 +213,19 @@
'enrol' => 'manual',
'enrol_plugins_enabled' => 'manual',
'guestloginbutton' => 1,
'registerauth' => 'email',
'style' => 'default',
'template' => 'default',
'theme' => 'standardwhite'));
'theme' => 'standardwhite',
'filter_multilang_converted' => 1));
notify($strdatabasesuccess, "green");
require_once $CFG->dirroot.'/mnet/lib.php';
} else {
error("Error: Main databases NOT set up successfully");
}
print_continue('index.php');
print_footer('none');
die;
}
@@ -180,13 +233,6 @@
/// Check version of Moodle code on disk compared with database
/// and upgrade if possible.
if ( is_readable("$CFG->dirroot/version.php")) {
include_once("$CFG->dirroot/version.php"); # defines $version
}
if (!$version) {
error('Main version.php was not readable or specified');# without version, stop
}
if (file_exists("$CFG->dirroot/lib/db/$CFG->dbtype.php")) {
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines old upgrades
}
@@ -199,6 +245,12 @@
if ($CFG->version) {
if ($version > $CFG->version) { // upgrade
/// If the database is not already Unicode then we do not allow upgrading!
/// Instead, we print an error telling them to upgrade to 1.7 first. MDL-6857
if (empty($CFG->unicodedb)) {
print_error('unicodeupgradeerror', 'error', '', $version);
}
$a->oldversion = "$CFG->release ($CFG->version)";
$a->newversion = "$release ($version)";
$strdatabasechecking = get_string("databasechecking", "", $a);
@@ -216,17 +268,48 @@
if (empty($confirmupgrade)) {
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
"", "", false, "&nbsp;", "&nbsp;");
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=yes', 'index.php');
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
exit;
} else if (empty($confirmrelease)){
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
require_once($CFG->libdir.'/environmentlib.php');
print_heading(get_string('environment', 'admin'));
if (!check_moodle_environment($release, $environment_results, true)) {
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
} else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</div>';
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="1" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
}
print_footer('none');
die;
} else {
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
"", $linktoscrolltoerrors, false, "&nbsp;", "&nbsp;");
"", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
/// return to original debugging level
$CFG->debug = $origdebug;
error_reporting($CFG->debug);
upgrade_log_start();
/// Upgrade current language pack if we can
upgrade_language_pack();
print_heading($strdatabasechecking);
$db->debug=true;
/// Launch the old main upgrade (if exists)
@@ -242,6 +325,9 @@
/// If successful, continue upgrading roles and setting everything properly
if ($status) {
if (empty($CFG->rolesactive)) {
//ugly hack - upgrade to new groups (from 1.6) : MDL-9217
require_once("$CFG->dirroot/group/db/upgrade.php");
install_group_db();
// Upgrade to the roles system.
moodle_install_roles();
set_config('rolesactive', 1);
@@ -256,13 +342,17 @@
remove_dir($CFG->dataroot . '/cache', true); // flush cache
notify($strdatabasesuccess, "green");
print_continue("upgradesettings.php");
print_footer('none');
exit;
} else {
notify("Upgrade failed! (Could not update version in config table)");
error('Upgrade failed! (Could not update version in config table)');
}
/// Main upgrade not success
} else {
notify("Upgrade failed! See /version.php");
notify('Main Upgrade failed! See lib/db/upgrade.php');
print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1');
print_footer('none');
die;
}
upgrade_log_finish();
}
@@ -280,15 +370,16 @@
/// Updated human-readable release version if necessary
if ($release <> $CFG->release) { // Update the release version
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
if (!set_config("release", $release)) {
notify("ERROR: Could not update release version in database!!");
error("ERROR: Could not update release version in database!!");
}
notice(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'index.php', 'none');
}
/// ugly hack - convert to new groups if upgrading from 1.7; must be reworked
require_once("$CFG->dirroot/group/db/upgrade.php");
upgrade_group_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Find and check all main modules and load them up or upgrade them if necessary
/// first old *.php update and then the new upgrade.php script
upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
@@ -316,14 +407,24 @@
/// 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 course formats and upgrade if necessary
upgrade_plugins('format','course/format',"$CFG->wwwroot/$CFG->admin/index.php");
/// Check for local database customisations
/// first old *.php update and then the new upgrade.php script
require_once("$CFG->dirroot/lib/locallib.php");
upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for changes to RPC functions
require_once($CFG->dirroot.'/admin/mnet/adminlib.php');
upgrade_RPC_functions("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// just make sure upgrade logging is properly terminated
upgrade_log_finish();
unset($_SESSION['installautopilot']);
/// Set up the blank site - to be customized later at the end of install.
if (! $site = get_site()) {
// We are about to create the site "course"
@@ -382,7 +483,7 @@
/// Define the unique site ID code if it isn't already
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
/// Check if the guest user exists. If not, create one.
@@ -394,6 +495,7 @@
$guest->lastname = " ";
$guest->email = "root@localhost";
$guest->description = addslashes(get_string("guestuserinfo"));
$guest->mnethostid = $CFG->mnet_localhost_id;
$guest->confirmed = 1;
$guest->lang = $CFG->lang;
$guest->timemodified= time();
@@ -406,7 +508,7 @@
/// Set up the admin user
if (empty($CFG->rolesactive)) {
redirect('user.php');
create_admin_user();
}
/// Check for valid admin user
@@ -418,7 +520,7 @@
/// check that site is properly customized
if (empty($site->shortname) or empty($site->shortname)) {
redirect('settings.php?section=frontpage&amp;return=site');
redirect('settings.php?section=frontpagesettings&amp;return=site');
}
/// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
@@ -439,24 +541,20 @@
/// Deprecated database! Warning!!
if (!empty($CFG->migrated_to_new_db)) {
print_simple_box_start('center','60%');
print_string('dbmigrationdeprecateddb','admin');
print_simple_box_end();
print_box(print_string('dbmigrationdeprecateddb', 'admin'), 'generalbox adminwarning');
}
/// Check for any special upgrades that might need to be run
if (!empty($CFG->upgrade)) {
print_simple_box(get_string("upgrade$CFG->upgrade", "admin",
"$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"), "center", '60%');
print_spacer(10,10);
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_simple_box(get_string('globalsquoteswarning', 'admin'), 'center', '60%');
print_box(get_string('globalsquoteswarning', 'admin'), 'generalbox adminwarning');
}
if (is_dataroot_insecure()) {
print_simple_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'center', '60%');
print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
}
/// If no recently cron run
@@ -464,18 +562,19 @@
if (time() - $lastcron > 3600 * 24) {
$strinstallation = get_string('installation', 'install');
$helpbutton = helpbutton('install', $strinstallation, 'moodle', true, false, '', true);
print_simple_box(get_string('cronwarning', 'admin')."&nbsp;".$helpbutton, 'center', '60%');
print_box(get_string('cronwarning', 'admin')."&nbsp;".$helpbutton, 'generalbox adminwarning');
}
/// Print multilang upgrade notice if needed
if (empty($CFG->filter_multilang_converted)) {
print_box(get_string('multilangupgradenotice', 'admin'), 'generalbox adminwarning');
}
/// Alert if we are currently in maintenance mode
if (file_exists($CFG->dataroot.'/1/maintenance.html')) {
print_simple_box(get_string('sitemaintenancewarning', 'admin') , 'center', '60%');
print_box(get_string('sitemaintenancewarning', 'admin'), 'generalbox adminwarning');
}
/// Alert to display the utf-8 migration button (if !unicode yet and DB is MySQL or PG)
if (empty($CFG->unicodedb) && in_array($CFG->dbtype, array('mysql', 'postgres7'))) {
print_simple_box(get_string('unicodeupgradenotice', 'admin') , 'center', '60%');
}
/// Print slightly annoying registration button every six months ;-)
/// You can set the "registered" variable to something far in the future
@@ -483,12 +582,10 @@
if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_simple_box_start('center','60%');
echo '<div align="center">';
print_box_start('generalbox adminwarning');
print_string('pleaseregister', 'admin');
print_single_button('register.php', $options, get_string('registration'));
echo '</div>';
print_simple_box_end();
print_box_end();
$registrationbuttonshown = true;
}
@@ -499,29 +596,26 @@
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
echo '<p class="copyright">'.$copyrighttext.'</p>';
print_box($copyrighttext, 'copyright');
//////////////////////////////////////////////////////////////////////////////////////////////////
if (empty($registrationbuttonshown)) {
echo '<div align="center">';
$options = array();
$options['sesskey'] = $USER->sesskey;
print_single_button('register.php', $options, get_string('registration'));
echo '</div>';
}
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_simple_box_start('center','60%');
print_box_start();
require_once($CFG->dirroot.'/'.$CFG->admin.'/utfdbmigrate.php');
db_migrate2utf8();
print_simple_box_end();
print_box_end();
}
admin_externalpage_print_footer($adminroot);
?>
+1 -1
View File
@@ -14,7 +14,7 @@
admin_externalpage_print_header($adminroot);
print_heading('Convert all MySQL tables from MYISAM to InnoDB');
if ($CFG->dbtype != 'mysql') {
if ($CFG->dbfamily != 'mysql') {
notice('This function is for MySQL databases only!', 'index.php');
}
+225 -122
View File
@@ -1,35 +1,6 @@
<?PHP // $Id$
/**
* Display the admin/language menu and process strings translation.
*
* CHANGES
*
* 2006/06/08 mudrd8mz
* 1) Fixed bug 5745 reported by Harry Smith so now can edit en_utf8_local pack
* 2) More notification messages included
*
* 2006/05/30 mudrd8mz
* Merged with version by Mitsuhiro Yoshida - display icon links instead of text links
* (I have changed the position of arrow icons to not to be so close each other)
*
* 2006/05/19 mudrd8mz
* A lot of changes to support translation of *_utf8_local langugage packs. Needs testing
*
* 2006/05/16 mudrd8mz
* 1) LANG_DEFAULT_FILE can be now set. moodle.php used to be opened automatically.
* As it was (and still is) one of the biggest files it usually took a long time to load the page
* even if you just want to choose the file to translate.
* 2) added links from "missing" to "compare" mode page
* 3) english strings are now key-sorted in "missing" mode
* 4) list of files with missing strings is now displayed at the top of "missing" page
*
* 2006/05/14 mudrd8mz Improvements of lang.php,v 1.65 2006/04/10 22:15:57 stronk7 Exp
* 1) "go to first missing string" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* 2) "go to next missing" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* 3) submit button may be repeated (see LANG_SUBMIT_REPEAT*)
* 4) added (empty) "summary" attribute for the <table>'s
* 5) added error_reporting(E_ALL ^ E_NOTICE); in "compare" mode (even in debug environment
* we know that missing keys are missing strings here, not bugs ;-)
*/
require_once('../config.php');
@@ -43,6 +14,8 @@
define('LANG_DEFAULT_FILE', ''); // default file to translate. Empty allowed
define('LANG_LINK_MISSING_STRINGS', 1); // create links from "missing" page to "compare" page?
define('LANG_DEFAULT_USELOCAL', 0); // should *_utf8_local be used by default?
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)
$mode = optional_param('mode', '', PARAM_ALPHA);
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
@@ -64,42 +37,37 @@
$streditstrings = get_string("editstrings", 'admin');
$stredithelpdocs = get_string("edithelpdocs", 'admin');
$strthislanguage = get_string("thislanguage");
$strgotofirst = get_string('gotofirstmissing','admin');
$strfilestoredin = get_string('langstorein', 'admin');
$strfilestoredinhelp = get_string('langstoreinhelp', 'admin');
$strswitchlangdirbtn = get_string('langstoreswitch', 'admin');
$strchoosefiletoedit = get_string('langchoosefile', 'admin');
$strgotofirst = get_string('gotofirst','admin');
$strfilestoredin = get_string('filestoredin', 'admin');
$strfilestoredinhelp = get_string('filestoredinhelp', 'admin');
$strswitchlang = get_string('switchlang', 'admin');
$strchoosefiletoedit = get_string('choosefiletoedit', 'admin');
$streditennotallowed = get_string('langnoeditenglish', 'admin');
$strfilecreated = get_string('langfilecreated', 'admin');
$strfilecreated = get_string('filecreated', 'admin');
$strprev = get_string('previous');
$strnext = get_string('next');
// FIXME / TODO
// remove following lines after adding string into proper english lang pack
$strgotofirst = 'go to first missing string';
$strfilestoredin = 'Save file into folder :';
$strfilestoredinhelp = 'Where the file will be stored';
$strswitchlangdirbtn = 'switch';
$strchoosefiletoedit = 'Choose file to edit from the box above';
$streditennotallowed = 'Language en_utf8 cannot be edited with this page - switch to local';
$strfilecreated = 'New file created';
$currentlang = current_language();
switch ($mode) {
case "missing":
// Missing array keys are not bugs here but missing strings
error_reporting(E_ALL ^ E_NOTICE);
$navigation = "<a href=\"lang.php\">$strlanguage</a> -> $strmissingstrings";
$title = $strmissingstrings;
$button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
$button = '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<div>'.
'<input type="hidden" name="mode" value="compare" />'.
'<input type="submit" value="'.$streditstrings.'" /></form>';
'<input type="submit" value="'.$streditstrings.'" /></div></form>';
break;
case "compare":
$navigation = "<a href=\"lang.php\">$strlanguage</a> -> $streditstrings";
$title = $streditstrings;
$button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
$button = '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<div>'.
'<input type="hidden" name="mode" value="missing" />'.
'<input type="submit" value="'.$strmissingstrings.'" /></form>';
'<input type="submit" value="'.$strmissingstrings.'" /></div></form>';
break;
default:
$title = $strlanguage;
@@ -112,34 +80,28 @@
admin_externalpage_print_header($adminroot);
if (!$mode) {
print_simple_box_start('center','80%');
echo '<div align="center">';
print_string('editlang','admin');
echo '<br />';
print_box_start();
$currlang = current_language();
$langs = get_list_of_languages();
echo "<b>$strcurrentlanguage:</b>";
echo '<br />';
echo popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
$options["lang"] = $currentlang;
$langs = get_list_of_languages(false, true);
popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", false, 'self', $strcurrentlanguage.':');
print_heading("<a href=\"lang.php?mode=missing\">$strmissingstrings</a>");
print_heading("<a href=\"lang.php?mode=compare\">$streditstrings</a>");
print_heading("<a href=\"langdoc.php\">$stredithelpdocs</a>");
echo '</div>';
print_simple_box_end();
print_box_end();
admin_externalpage_print_footer($adminroot);
exit;
}
// Get a list of all the root files in the English directory
$langbase = $CFG->dataroot . '/lang';
$enlangdir = "$CFG->dirroot/lang/en_utf8";
if ($currentlang == 'en_utf8') {
$langdir = $enlangdir;
} else {
$langdir = "$CFG->dataroot/lang/$currentlang";
$langdir = "$langbase/$currentlang";
}
$locallangdir = "$CFG->dataroot/lang/{$currentlang}_local";
$locallangdir = "$langbase/{$currentlang}_local";
if (! $stringfiles = get_directory_list($enlangdir, "", false)) {
error("Could not find English language pack!");
@@ -179,7 +141,7 @@
} else {
$fileismissing = 1;
// notify(get_string("filemissing", "", "$langdir/$file"));
$o .= '<div class="notifyproblem" align="center">'.get_string("filemissing", "", "$langdir/$file").'</div><br />';
$o .= '<div class="notifyproblem">'.get_string("filemissing", "", "$langdir/$file").'</div><br />';
$string = array();
}
@@ -207,6 +169,9 @@
$missinglinkstart = '';
$missinglinkend = '';
}
if (strlen($value) > LANG_MISSING_TEXT_MAX_LEN) {
$value = lang_xhtml_save_substr($value, 0, LANG_MISSING_TEXT_MAX_LEN) . ' ...'; // MDL-8852
}
$o .= "$"."string['".$missinglinkstart.$key.$missinglinkend."'] = \"$value\";<br />";
}
}
@@ -216,12 +181,7 @@
}
if ($m <> '') {
echo '<br />';
print_simple_box_start("center", "80%");
echo '<center><font size="2">';
echo $m;
echo '</font></center>';
print_simple_box_end();
print_box($m, 'filenames');
}
echo $o;
@@ -251,26 +211,34 @@
if (!empty($somethingfound)) {
print_continue("lang.php");
} else {
notice(get_string("languagegood"), "lang.php");
notice(get_string("languagegood"), "lang.php", '', $adminroot);
}
} else if ($mode == "compare") {
if (!file_exists($langbase) ){
if (!lang_make_directory($langbase) ){
error('ERROR: Could not create base lang directory ' . $langbase);
} else {
echo '<div class="notifysuccess">Created directory '.
$langbase .'</div>'."<br />\n";
}
}
if (!$uselocal && !file_exists($langdir)) {
if (!lang_make_directory($langdir)) {
error('ERROR: Could not create directory '.$langdir);
} else {
echo '<div class="notifysuccess" align="center">Created directory '.
echo '<div class="notifysuccess">Created directory '.
$langdir .'</div>'."<br />\n";
}
}
if ($uselocal && !file_exists($locallangdir)) {
if (!lang_make_directory($locallangdir)) {
echo '<div class="notifyproblem" align="center">ERROR: Could not create directory '.
echo '<div class="notifyproblem">ERROR: Could not create directory '.
$locallangdir .'</div>'."<br />\n";
$uselocal = 0;
} else {
echo '<div class="notifysuccess" align="center">Created directory '.
echo '<div class="notifysuccess">Created directory '.
$locallangdir .'</div>'."<br />\n";
}
}
@@ -313,8 +281,7 @@
print_heading_with_help($streditstrings, "langedit");
print_simple_box_start("center", "80%");
echo '<center><font size="2">';
print_box_start('generalbox editstrings');
foreach ($stringfiles as $file) {
if ($file == $currentfile) {
echo "<b>$file</b> &nbsp; ";
@@ -322,37 +289,37 @@
echo "<a href=\"lang.php?mode=compare&amp;currentfile=$file\">$file</a> &nbsp; ";
}
}
echo '</font></center>';
print_simple_box_end();
print_box_end();
print_heading("<a href=\"lang.php?mode=missing\">$strmissingstrings</a>", "center", 4); // one-click way back
print_simple_box_start("center", "80%");
echo '<center>'.$strfilestoredin.' <strong>';
print_box_start();
echo $strfilestoredin;
echo $uselocal ? "{$currentlang}_local" : $currentlang;
echo '</strong> ';
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
echo '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
echo '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<div>'.
'<input type="hidden" name="mode" value="compare" />'.
'<input type="hidden" name="currentfile" value="'.$currentfile.'" />'.
'<input type="hidden" name="uselocal" value="'.(1 - $uselocal % 2).'" />'.
'<input type="submit" value="'.$strswitchlangdirbtn.'" />'.
'</form></center>';
print_simple_box_end();
'<input type="submit" value="'.$strswitchlang.'" />'.
'</div></form>';
print_box_end();
if ($currentfile <> '') {
$saveto = $uselocal ? $locallangdir : $langdir;
error_reporting(0);
if (!file_exists("$saveto/$currentfile")) {
if (!@touch("$saveto/$currentfile")) {
print_heading(get_string("filemissing", "", "$saveto/$currentfile"), "center", 4, "error");
print_heading(get_string("filemissing", "", "$saveto/$currentfile"), '', 4, 'error');
} else {
print_heading($strfilecreated, "center", 4, "notifysuccess");
print_heading($strfilecreated, '', 4, 'notifysuccess');
}
}
if ($currentlang == "en_utf8" && !$uselocal) {
$editable = false;
print_heading($streditennotallowed, 'center', 4);
print_heading($streditennotallowed, '', 4);
} elseif ($f = fopen("$saveto/$currentfile","r+")) {
$editable = true;
fclose($f);
@@ -362,9 +329,9 @@
}
error_reporting($CFG->debug);
print_heading("$currentfile", "center", 4);
print_heading("$currentfile", "", 4);
if (LANG_DISPLAY_MISSING_LINKS && $editable) {
print_heading('<a href="#missing1">'.$strgotofirst.'</a>', "center", 4);
print_heading('<a href="#missing1">'.$strgotofirst.'</a>', "", 4);
}
unset($string);
@@ -372,7 +339,7 @@
$enstring = $string;
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
$enstring['thischarset'] = "<< TRANSLATORS: Specify the character set of your language here. Note that all text created while this language is active will be stored using this character set, so don't change it once you have set it. Example: iso-8859-1 >>";
$enstring['thischarset'] = "<< TRANSLATORS: Charset encoding - always use utf-8 >>";
$enstring['thisdirection'] = "<< TRANSLATORS: This string specifies the direction of your text, either left-to-right or right-to-left. Insert either 'ltr' or 'rtl' here. >>";
$enstring['parentlanguage'] = "<< TRANSLATORS: If your language has a Parent Language that Moodle should use when strings are missing from your language pack, then specify the code for it here. If you leave this blank then English will be used. Example: nl >>";
}
@@ -387,15 +354,16 @@
@include("$langdir/$currentfile");
if ($editable) {
echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
echo "<form id=\"$currentfile\" action=\"lang.php\" method=\"post\">";
echo '<div>';
}
echo "<table summary=\"\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
echo "<table summary=\"\" width=\"100%\" class=\"translator\">";
$linescounter = 0;
$missingcounter = 0;
foreach ($enstring as $key => $envalue) {
$linescounter++ ;
if (LANG_SUBMIT_REPEAT && $editable && $linescounter % LANG_SUBMIT_REPEAT_EVERY == 0) {
echo '<tr><td colspan="2">&nbsp;<td><br />';
echo '<tr><td>&nbsp;</td><td><br />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '<br />&nbsp;</td></tr>';
}
@@ -404,9 +372,18 @@
$envalue = str_replace("%%","%",$envalue);
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "\n\n".'<tr>';
echo '<td dir="ltr" lang="en" width="20%" nowrap="nowrap" valign="top">'.$key.'</td>'."\n";
echo '<td dir="ltr" lang="en" width="40%" valign="top">'.$envalue.'</td>'."\n";
echo "\n\n".'<tr class="';
if ($linescounter % 2 == 0) {
echo 'r0';
} else {
echo 'r1';
}
echo '">';
echo '<td dir="ltr" lang="en">';
echo '<span class="stren">'.$envalue.'</span>';
echo '<br />'."\n";
echo '<span class="strkey">'.$key.'</span>';
echo '</td>'."\n";
// Missing array keys are not bugs here but missing strings
error_reporting(E_ALL ^ E_NOTICE);
@@ -428,17 +405,17 @@
// green #AAFFAA - translation present in both system and local but is different
if (!$value) {
if (!$value2) {
$cellcolour = 'style="background-color: #ef6868"'; // TODO: replace by CSS class
$cellcolour = 'class="bothmissing"';
} else {
$cellcolour = 'style="background-color: #feff7f"'; // TODO: replace by CSS class
$cellcolour = 'class="mastermissing"';
}
$missingcounter++;
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
'<img src="' . $CFG->pixpath . '/t/down.gif" height="11" width="11" border="0" alt="" /></a>';
'<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" height="11" width="11" border="0" alt="" /></a>';
'<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
} else {
$missingtarget = '';
$missingnext = '';
@@ -446,7 +423,7 @@
}
} else {
if ($value <> $value2 && $value2 <> '') {
$cellcolour = 'style="background-color: #AAFFAA"'; // TODO: replace by CSS class
$cellcolour = 'class="localdifferent"';
} else {
$cellcolour = '';
}
@@ -456,13 +433,13 @@
}
if ($editable) {
echo '<td width="40%" '.$cellcolour.' valign="top">'. $missingprev . $missingtarget."\n";
echo '<td '.$cellcolour.' valign="top">'. $missingprev . $missingtarget."\n";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
$valuelen = strlen($envalue);
}
$cols=50;
$cols=40;
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
echo '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
@@ -478,11 +455,12 @@
echo $missingnext . '</td>';
} else {
echo '<td width="40%" bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
echo '<td '.$cellcolour.' valign="top">'.$value.'</td>';
}
echo '</tr>'."\n";
}
if ($editable) {
echo '<tr><td colspan="2">&nbsp;<td><br />';
echo '<tr><td>&nbsp;</td><td><br />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo ' <input type="hidden" name="currentfile" value="'.$currentfile.'" />';
echo ' <input type="hidden" name="mode" value="compare" />';
@@ -490,11 +468,14 @@
echo '</td></tr>';
}
echo '</table>';
echo '</form>';
if ($editable) {
echo '</div>';
echo '</form>';
}
} else {
// no $currentfile specified
print_heading($strchoosefiletoedit, "center", 4);
print_heading($strchoosefiletoedit, "", 4);
}
}
@@ -519,6 +500,18 @@
*/
function lang_save_file($path, $file, $strings, $local, $packstrings) {
global $CFG, $USER;
if (LANG_KEEP_ORPHANS) {
// let us load the current content of the file
unset($string);
@include("$path/$file");
if (isset($string)) {
$orphans = $string;
unset($string);
} else {
$orphans = array();
}
}
// let us rewrite the file
if (!$f = @fopen("$path/$file","w")) {
return false;
}
@@ -532,18 +525,22 @@ function lang_save_file($path, $file, $strings, $local, $packstrings) {
ksort($strings);
foreach ($strings as $key => $value) {
@list($id, $stringname) = explode('XXX',$key);
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
$value = str_replace("'", "\\'", $value); // Add slashes for '
$value = str_replace('"', "\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
$value = str_replace("\r", "",$value); // Remove linefeed characters
$value = trim($value); // Delete leading/trailing white space
$value = lang_fix_value_before_save($value);
if ($id == "string" and $value != ""){
if ((!$local) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) {
// Either we are saving the master language pack
// or we are saving local language pack and the strings differ.
fwrite($f,"\$string['$stringname'] = '$value';\n");
}
if (LANG_KEEP_ORPHANS && isset($orphans[$stringname])) {
unset($orphans[$stringname]);
}
}
}
if (LANG_KEEP_ORPHANS) {
// let us add orphaned strings, i.e. already translated strings without the English referential source
foreach ($orphans as $key => $value) {
fwrite($f,"\$string['$key'] = '".lang_fix_value_before_save($value)."'; // ORPHANED\n");
}
}
fwrite($f,"\n?>\n");
@@ -552,7 +549,11 @@ function lang_save_file($path, $file, $strings, $local, $packstrings) {
}
/**
* Fix value of string to translate.
* Fix value of the translated string after it is load from the file.
*
* These modifications are typically necessary to work with the same string coming from two sources.
* We need to compare the content of these sources and we want to have e.g. "This string\r\n"
* to be the same as " This string\n".
*
* @param string $value Original string from the file
* @return string Fixed value
@@ -563,17 +564,38 @@ function lang_fix_value_from_file($value='') {
$value = trim($value); // Delete leading/trailing white space
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("&","&amp;",$value); // Fixes MDL-9248
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
return $value;
}
/**
* Fix value of the translated string before it is saved into the file
*
* @uses $CFG
* @param string $value Raw string to be saved into the lang pack
* @return string Fixed value
*/
function lang_fix_value_before_save($value='') {
global $CFG;
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
$value = str_replace("'", "\\'", $value); // Add slashes for '
$value = str_replace('"', "\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
$value = str_replace("\r", "",$value); // Remove linefeed characters
$value = trim($value); // Delete leading/trailing white space
return $value;
}
/**
* Try and create a new language directory.
*
* @uses $CFG
* @param string $directory directory name under $CFG->dataroot/lang eg cs_utf8_local
* @param string $directory full path to the directory under $langbase
* @return string|false Returns full path to directory if successful, false if not
*/
function lang_make_directory($dir, $shownotices=true) {
@@ -588,18 +610,99 @@ function lang_make_directory($dir, $shownotices=true) {
return $dir;
}
/// Following functions are required because '.' in form input names
/// get replaced by '_' by PHP.
/**
* Return the string key name for use in HTML form.
*
* Required because '.' in form input names get replaced by '_' by PHP.
*
* @param string $keyfromfile The key name containing '.'
* @return string The key name without '.'
*/
function lang_form_string_key($keyfromfile) {
return str_replace('.', '##46#', $keyfromfile); /// Derived from &#46, the ascii value for a period.
}
/**
* Return the string key name for use in file.
*
* Required because '.' in form input names get replaced by '_' by PHP.
*
* @param string $keyfromfile The key name without '.'
* @return string The key name containing '.'
*/
function lang_file_string_key($keyfromform) {
return str_replace('##46#', '.', $keyfromform);
}
/**
* Return the substring of the string and take care of XHTML compliance.
*
* There was a problem with pure substr() which could possibly produce XHTML parsing error:
* substr('Marks &amp; Spencer', 0, 9) -> 'Marks &am' ... is not XHTML compliance
* This function takes care of these cases. Fixes MDL-8852.
*
* Thanks to kovacsendre, the author of the function at http://php.net/substr
*
* @param string $str The original string
* @param int $start Start position in the $value string
* @param int $length Optional length of the returned substring
* @return string The substring as returned by substr() with XHTML compliance
* @todo Seems the function does not work with negative $start together with $length being set
*/
function lang_xhtml_save_substr($str, $start, $length = NULL) {
if ($length === 0) {
//stop wasting our time ;)
return "";
}
//check if we can simply use the built-in functions
if (strpos($str, '&') === false) {
// No entities. Use built-in functions
if ($length === NULL) {
return substr($str, $start);
} else {
return substr($str, $start, $length);
}
}
// create our array of characters and html entities
$chars = preg_split('/(&[^;\s]+;)|/', $str, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
$html_length = count($chars);
// check if we can predict the return value and save some processing time, i.e.:
// input string was empty OR
// $start is longer than the input string OR
// all characters would be omitted
if (($html_length === 0) or ($start >= $html_length) or (isset($length) and ($length <= -$html_length))) {
return '';
}
//calculate start position
if ($start >= 0) {
$real_start = $chars[$start][1];
} else {
//start'th character from the end of string
$start = max($start,-$html_length);
$real_start = $chars[$html_length+$start][1];
}
if (!isset($length)) {
// no $length argument passed, return all remaining characters
return substr($str, $real_start);
} elseif ($length > 0) {
// copy $length chars
if ($start+$length >= $html_length) {
// return all remaining characters
return substr($str, $real_start);
} else {
//return $length characters
return substr($str, $real_start, $chars[max($start,0)+$length][1] - $real_start);
}
} else {
//negative $length. Omit $length characters from end
return substr($str, $real_start, $chars[$html_length+$length][1] - $real_start);
}
}
?>
+5 -5
View File
@@ -40,7 +40,7 @@
if (!file_exists($langdir)) {
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang','',$adminroot);
}
// Shall I save POSTed data?
@@ -49,7 +49,7 @@
if (langdoc_save_file($langdir, $currentfile, $_POST['filedata'])) {
notify(get_string("changessaved")." ($langdir/$currentfile)", "green");
} else {
error("Could not save the file '$currentfile'!", "langdoc.php?currentfile=$currentfile&sesskey=$USER->sesskey");
error("Could not save the file '$currentfile'!", "langdoc.php?currentfile=$currentfile&sesskey=$USER->sesskey", $adminroot);
}
}
}
@@ -61,7 +61,7 @@
// Get all files from /docs directory
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/docs", "CVS")) {
error("Could not find English language docs files!");
error("Could not find English language docs files!",'',$adminroot);
}
$options = array();
@@ -81,7 +81,7 @@
// Get all files from /help directory
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/help", "CVS")) {
error("Could not find English language help files!");
error("Could not find English language help files!",'',$adminroot);
}
foreach ($files as $filekey => $file) { // check all the help files.
@@ -169,7 +169,7 @@ $langdir/$currentfile")."</font></p>";
echo "<td align=\"center\">\n";
if ($editable) {
echo "<form name=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
echo "<form id=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
+62 -75
View File
@@ -20,34 +20,40 @@
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($adminroot);
//reset and diagnose lang cache permissions
@unlink($CFG->dataroot.'/cache/languages');
if (file_exists($CFG->dataroot.'/cache/languages')) {
notify('Language cache can not be deleted, please check permissions in dataroot.');
}
get_list_of_languages(true); //refresh lang cache
switch ($mode){
case INSTALLATION_OF_SELECTED_LANG: ///installation of selected language pack
if (confirm_sesskey()) {
@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) {
case ERROR:
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'zip';
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
@@ -56,8 +62,8 @@
break;
case INSTALLED:
@unlink($CFG->dataroot.'/cache/languages');
redirect('langimport.php', get_string('langpackupdated','admin',$pack));
get_list_of_languages(true); //refresh lang cache
redirect('langimport.php', get_string('langpackupdated','admin',$pack), -1, $adminroot);
break;
case UPTODATE:
@@ -86,7 +92,7 @@
case DELETION_OF_SELECTED_LANG: //delete a directory(ies) containing a lang pack completely
if (!$confirm && confirm_sesskey()) {
notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang),
notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang),
'langimport.php?mode=4&amp;uninstalllang='.$uninstalllang.'&amp;confirm=1&amp;sesskey='.sesskey(),
'langimport.php');
} else if (confirm_sesskey()) {
@@ -103,16 +109,16 @@
if (file_exists($dest2)){
$rm2 = remove_dir($dest2);
}
get_list_of_languages(true); //refresh lang cache
//delete the direcotries
if ($rm1 or $rm2) {
redirect('langimport.php', get_string('langpackremoved','admin'));
redirect('langimport.php', get_string('langpackremoved','admin'), 3, $adminroot);
} else { //nothing deleted, possibly due to permission error
error('An error has occurred, language pack is not completely uninstalled, please check file permissions');
}
}
@unlink($CFG->dataroot.'/cache/languages');
break;
case UPDATE_ALL_LANG: //1 click update for all updatable language packs
//0th pull a list from download.moodle.org,
@@ -120,8 +126,7 @@
$source = 'http://download.moodle.org/lang16/languages.md5';
$md5array = array();
$updated = 0; //any packs updated?
unset($CFG->langlist); // ignore admin's langlist
$alllangs = array_keys(get_list_of_languages());
$alllangs = array_keys(get_list_of_languages(false, true)); //get all available langs
$lang16 = array(); //all the Moodle 1.6 unicode lang packs (updated and not updated)
$packs = array(); //all the packs that needs updating
@@ -185,7 +190,7 @@
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'zip';
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
@@ -208,13 +213,13 @@
}
if ($updated) {
notice(get_string('langupdatecomplete','admin'), 'langimport.php');
notice(get_string('langupdatecomplete','admin'), 'langimport.php', NULL, $adminroot);
} else {
notice(get_string('nolangupdateneeded','admin'), 'langimport.php');
notice(get_string('nolangupdateneeded','admin'), 'langimport.php', NULL, $adminroot);
}
break;
default: //display choice mode
$source = 'http://download.moodle.org/lang16/languages.md5';
@@ -236,72 +241,52 @@
}
*/
if (!$remote) {
print_simple_box_start('center','60%');
echo '<div align="center">';
print_box_start();
print_string('remotelangnotavailable','admin',$CFG->dataroot.'/lang/');
echo '</div>';
print_simple_box_end();
print_box_end();
}
print_simple_box_start('center','60%');
echo '<table width="100%"><tr><td align="center">';
echo get_string('installedlangs','admin');
echo '</td><td align="center">';
echo get_string('availablelangs','admin');
echo '</td></tr>';
print_box_start();
echo '<table summary="">';
echo '<tr><td align="center" valign="top">';
echo '<form name="uninstallform" action="langimport.php?mode=4" method="POST">';
echo '<form id="uninstallform" action="langimport.php?mode=4" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
unset($CFG->langlist); // ignore admin's langlist
$installedlangs = get_list_of_languages();
$installedlangs = get_list_of_languages(false, true);
/// display installed langs here
echo '<select name="uninstalllang" size="15">';
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 name="updateform" action="langimport.php?mode=5" method="POST">';
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>';
echo '<p />';
/// Display option to change site language
/// Erm... this doesn't seem to work. Plus it's redundant. -vinkmar
// print_string('changesitelang','admin');
// $sitelanguage = get_record('config','name','lang');
// echo '<form name="changelangform" action="langimport.php?mode=3" method="POST">';
// echo '<select name="sitelangconfig">';
//
// foreach ($installedlangs as $clang =>$ilang) {
// if ($clang == $sitelanguage->value){
// echo '<option value="'.$clang.'" selected="selected">'.$ilang.'</option>';
// } else {
// echo '<option value="'.$clang.'">'.$ilang.'</option>';
// }
// }
// echo '</select>';
// echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
// echo '<input type="submit" value="'.get_string('change','admin').'" />';
// echo '</form>';
/// display to be installed langs here
echo '</td><td align="center" valign="top">';
echo '<table><tr><td valign="top" align="center">'; //availabe langs table
//availabe langs table
$empty = 1; //something to pring
/// if this language pack is not already installed, then we allow installation
echo '<form name="installform" method="POST" action="langimport.php?mode=2">';
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" size="15">';
echo '<select name="pack" id="pack" size="15">';
}
foreach ($availablelangs as $alang) {
@@ -316,25 +301,24 @@
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>';
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="<-- '.get_string('install','admin').'">';
echo '<br /><input type="submit" value="&larr; '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
if ($empty) {
echo '<tr><td align="center">';
echo '<br />';
print_string('nolanguagetodownload','admin');
echo '</td></tr>';
}
echo '</td><tr></table>'; //close available langs table
echo '<form>';
//close available langs table
echo '</td></tr></table>';
print_simple_box_end();
@@ -343,7 +327,7 @@
} //close of main switch
admin_externalpage_print_footer($adminroot);
/* 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
@@ -360,8 +344,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
@@ -375,7 +359,7 @@
}
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) {
@@ -388,13 +372,16 @@
return false; //failed
}
fputs($proxy_fp, "GET $url HTTP/1.0\r\nHost: $CFG->proxyhost\r\n\r\n");
$i = 0;
while(!feof($proxy_fp)) {
$headers_done = false;
while(!feof($proxy_fp)) {
$string = fgets($proxy_fp, 1024);
if ($i > 11) { //12 lines of info skipped
if(!$headers_done){
// A new line indicates end of HTTP headers
$headers_done = ("\r\n" == $string);
} else {
$availablelangs[] = split(',', $string);
}
$i++;
}
fclose($proxy_fp);
+12 -10
View File
@@ -37,27 +37,29 @@
/// Print the appropriate form
if (file_exists($filename)) { // We are in maintenance mode
echo '<center>';
echo '<div style="margin-left:auto;margin-right:auto">';
echo '<form action="maintenance.php" method="post">';
echo '<input type="hidden" name="action" value="disable">';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'">';
echo '<p><input type="submit" value="'.get_string('disable').'"></p>';
echo '<input type="hidden" name="action" value="disable" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<p><input type="submit" value="'.get_string('disable').'" /></p>';
echo '</form>';
echo '</center>';
echo '</div>';
} else { // We are not in maintenance mode
$usehtmleditor = can_use_html_editor();
echo '<center>';
echo '<div style="text-align:center;margin-left:auto;margin-right:auto">';
echo '<form action="maintenance.php" method="post">';
echo '<input type="hidden" name="action" value="enable">';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'">';
echo '<p><input type="submit" value="'.get_string('enable').'"></p>';
echo '<div>';
echo '<input type="hidden" name="action" value="enable" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<p><input type="submit" value="'.get_string('enable').'" /></p>';
echo '<p>'.get_string('optionalmaintenancemessage', 'admin').':</p>';
echo '<table><tr><td>';
print_textarea($usehtmleditor, 20, 50, 600, 400, "text");
echo '</td></tr></table>';
echo '</div>';
echo '</form>';
echo '</center>';
echo '</div>';
if ($usehtmleditor) {
use_html_editor();
+583
View File
@@ -0,0 +1,583 @@
<?php
/**
* Adapted for Moodle from the AMFPHP Project at http://www.amfphp.org/
* Creates the methodTable for a service class.
*
* @usage $this->methodTable = MethodTable::create($this);
* @author Christophe Herreman
* @since 05/01/2005
* @version $id$
*
* Special contributions by Allessandro Crugnola and Ted Milker
*/
if (!defined('T_ML_COMMENT')) {
define('T_ML_COMMENT', T_COMMENT);
} else {
define('T_DOC_COMMENT', T_ML_COMMENT);
}
/**
* Return string from start of haystack to first occurance of needle, or whole
* haystack, if needle does not occur
*
* @access public
* @param $haystack(String) Haystack to search in
* @param $needle(String) Needle to look for
*/
function strrstr($haystack, $needle)
{
return substr($haystack, 0, strpos($haystack.$needle,$needle));
}
/**
* Return substring of haystack from end of needle onwards, or FALSE
*
* @access public
* @param $haystack(String) Haystack to search in
* @param $needle(String) Needle to look for
*/
function strstrafter($haystack, $needle)
{
return substr(strstr($haystack, $needle), strlen($needle));
}
class MethodTable
{
/**
* Constructor.
*
* Since this class should only be accessed through the static create() method
* this constructor should be made private. Unfortunately, this is not possible
* in PHP4.
*
* @access private
*/
function MethodTable(){
}
/**
* Creates the methodTable for a passed class.
*
* @static
* @access public
* @param $sourcePath(String) The path to the file you want to parse
* @param $containsClass(Bool) True if the file is a class definition (optional)
*/
function create($sourcePath, $containsClass = false){
$methodTable = array();
if(!file_exists($sourcePath))
{
return false;
}
$source = file_get_contents($sourcePath);
$tokens = (array)token_get_all($source);
$waitingForOpenParenthesis = false;
$waitingForFunction = false;
$waitingForClassName = false;
$bufferingArgs = false;
$argBuffer = "";
$lastFunction = "";
$lastFunctionComment = "";
$lastComment = "";
$classMethods = array();
$realClassName = "";
if($containsClass) {
$openBraces = -10000;
}
else
{
$openBraces = 1;
}
$waitingForEndEncapsedString = false;
foreach($tokens as $token)
{
if (is_string($token)) {
if($token == '{')
{
$openBraces++;
}
if($token == '}')
{
if($waitingForEndEncapsedString)
{
$waitingForEndEncapsedString = false;
}
else
{
$lastComment = '';
$openBraces--;
if($openBraces == 0)
{
break;
}
}
}
elseif($waitingForOpenParenthesis && $token == '(')
{
$bufferingArgs = true;
$argBuffer = "";
$waitingForOpenParenthesis = false;
}
elseif($bufferingArgs)
{
if($token != ')')
{
$argBuffer .= $token;
}
else
{
if($lastFunction != $realClassName)
{
$classMethods[] = array("name" => $lastFunction,
"comment" => $lastFunctionComment,
"args" => $argBuffer);
$bufferingArgs = false;
$argBuffer = "";
$lastFunction = "";
$lastFunctionComment = "";
}
}
}
} else {
// token array
list($id, $text) = $token;
if($bufferingArgs)
{
$argBuffer .= $text;
}
switch ($id)
{
case T_COMMENT:
case T_ML_COMMENT: // we've defined this
case T_DOC_COMMENT: // and this
// no action on comments
$lastComment = $text;
break;
case T_FUNCTION:
if($openBraces >= 1)
{
$waitingForFunction = true;
}
break;
case T_STRING:
if($waitingForFunction)
{
$waitingForFunction = false;
$waitingForOpenParenthesis = true;
$lastFunction = $text;
$lastFunctionComment = $lastComment;
$lastComment = "";
}
if($waitingForClassName)
{
$waitingForClassName = false;
$realClassName = $text;
}
break;
case T_CLASS:
$openBraces = 0;
$waitingForClassName = true;
break;
case T_CURLY_OPEN:
case T_DOLLAR_OPEN_CURLY_BRACES:
$waitingForEndEncapsedString = true;
break;
}
}
}
foreach ($classMethods as $key => $value) {
$methodSignature = $value['args'];
$methodName = $value['name'];
$methodComment = $value['comment'];
$description = MethodTable::getMethodDescription($methodComment) . " " . MethodTable::getMethodCommentAttribute($methodComment, "desc");
$description = trim($description);
$access = MethodTable::getMethodCommentAttributeFirstWord($methodComment, "access");
$roles = MethodTable::getMethodCommentAttributeFirstWord($methodComment, "roles");
$instance = MethodTable::getMethodCommentAttributeFirstWord($methodComment, "instance");
$returns = MethodTable::getMethodReturnValue($methodComment);
$pagesize = MethodTable::getMethodCommentAttributeFirstWord($methodComment, "pagesize");
$params = MethodTable::getMethodCommentArguments($methodComment);
//description, arguments, access, [roles, [instance, [returns, [pagesize]]]]
$methodTable[$methodName] = array();
//$methodTable[$methodName]["signature"] = $methodSignature; //debug purposes
$methodTable[$methodName]["description"] = ($description == "") ? "No description given." : $description;
$methodTable[$methodName]["arguments"] = MethodTable::getMethodArguments($methodSignature, $params);
$methodTable[$methodName]["access"] = ($access == "") ? "private" : $access;
if($roles != "") $methodTable[$methodName]["roles"] = $roles;
if($instance != "") $methodTable[$methodName]["instance"] = $instance;
if($returns != "") $methodTable[$methodName]["returns"] = $returns;
if($pagesize != "") $methodTable[$methodName]["pagesize"] = $pagesize;
}
return $methodTable;
}
/**
*
*/
function getMethodCommentServices($comment)
{
$pieces = explode('@service', $comment);
$args = array();
if(is_array($pieces) && count($pieces) > 1)
{
for($i = 0; $i < count($pieces) - 1; $i++)
{
$ps = strrstr($pieces[$i + 1], '@');
$ps = strrstr($ps, '*/');
$args[] = MethodTable::cleanComment($ps);
}
}
return $args;
}
/**
*
*/
function getMethodCommentArguments($comment)
{
$pieces = explode('@param', $comment);
$args = array();
if(is_array($pieces) && count($pieces) > 1)
{
for($i = 0; $i < count($pieces) - 1; $i++)
{
$ps = strrstr($pieces[$i + 1], '@');
$ps = strrstr($ps, '*/');
$args[] = MethodTable::cleanComment($ps);
}
}
return $args;
}
/**
* Returns the description from the comment.
* The description is(are) the first line(s) in the comment.
*
* @static
* @private
* @param $comment(String) The method's comment.
*/
function getMethodDescription($comment){
$comment = MethodTable::cleanComment(strrstr($comment, "@"));
return trim($comment);
}
/**
* Returns the value of a comment attribute.
*
* @static
* @private
* @param $comment(String) The method's comment.
* @param $attribute(String) The name of the attribute to get its value from.
*/
function getMethodCommentAttribute($comment, $attribute){
$pieces = strstrafter($comment, '@' . $attribute);
if($pieces !== FALSE)
{
$pieces = strrstr($pieces, '@');
$pieces = strrstr($pieces, '*/');
return MethodTable::cleanComment($pieces);
}
return "";
}
/**
* Returns the value of a comment attribute.
*
* @static
* @private
* @param $comment(String) The method's comment.
* @param $attribute(String) The name of the attribute to get its value from.
*/
function getMethodCommentAttributeFirstLine($comment, $attribute){
$pieces = strstrafter($comment, '@' . $attribute);
if($pieces !== FALSE)
{
$pieces = strrstr($pieces, '@');
$pieces = strrstr($pieces, "*");
$pieces = strrstr($pieces, "/");
$pieces = strrstr($pieces, "-");
$pieces = strrstr($pieces, "\n");
$pieces = strrstr($pieces, "\r");
$pieces = strrstr($pieces, '*/');
return MethodTable::cleanComment($pieces);
}
return "";
}
/**
* Returns the value of a comment attribute.
*
* @static
* @private
* @param $comment(String) The method's comment.
* @param $attribute(String) The name of the attribute to get its value from.
*/
function getMethodReturnValue($comment){
$result = array('type' => 'void', 'description' => '');
$pieces = strstrafter($comment, '@returns');
if(FALSE == $pieces) $pieces = strstrafter($comment, '@return');
if($pieces !== FALSE)
{
$pieces = strrstr($pieces, '@');
$pieces = strrstr($pieces, "*");
$pieces = strrstr($pieces, "/");
$pieces = strrstr($pieces, "-");
$pieces = strrstr($pieces, "\n");
$pieces = strrstr($pieces, "\r");
$pieces = strrstr($pieces, '*/');
$pieces = trim(MethodTable::cleanComment($pieces));
@list($result['type'], $result['description']) = explode(' ', $pieces, 2);
$result['type'] = MethodTable::standardizeType($result['type']);
}
return $result;
}
function getMethodCommentAttributeFirstWord($comment, $attribute){
$pieces = strstrafter($comment, '@' . $attribute);
if($pieces !== FALSE)
{
$val = MethodTable::cleanComment($pieces);
return trim(strrstr($val, ' '));
}
return "";
}
/**
* Returns an array with the arguments of a method.
*
* @static
* @access private
* @param $methodSignature(String) The method's signature;
*/
function getMethodArguments($methodSignature, $commentParams){
if(strlen($methodSignature) == 0){
//no arguments, return an empty array
$result = array();
}else{
//clean the arguments before returning them
$result = MethodTable::cleanArguments(explode(",", $methodSignature), $commentParams);
}
return $result;
}
/**
* Cleans the function or method's return value.
*
* @static
* @access private
* @param $value(String) The "dirty" value.
*/
function cleanReturnValue($value){
$result = array();
$value = trim($value);
list($result['type'], $result['description']) = explode(' ', $value, 2);
$result['type'] = MethodTable::standardizeType($result['type']);
return $result;
}
/**
* Takes a string and returns the XMLRPC type that most closely matches it.
*
* @static
* @access private
* @param $type(String) The given type string.
*/
function standardizeType($type) {
$type = strtolower($type);
if('str' == $type || 'string' == $type) return 'string';
if('int' == $type || 'integer' == $type) return 'int';
if('bool' == $type || 'boolean' == $type) return 'boolean';
// Note that object is not a valid XMLRPC type
if('object' == $type || 'class' == $type) return 'object';
if('float' == $type || 'dbl' == $type || 'double' == $type || 'flt' == $type) return 'double';
// Note that null is not a valid XMLRPC type. The null type can have
// only one value - null.
if('null' == $type) return 'null';
// Note that mixed is not a valid XMLRPC type
if('mixed' == $type) return 'mixed';
if('array' == $type || 'arr' == $type) return 'array';
if('assoc' == $type || 'struct' == $type) return 'struct';
// Note that this is not a valid XMLRPC type. As references cannot be
// serialized or exported, there is no way this could be XML-RPCed.
if('reference' == $type || 'ref' == $type) return 'reference';
return 'string';
}
/**
* Cleans the arguments array.
* This method removes all whitespaces and the leading "$" sign from each argument
* in the array.
*
* @static
* @access private
* @param $args(Array) The "dirty" array with arguments.
*/
function cleanArguments($args, $commentParams){
$result = array();
if(!is_array($args)) return array();
foreach($args as $index => $arg){
$arg = strrstr(str_replace(array('$','&$'), array('','&'), $arg), '=');
if(!isset($commentParams[$index]))
{
$result[] = trim($arg);
}
else
{
$start = trim($arg);
$end = trim(str_replace('$', '', $commentParams[$index]));
// Suppress Notice of 'Undefined offset' with @
@list($word0, $word1, $tail) = preg_split("/[\s]+/", $end, 3);
$word0 = strtolower($word0);
$word1 = strtolower($word1);
$wordBase0 = ereg_replace('^[&$]+','',$word0);
$wordBase1 = ereg_replace('^[&$]+','',$word1);
$startBase = strtolower(ereg_replace('^[&$]+','',$start));
if ($wordBase0 == $startBase) {
$type = str_replace(array('(',')'),'', $word1);
} elseif($wordBase1 == $startBase) {
$type = str_replace(array('(',')'),'', $word0);
} elseif( ereg('(^[&$]+)|(\()([a-z0-9]+)(\)$)', $word0, $regs) ) {
$tail = str_ireplace($word0, '', $end);
$type = $regs[3];
} else {
// default to string
$type = 'string';
}
$type = MethodTable::standardizeType($type);
/*
if($type == 'str') {
$type = 'string';
} elseif($type == 'int' || $type == 'integer') {
$type = 'int';
} elseif($type == 'bool' || $type == 'boolean') {
$type = 'boolean';
} elseif($type == 'object' || $type == 'class') {
// Note that this is not a valid XMLRPC type
$type = 'object';
} elseif($type == 'float' || $type == 'dbl' || $type == 'double' || $type == 'flt') {
$type = 'double';
} elseif($type == 'null') {
// Note that this is not a valid XMLRPC type
// The null type can have only one value - null. Why would
// that be an argument to a function? Just in case:
$type = 'null';
} elseif($type == 'mixed') {
// Note that this is not a valid XMLRPC type
$type = 'mixed';
} elseif($type == 'array' || $type == 'arr') {
$type = 'array';
} elseif($type == 'assoc') {
$type = 'struct';
} elseif($type == 'reference' || $type == 'ref') {
// Note that this is not a valid XMLRPC type
// As references cannot be serialized or exported, there is
// no way this could be XML-RPCed.
$type = 'reference';
} else {
$type = 'string';
}
*/
$result[] = array('type' => $type, 'description' => $start . ' - ' . $tail);
}
}
return $result;
}
/**
* Cleans the comment string by removing all comment start and end characters.
*
* @static
* @private
* @param $comment(String) The method's comment.
*/
function cleanComment($comment){
$comment = str_replace("/**", "", $comment);
$comment = str_replace("*/", "", $comment);
$comment = str_replace("*", "", $comment);
$comment = str_replace("\n", "\\n", trim($comment));
$comment = eregi_replace("[\r\t\n ]+", " ", trim($comment));
$comment = str_replace("\"", "\\\"", $comment);
return $comment;
}
/**
*
*/
function showCode($methodTable){
if(!is_array($methodTable)) $methodTable = array();
foreach($methodTable as $methodName=>$methodProps){
$result .= "\n\t\"" . $methodName . "\" => array(";
foreach($methodProps as $key=>$value){
$result .= "\n\t\t\"" . $key . "\" => ";
if($key=="arguments"){
$result .= "array(";
for($i=0; $i<count($value); $i++){
$result .= "\"" . addslashes($value[$i]) . "\"";
if($i<count($value)-1){
$result .= ", ";
}
}
$result .= ")";
}else{
$result .= "\"" . $value . "\"";
}
$result .= ",";
}
$result = substr($result, 0, -1);
$result .= "\n\t),";
}
$result = substr($result, 0, -1);
$result = "\$this->methodTable = array(" . $result;
$result .= "\n);";
return $result;
}
}
?>
+239
View File
@@ -0,0 +1,239 @@
<?php // $Id$
// Allows the admin to control user logins from remote moodles.
require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
$sort = optional_param('sort', 'username', PARAM_ALPHA);
$dir = optional_param('dir', 'ASC', PARAM_ALPHA);
$page = optional_param('page', 0, PARAM_INT);
$perpage = optional_param('perpage', 30, PARAM_INT);
$action = trim(strtolower(optional_param('action', '', PARAM_ALPHA)));
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('ssoaccesscontrol', $adminroot);
admin_externalpage_print_header($adminroot);
if (!extension_loaded('openssl')) {
print_error('requiresopenssl', 'mnet', '', NULL, true);
}
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$sesskey = sesskey();
$formerror = array();
// grab the mnet hosts and remove the localhost
$mnethosts = get_records_menu('mnet_host', '', '', 'name', 'id, name');
if (array_key_exists($CFG->mnet_localhost_id, $mnethosts)) {
unset($mnethosts[$CFG->mnet_localhost_id]);
}
// process actions
if (!empty($action) and confirm_sesskey()) {
// boot if insufficient permission
if (!has_capability('moodle/user:delete', $sitecontext)) {
error(get_string('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');
}
switch ($action) {
case "delete":
delete_records('mnet_sso_access_control', 'id', $id);
redirect('access_control.php', get_string('deleteuserrecord', 'mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id])));
break;
case "acl":
// 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');
}
if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $accessctrl)) {
if ($accessctrl == 'allow') {
redirect('access_control.php', get_string('ssl_acl_allow','mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id])));
} elseif ($accessctrl == 'deny') {
redirect('access_control.php', get_string('ssl_acl_deny','mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id])));
}
}
break;
default:
print_error('invalidactionparam', 'mnet', '/admin/mnet/access_control.php');
}
}
// process the form results
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');
}
if (empty($form->username)) {
$formerror['username'] = get_string('enterausername','mnet');
}
if (empty($form->mnet_host_id)) {
$formerror['mnet_host_id'] = get_string('selectahost','mnet');
}
if (empty($form->accessctrl)) {
$formerror['accessctrl'] = get_string('selectaccesslevel','mnet'); ;
}
// process if there are no errors
if (count($formerror) == 0) {
// username can be a comma separated list
$usernames = explode(',', $form->username);
foreach ($usernames as $username) {
$username = trim(moodle_strtolower($username));
if (!empty($username)) {
if (mnet_update_sso_access_control($username, $form->mnet_host_id, $form->accessctrl)) {
if ($form->accessctrl == 'allow') {
redirect('access_control.php', get_string('ssl_acl_allow','mnet', array($username, $mnethosts[$form->mnet_host_id])));
} elseif ($form->accessctrl == 'deny') {
redirect('access_control.php', get_string('ssl_acl_deny','mnet', array($username, $mnethosts[$form->mnet_host_id])));
}
}
}
}
}
exit;
}
// Explain
print_box(get_string('ssoacldescr','mnet'));
// Are the needed bits enabled?
$warn = '';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
$warn = '<p>' . get_string('mnetdisabled','mnet') .'</p>';
}
if (!is_enabled_auth('mnet')) {
$warn .= '<p>' . get_string('authmnetdisabled','mnet').'</p>';
}
if (get_config('auth/mnet', 'auto_add_remote_users') != true) {
$warn .= '<p>' . get_string('authmnetautoadddisabled','mnet').'</p>';
}
if (!empty($warn)) {
$warn = '<p>' . get_string('ssoaclneeds','mnet').'</p>' . $warn;
print_box($warn);
}
// output the ACL table
$columns = array("username", "mnet_host_id", "access", "delete");
$headings = array();
$string = array('username' => get_string('username'),
'mnet_host_id' => get_string('remotehost', 'mnet'),
'access' => get_string('accesslevel', 'mnet'),
'delete' => get_string('delete'));
foreach ($columns as $column) {
if ($sort != $column) {
$columnicon = "";
$columndir = "ASC";
} else {
$columndir = $dir == "ASC" ? "DESC" : "ASC";
$columnicon = $dir == "ASC" ? "down" : "up";
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" alt=\"\" />";
}
$headings[$column] = "<a href=\"?sort=$column&amp;dir=$columndir&amp;\">".$string[$column]."</a>$columnicon";
}
$headings['delete'] = '';
$acl = get_records('mnet_sso_access_control', '', '', "$sort $dir", '*'); //, $page * $perpage, $perpage);
$aclcount = count_records('mnet_sso_access_control');
if (!$acl) {
print_heading(get_string('noaclentries','mnet'));
$table = NULL;
} else {
$table->head = $headings;
$table->align = array('left', 'left', 'center');
$table->width = "95%";
foreach ($acl as $aclrecord) {
if ($aclrecord->accessctrl == 'allow') {
$accesscolumn = get_string('allow', 'mnet')
. " (<a href=\"?id={$aclrecord->id}&amp;action=acl&amp;accessctrl=deny&amp;sesskey={$USER->sesskey}\">"
. get_string('deny', 'mnet') . "</a>)";
} else {
$accesscolumn = get_string('deny', 'mnet')
. " (<a href=\"?id={$aclrecord->id}&amp;action=acl&amp;accessctrl=allow&amp;sesskey={$USER->sesskey}\">"
. get_string('allow', 'mnet') . "</a>)";
}
$deletecolumn = "<a href=\"?id={$aclrecord->id}&amp;action=delete&amp;sesskey={$USER->sesskey}\">"
. get_string('delete') . "</a>";
$table->data[] = array ($aclrecord->username, $aclrecord->mnet_host_id, $accesscolumn, $deletecolumn);
}
}
if (!empty($table)) {
print_table($table);
echo '<p>&nbsp;</p>';
print_paging_bar($aclcount, $page, $perpage, "?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;");
}
// output the add form
print_simple_box_start('center','90%','','20');
?>
<div class="mnetaddtoaclform">
<form id="mnetaddtoacl" method="post">
<input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>" />
<?php
// enter a username
echo get_string('username') . ":\n";
if (!empty($formerror['username'])) {
echo '<span class="error"> * </span>';
}
echo '<input type="text" name="username" size="20" maxlength="100" />';
// choose a remote host
echo " " . get_string('remotehost', 'mnet') . ":\n";
if (!empty($formerror['mnet_host_id'])) {
echo '<span class="error"> * </span>';
}
choose_from_menu($mnethosts, 'mnet_host_id');
// choose an access level
echo " " . get_string('accesslevel', 'mnet') . ":\n";
if (!empty($formerror['accessctrl'])) {
echo '<span class="error"> * </span>';
}
$accessmenu['allow'] = get_string('allow', 'mnet');
$accessmenu['deny'] = get_string('deny', 'mnet');
choose_from_menu($accessmenu, 'accessctrl');
// submit button
echo '<input type="submit" value="' . get_string('addtoacl', 'mnet') . '" />';
echo "</form></div>\n";
// print errors
foreach ($formerror as $error) {
echo "<br><span class=\"error\">$error<span>";
}
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+182
View File
@@ -0,0 +1,182 @@
<?php
/**
* Library functions for mnet
*
* @author Donal McMullan donal@catalyst.net.nz
* @version 0.0.1
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package mnet
*/
/**
* Parse a file to find out what functions/methods exist in it, and add entries
* for the remote-call-enabled functions to the database.
*
* The path to a file, e.g. auth/mnet/auth.php can be thought of as
* type/parentname/docname
*
* @param string $type mod, auth or enrol
* @param string $parentname Implementation of type, e.g. 'mnet' in the
* case of auth/mnet/auth.php
* @return bool True on success, else false
*/
function mnet_get_functions($type, $parentname) {
global $CFG;
$dataobject = new stdClass();
$docname = $type.'.php';
$publishes = array();
if ('mod' == $type) {
$docname = 'rpclib.php';
$relname = '/mod/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
$mnet_publishes = $parentname.'_mnet_publishes';
if (function_exists($mnet_publishes)) {
(array)$publishes = $mnet_publishes();
}
} else {
// auth or enrol
$relname = '/'.$type.'/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
$class = $type.($type=='enrol'? 'ment':'').'_plugin_'.$parentname;
if (class_exists($class)) {
$object = new $class();
if (method_exists($object, 'mnet_publishes')) {
(array)$publishes = $object->mnet_publishes();
}
}
}
$methodServiceArray = array();
foreach($publishes as $service) {
if (is_array($service['methods'])) {
foreach($service['methods'] as $methodname) {
$methodServiceArray[$methodname][] = $service;
}
}
}
// Disable functions that don't exist (any more) in the source
// Should these be deleted? What about their permissions records?
$rpcrecords = get_records_select('mnet_rpc', ' parent=\''.$parentname.'\' AND parent_type=\''.$type.'\' ', 'function_name ASC ');
if (!empty($rpcrecords)) {
foreach($rpcrecords as $rpc) {
if (!array_key_exists($rpc->function_name, $methodServiceArray)) {
$rpc->enabled = 0;
update_record('mnet_rpc', $rpc);
}
}
}
if (!file_exists($filename)) return false;
if (extension_loaded('tokenizer')) {
include_once $CFG->dirroot.'/admin/mnet/MethodTable.php';
$functions = (array)MethodTable::create($filename,false);
}
foreach($methodServiceArray as $method => $servicearray) {
if (!empty($functions[$method])) {
$details = $functions[$method];
$profile = $details['arguments'];
if (!isset($details['returns'])) {
array_unshift($profile, array('type' => 'void', 'description' => 'No return value'));
} else {
array_unshift($profile, $details['returns']);
}
$dataobject->profile = serialize($profile);
$dataobject->help = addslashes($details['description']);
} else {
$dataobject->profile = serialize(array(array('type' => 'void', 'description' => 'No return value')));
$dataobject->help = '';
}
$dataobject->function_name = $method;
$dataobject->xmlrpc_path = $type.'/'.$parentname.'/'.$docname.'/'.$method;
$dataobject->parent_type = $type;
$dataobject->parent = $parentname;
$dataobject->enabled = '0';
if ($record_exists = get_record('mnet_rpc', 'xmlrpc_path', $dataobject->xmlrpc_path)) {
$dataobject->id = $record_exists->id;
$dataobject->enabled = $record_exists->enabled;
update_record('mnet_rpc', $dataobject);
} else {
$dataobject->id = insert_record('mnet_rpc', $dataobject, true);
}
foreach($servicearray as $service) {
$serviceobj = get_record('mnet_service', 'name', $service['name']);
if (false == $serviceobj) {
$serviceobj = new stdClass();
$serviceobj->name = $service['name'];
$serviceobj->apiversion = $service['apiversion'];
$serviceobj->offer = 1;
$serviceobj->id = insert_record('mnet_service', $serviceobj, true);
}
if (false == get_record('mnet_service2rpc', 'rpcid', $dataobject->id, 'serviceid', $serviceobj->id)) {
$obj = new stdClass();
$obj->rpcid = $dataobject->id;
$obj->serviceid = $serviceobj->id;
insert_record('mnet_service2rpc', $obj, true);
}
}
}
return true;
}
function upgrade_RPC_functions($returnurl) {
global $CFG;
$basedir = $CFG->dirroot.'/mod';
if (file_exists($basedir) && filetype($basedir) == 'dir') {
$dirhandle = opendir($basedir);
while (false !== ($dir = readdir($dirhandle))) {
$firstchar = substr($dir, 0, 1);
if ($firstchar == '.' or $dir == 'CVS' or $dir == '_vti_cnf') {
continue;
}
if (filetype($basedir .'/'. $dir) != 'dir') {
continue;
}
mnet_get_functions('mod', $dir);
}
}
$basedir = $CFG->dirroot.'/auth';
if (file_exists($basedir) && filetype($basedir) == 'dir') {
$dirhandle = opendir($basedir);
while (false !== ($dir = readdir($dirhandle))) {
$firstchar = substr($dir, 0, 1);
if ($firstchar == '.' or $dir == 'CVS' or $dir == '_vti_cnf') {
continue;
}
if (filetype($basedir .'/'. $dir) != 'dir') {
continue;
}
mnet_get_functions('auth', $dir);
}
}
$basedir = $CFG->dirroot.'/enrol';
if (file_exists($basedir) && filetype($basedir) == 'dir') {
$dirhandle = opendir($basedir);
while (false !== ($dir = readdir($dirhandle))) {
$firstchar = substr($dir, 0, 1);
if ($firstchar == '.' or $dir == 'CVS' or $dir == '_vti_cnf') {
continue;
}
if (filetype($basedir .'/'. $dir) != 'dir') {
continue;
}
mnet_get_functions('enrol', $dir);
}
}
}
?>
+52
View File
@@ -0,0 +1,52 @@
<?php
print_header("$site->shortname: $strmnetsettings", "$site->fullname",
'<a href="'.$CFG->wwwroot.'/admin/index.php">'.$stradministration.'</a> -> '.
'<a href="'.$CFG->wwwroot.'/admin/mnet/index.php">'.get_string('mnetsettings', 'mnet').'</a> -> Delete host');
print_heading(get_string('mnetsettings', 'mnet'));
?>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table class="generalbox standard" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="generalboxcontent">
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td colspan="2" class="header" cellpadding="0"><span><?php print_string('deleteaserver', 'mnet'); ?>Deleting a Server</span></td>
</tr>
<?php
if (count($warn) > 0){
?>
<tr valign="top">
<td align="right" colspan="2"><?php print_string('receivedwarnings','mnet'); ?>:<br />
<?php foreach($warn as $warning) echo $warning .'<br />'; ?>
</td>
</tr>
<?php
}
?>
<tr valign="top">
<td colspan="2"><?php print_string('reallydeleteserver','mnet'); ?>: "<?php echo $mnet_peer->name; ?>"?</td>
</tr>
<tr valign="top">
<td width="80">
<form method="post" action="delete.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="hostid" value="<?php echo $mnet_peer->id; ?>" />
<input type="hidden" name="step" value="delete" />
<input type="submit" name="submit" value="<?php print_string('delete'); ?>"/>
</form>
</td>
<td>
<form method="get" action="index.php">
<input type="submit" name="ignore" value="<?php print_string('cancel'); ?>"/>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
<?php
print_footer();
?>
+48
View File
@@ -0,0 +1,48 @@
<?PHP // $Id$
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
include_once($CFG->dirroot.'/mnet/lib.php');
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strmnetsettings = get_string('mnetsettings', 'mnet');
$strmnetservices = get_string('mnetservices', 'mnet');
$strmnetlog = get_string('mnetlog', 'mnet');
$strmnetedithost = get_string('reviewhostdetails', 'mnet');
require_login();
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!$site = get_site()) {
print_error('nosite', '', '', NULL, true);
}
/// Initialize variables.
// Step must be one of:
// input Parse the details of a new host and fetch its public key
// commit Save our changes (to a new OR existing host)
$step = optional_param('step', 'verify', PARAM_ALPHA);
$hostid = required_param('hostid', PARAM_INT);
$warn = array();
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
redirect('index.php', get_string('postrequired','mnet') ,7);
}
if ('verify' == $step) {
$mnet_peer = new mnet_peer();
$mnet_peer->set_id($hostid);
$live_users = $mnet_peer->count_live_sessions();
if ($live_users > 0) {
$warn[] = get_string('usersareonline', 'mnet', $live_users);
}
include('delete.html');
} elseif ('delete' == $step) {
$mnet_peer = new mnet_peer();
$mnet_peer->set_id($hostid);
$mnet_peer->delete();
redirect('peers.php', get_string('hostdeleted', 'mnet'), 5);
}
?>
+104
View File
@@ -0,0 +1,104 @@
<form id="assignform" method="post" action="">
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="host" value="<?php p($mnet_peer->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<table class="generaltable" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php print_string('existingusers', 'role', count($mnetenrolledusers)); ?>
</td>
<td></td>
<td valign="top">
<?php print_string('potentialusers', 'role', $availableusers->_numOfRows); ?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=false;
getElementById('assignform').addselect.selectedIndex=-1;">
<?php
foreach ($mnetenrolledusers as $enrolleduser) {
$fullname = fullname($enrolleduser, true);
echo "<option value=\"$enrolleduser->id\">".s($fullname)." (".s($enrolleduser->rolename).")</option>\n";
}
?>
</select></td>
<td valign="top">
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="submit" id="remove" value="&rarr;" />
<br />
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=false;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($enrolledusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
echo "</optgroup>\n";
} else {
if ($availableusers->_numOfRows > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while ($user = rs_fetch_next_record($availableusers)) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
}
?>
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
onfocus ="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;
getElementById('assignform').addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
getElementById('assignform').previoussearch.value=1;
getElementById('assignform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
if (!empty($searchusers)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
<tr>
<td valign="top"><?php print_string('otherenrolledusers', 'mnet'); ?>:<br />
<ul>
<?php
foreach ($remtenrolledusers as $enrolleduser) {
$fullname = fullname($enrolleduser, true);
print '<li>'
. s($fullname) . ' (' . s($enrolleduser->rolename) . ') '
. s($enrolleduser->enroltype)."</li>\n";
}
?></ul></td>
<td valign="top"></td>
<td valign="top"></td>
</tr>
</table>
</div>
</form>
+281
View File
@@ -0,0 +1,281 @@
<?PHP // $Id$
// enrol_config.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.
require_once(dirname(__FILE__) . "/../../config.php");
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/xmlrpc/client.php');
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$adminroot = admin_get_root();
admin_externalpage_setup('mnetenrol', $adminroot);
$CFG->pagepath = 'admin/mnet';
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
$enrolment = enrolment_factory::factory('mnet');
$mnethostid = required_param('host', PARAM_INT);
$courseid = required_param('courseid', PARAM_INT);
$mnet_peer = new mnet_peer();
if (!$mnet_peer->set_id($mnethostid)) {
print_error('hostcoursenotfound','mnet');
}
$course = get_record('mnet_enrol_course', 'id', $courseid, 'hostid', $mnet_peer->id);
if (empty($course)) {
print_error('hostcoursenotfound','mnet');
}
define("MAX_USERS_PER_PAGE", 5000);
$add = optional_param('add', 0, PARAM_BOOL);
$remove = optional_param('remove', 0, PARAM_BOOL);
$showall = optional_param('showall', 0, PARAM_BOOL);
$searchtext = optional_param('searchtext', '', PARAM_RAW); // search string
$previoussearch = optional_param('previoussearch', 0, PARAM_BOOL);
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$errors = array();
$previoussearch = ($searchtext != '') or ($previoussearch) ? 1:0;
$baseurl = "remote_enrolment.php?courseid={$course->id}&amp;host={$mnet_peer->id}";
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
/// Process incoming role assignment
if ($frm = data_submitted()) {
if ($add and !empty($frm->addselect) and confirm_sesskey()) {
$timemodified = time();
foreach ($frm->addselect as $adduser) {
if (!$adduser = clean_param($adduser, PARAM_INT)) {
continue;
}
if (! $enrolment->req_enrol_user($adduser, $course->id)) {
$errors[] = "Could not add user with id $adduser to course {$course->id}!";
}
}
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
foreach ($frm->removeselect as $removeuser) {
$removeuser = clean_param($removeuser, PARAM_INT);
if (! $enrolment->req_unenrol_user($removeuser, $course->id)) {
$errors[] = "Could not remove user with id $removeuser from course {$course->id}!";
}
}
} else if ($showall) {
$searchtext = '';
$previoussearch = 0;
}
}
/// Prepare data for users / enrolled users panes
/// Create a new request object
$mnet_request = new mnet_xmlrpc_client();
/// Pass it the path to the method that we want to execute
$mnet_request->set_method('enrol/mnet/enrol.php/course_enrolments');
$mnet_request->add_param($course->remoteid, 'int');
$mnet_request->send($mnet_peer);
$all_enrolled_users = $mnet_request->response;
unset($mnet_request);
$select = '';
$all_enrolled_usernames = '';
$timemodified = array();
/// List all the users (homed on this server) who are enrolled on the course
/// This will include mnet-enrolled users, and those who have enrolled
/// themselves, etc.
if (is_array($all_enrolled_users) && count($all_enrolled_users)) {
foreach($all_enrolled_users as $username => $data) {
$all_enrolled_usernames .= "'$username', ";
}
$select = ' u.username IN (' .substr($all_enrolled_usernames, 0, -2) .') AND ';
} else {
$all_enrolled_users = array();
}
/// Synch our mnet_enrol_assignments with remote server
$sql = "
SELECT
u.id,
u.firstname,
u.lastname,
u.username,
u.email,
a.enroltype,
a.id as enrolid,
COALESCE(a.hostid, 0) as wehaverecord,
a.courseid
FROM
{$CFG->prefix}user u
LEFT JOIN
{$CFG->prefix}mnet_enrol_assignments a
ON
a.userid = u.id AND a.courseid={$courseid}
WHERE
$select
u.deleted = 0 AND
u.confirmed = 1 AND
u.mnethostid = {$CFG->mnet_localhost_id}
ORDER BY
u.firstname ASC,
u.lastname ASC";
if (!$enrolledusers = get_records_sql($sql)) {
$enrolledusers = array();
}
foreach($enrolledusers as $user) {
$dataobj = new stdClass();
$dataobj->userid = $user->id;
$dataobj->hostid = $mnet_peer->id;
$dataobj->courseid = $courseid;
$dataobj->rolename = $all_enrolled_users[$user->username]['name'];
$dataobj->enroltype = $all_enrolled_users[$user->username]['enrol'];
if ($user->wehaverecord == 0) {
$dataobj->enroltime = $all_enrolled_users[$user->username]['timemodified'];
$dataobj->id = insert_record('mnet_enrol_assignments', $dataobj);
} elseif (array_key_exists($user->username, $all_enrolled_users)) {
$dataobj->id = $user->enrolid;
update_record('mnet_enrol_assignments', $dataobj);
} elseif (is_array($all_enrolled_users) && count($all_enrolled_users)) {
delete_record('mnet_enrol_assignments', 'id', $user->enrolid);
}
}
unset($enrolledusers);
// Read about our remote enrolments in 2 sets
// first, get the remote enrolments done via enrol/mnet $mnetenrolledusers
// second, get the remote enrolments done with other plugins $remtenrolledusers
// NOTE: both arrays are keyed on the userid!
$sql = "
SELECT
u.id,
u.firstname,
u.lastname,
a.rolename,
a.enroltype,
a.courseid
FROM
{$CFG->prefix}user u,
{$CFG->prefix}mnet_enrol_assignments a
WHERE
a.userid = u.id AND
a.courseid={$courseid} AND
a.enroltype = 'mnet' AND
u.deleted = 0 AND
u.confirmed = 1 AND
u.mnethostid = {$CFG->mnet_localhost_id}
ORDER BY
u.firstname ASC,
u.lastname ASC";
if (!$mnetenrolledusers = get_records_sql($sql)) {
$mnetenrolledusers = array();
}
$sql = "
SELECT
u.id,
u.firstname,
u.lastname,
a.rolename,
a.enroltype,
a.courseid
FROM
{$CFG->prefix}user u,
{$CFG->prefix}mnet_enrol_assignments a
WHERE
a.userid = u.id AND
a.courseid={$courseid} AND
a.enroltype != 'mnet' AND
u.deleted = 0 AND
u.confirmed = 1 AND
u.mnethostid = {$CFG->mnet_localhost_id}
ORDER BY
u.firstname ASC,
u.lastname ASC";
if (!$remtenrolledusers = get_records_sql($sql)) {
$remtenrolledusers = array();
}
$select = '';
$exclude = array_merge(array_keys($mnetenrolledusers), array_keys($remtenrolledusers));
$exclude[] = 0;
$select = 'AND u.username!=\'guest\' AND u.id NOT IN ('. join(',',$exclude) .') ';
unset($exclude);
$searchtext = trim($searchtext);
if ($searchtext !== '') { // Search for a subset of remaining users
$LIKE = sql_ilike();
$FULLNAME = sql_fullname();
$select .= " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
}
$sql = ('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user u
WHERE deleted = 0 AND confirmed = 1
AND mnethostid = '.$CFG->mnet_localhost_id.' '
.$select
.'ORDER BY lastname ASC, firstname ASC');
$availableusers = get_recordset_sql($sql, 0, MAX_USERS_PER_PAGE);
/// Print the page
/// get language strings
$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');
$strroletoassign = get_string('roletoassign', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strsearch = get_string('search');
$strshowall = get_string('showall');
$strparticipants = get_string('participants');
$strsearchresults = get_string('searchresults');
admin_externalpage_print_header($adminroot);
print_box('<strong>' . s($mnet_peer->name) . ' : '
. format_string($course->shortname) .' '. format_string($course->fullname)
. '</strong><br />'
. get_string("enrolcourseenrol_desc", "mnet"));
echo "<hr />";
include(dirname(__FILE__).'/enr_course_enrol.html');
if (!empty($errors)) {
$msg = '<p>';
foreach ($errors as $e) {
$msg .= $e.'<br />';
}
$msg .= '</p>';
notify($msg);
}
admin_externalpage_print_footer($adminroot);
?>
+58
View File
@@ -0,0 +1,58 @@
<?PHP // $Id$
// enrol_config.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.
require_once(dirname(__FILE__) . "/../../config.php");
require_once($CFG->libdir.'/adminlib.php');
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$adminroot = admin_get_root();
admin_externalpage_setup('mnetenrol', $adminroot);
$CFG->pagepath = 'admin/mnet';
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
$enrolment = enrolment_factory::factory('mnet');
$mnethost = required_param('host', PARAM_INT);
$host = get_record('mnet_host', 'id', $mnethost);
$courses = $enrolment->fetch_remote_courses($mnethost);
/// Print the page
admin_externalpage_print_header($adminroot);
print_box('<strong>' . s($host->name) . ' </strong><br />'
. get_string("enrolcourses_desc", "mnet"));
echo '<hr />';
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table class="generaltable">';
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
" class=\"icon\" alt=\"".get_string("course")."\" />";
foreach ($courses as $course) {
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
. "host={$mnethost}&amp;courseid={$course->id}&amp;sesskey={$USER->sesskey}";
echo '<tr>'
. "<td>$icon</td>"
. "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>"
. '</tr><tr>'
. '<td></td>'
. '<td>'.format_string($course->shortname). ' - ' .format_string($course->cat_name).'</td>'
. '</tr><tr>'
. '<td></td>'
. "<td align=\"left\" >{$course->summary}</td>"
. '</tr>';
}
echo '</table></div>';
admin_externalpage_print_footer($adminroot);
?>
+62
View File
@@ -0,0 +1,62 @@
<?PHP // $Id$
// enrol_config.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.
require_once(dirname(__FILE__) . "/../../config.php");
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('mnetenrol', $adminroot);
$CFG->pagepath = 'admin/mnet';
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
$enrolment = enrolment_factory::factory('mnet');
/// Otherwise fill and print the form.
/// get language strings
admin_externalpage_print_header($adminroot);
print_box(get_string("remoteenrolhosts_desc", "mnet"));
echo '<hr />';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
print_box(get_string('mnetdisabled','mnet'));
}
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >'
. '<tr>'
. '<th class="header c0"> '.get_string('host', 'mnet').' </th>'
. '<th class="header c1"> '.get_string('enrolments', 'mnet').' </th>'
. '<th class="header c2"> '.get_string('courses', 'mnet').' </th>'
// . '<th class="header c3"> &nbsp; </th>'
. '</tr>';
$hosts = $enrolment->list_remote_servers();
foreach ($hosts as $host) {
$coursesurl = "{$CFG->wwwroot}/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 = '?';
}
$enrolcount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_assignments WHERE hostid={$host->id}");
echo '<tr>'
. "<td><a href=\"{$coursesurl}\">{$host->name}</a></td>"
. "<td align=\"center\" >$enrolcount</td>"
. "<td align=\"center\" >$coursecount - <a href=\"{$coursesurl}\">".get_string('editenrolments', 'mnet')."</a></td>"
// TODO: teach report/log/index.php to show per-host-logs
// . '<td align="center" ><a href="{$CFG->wwwroot}/admin/report/log/index.php?course_host={$host->id}">'
// . get_string('logs', 'mnet').'</a> </td>'
. '</tr>';
}
echo '</table>'
. '</div>';
admin_externalpage_print_footer($adminroot);
?>
+152
View File
@@ -0,0 +1,152 @@
<?PHP // $Id$
// Allows the admin to configure mnet stuff
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('net', $adminroot);
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!extension_loaded('openssl')) {
admin_externalpage_print_header($adminroot);
set_config('mnet_dispatcher_mode', 'off');
print_error('requiresopenssl', 'mnet', '', NULL, true);
}
if (!$site = get_site()) {
admin_externalpage_print_header($adminroot);
set_config('mnet_dispatcher_mode', 'off');
print_error('nosite', '', '', NULL, true);
}
if (!function_exists('curl_init') ) {
admin_externalpage_print_header($adminroot);
set_config('mnet_dispatcher_mode', 'off');
print_error('nocurl', 'mnet', '', NULL, true);
}
if (!isset($CFG->mnet_dispatcher_mode)) {
set_config('mnet_dispatcher_mode', 'off');
}
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->submit) && $form->submit == get_string('savechanges')) {
if (in_array($form->mode, array("off", "strict", "promiscuous"))) {
if (set_config('mnet_dispatcher_mode', $form->mode)) {
redirect('index.php', get_string('changessaved'));
} else {
error('Invalid action parameter.', 'index.php');
}
}
} elseif (!empty($form->submit) && $form->submit == get_string('delete')) {
$MNET->get_private_key();
$_SESSION['mnet_confirm_delete_key'] = md5(sha1($MNET->keypair['keypair_PEM'])).':'.time();
notice_yesno(get_string("deletekeycheck", "mnet"),
"index.php?sesskey=$USER->sesskey&amp;confirm=".md5($MNET->public_key),
"index.php",
array('sesskey' => $USER->sesskey),
NULL,
'post',
'get');
exit;
} else {
// We're deleting
if (!isset($_SESSION['mnet_confirm_delete_key'])) {
// fail - you're being attacked?
}
$key = '';
$time = '';
@list($key, $time) = explode(':',$_SESSION['mnet_confirm_delete_key']);
$MNET->get_private_key();
if($time < time() - 60) {
// fail - you're out of time.
print_error ('deleteoutoftime', 'mnet', 'index.php');
exit;
}
if ($key != md5(sha1($MNET->keypair['keypair_PEM']))) {
// fail - you're being attacked?
print_error ('deletewrongkeyvalue', 'mnet', 'index.php');
exit;
}
$MNET->replace_keys();
redirect('index.php', get_string('keydeleted','mnet'));
exit;
}
}
$hosts = get_records_select('mnet_host', " id != '{$CFG->mnet_localhost_id}' AND deleted = '0' ",'wwwroot ASC' );
admin_externalpage_print_header($adminroot);
?>
<center>
<form method="post" action="index.php">
<table align="center" width="635" class="generalbox" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="generalboxcontent">
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td colspan="2" class="header" cellpadding="0"><?php print_string('aboutyourhost', 'mnet'); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('publickey', 'mnet'); ?>:</td>
<td><pre><?php echo $MNET->public_key; ?></pre></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('expires', 'mnet'); ?>:</td>
<td><?php echo userdate($MNET->public_key_expires); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('net', 'mnet'); ?>:</td>
<td><input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="radio" name="mode" value="off" <?php echo ("off" == $CFG->mnet_dispatcher_mode)? 'checked="checked"' : '' ?> /> <?php print_string('off', 'mnet'); ?> <br />
<input type="radio" name="mode" value="strict" <?php echo ("strict" == $CFG->mnet_dispatcher_mode)? 'checked="checked"' : '' ?> /> <?php print_string('on', 'mnet'); ?><br />
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<form method="post" action="index.php">
<table align="center" width="635" class="generalbox" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="generalboxcontent">
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td colspan="2" class="header" cellpadding="0"><?php print_string('expireyourkey', 'mnet'); ?></td>
</tr>
<tr valign="top">
<td colspan="2" cellpadding="0"><?php print_string('expireyourkeyexplain', 'mnet'); ?></td>
</tr>
<tr valign="top">
<td align="left" width="10" nowrap="nowrap"><?php print_string('expireyourkey', 'mnet'); ?></td>
<td align="left"><input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="deleteKey" value="" />
<input type="submit" name="submit" value="<?php print_string('delete'); ?>" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</center>
<?php
admin_externalpage_print_footer($adminroot);
?>
+135
View File
@@ -0,0 +1,135 @@
<?php
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
'%2F1&amp;user='.'0'.
'&amp;date=0'.
'&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
admin_externalpage_print_header($adminroot);
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
$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('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
} else {
$tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
}
print_tabs(array($tabs), 'mnetdetails');
print_simple_box_start("center", "");
?>
<form method="post" action="peers.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="commit" />
<input type="hidden" name="last_connect_time" value="<?php echo $mnet_peer->last_connect_time; ?>" />
<input type="hidden" name="id" value="<?php echo isset($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
<table cellpadding="9" cellspacing="0" width="635">
<tr>
<td align="right" valign="top"><?php print_string('site'); ?>:</td>
<td valign="top"><input type="text" name="name" size="30" value="<?php echo $mnet_peer->name; ?>" /></td>
</tr>
<tr>
<td align="right" valign="top"><?php print_string('hostname', 'mnet'); ?>:</td>
<td valign="top"><input type="text" name="wwwroot" size="30" value="<?php echo $mnet_peer->wwwroot; ?>" /></td>
</tr>
<?php
if (empty($mnet_peer->public_key)) $mnet_peer->public_key = '';
?>
<tr>
<td align="right" valign="top"><?php
print_string('publickey', 'mnet');
echo ': <br />';
helpbutton("publickey", get_string('publickey', 'mnet'), "mnet", true, true);
?></td>
<?php
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0) {
$key = mnet_get_public_key($mnet_peer->wwwroot);
$mnet_peer->public_key = clean_param($key, PARAM_PEM);
}
?>
<td valign="top">
<?php
if (empty($mnet_peer->public_key)) {
print_string('nopubkey', 'mnet');
}
?><br />
<textarea rows="17" cols="65" name="public_key" style="font-size: 8px;"><?php echo $mnet_peer->public_key; ?></textarea>
</td>
</tr>
<tr>
<td align="right" valign="top"><?php print_string('expires', 'mnet'); ?>:</td>
<td valign="top">
<?php
if($mnet_peer->public_key_expires < time()) {
print_string('expired', 'mnet');
echo ' ';
}
echo userdate($mnet_peer->public_key_expires);
?>
</td>
</tr>
<?php
if(!empty($currentkey)) {
?>
<tr>
<td align="right" valign="top"></td>
<td valign="top"><?php print_string('keymismatch', 'mnet'); ?></td>
</tr>
<tr>
<td align="right" valign="top"><?php print_string('currentkey', 'mnet'); ?>:</td>
<td valign="top"><pre style="font-size: 8px;"><?php echo $currentkey;?></pre></td>
</tr>
<?php
}
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
?>
<tr>
<td align="right" valign="top"><?php print_string('last_connect_time', 'mnet'); ?>:</td>
<td valign="top"><?php echo ($mnet_peer->last_connect_time == 0)? get_string('never','mnet') : date('H:i:s d/m/Y',$mnet_peer->last_connect_time);?></td>
</tr>
<?php
}
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0){
?>
<tr>
<td align="right" valign="top"><?php print_string('deleted'); ?>:</td>
<td valign="top">
<input type="radio" name="deleted" value="0" checked="checked" /> <?php print_string('reenableserver','mnet'); ?><br />
<input type="radio" name="deleted" value="1" /> <?php print_string('yes'); ?><br />
</td>
</tr>
<?php
}
if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
?>
<tr>
<td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
echo ': <br />';
helpbutton("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true, true);
?>:</td>
<td valign="top"><?php echo $mnet_peer->ip_address; ?></td>
</tr>
<?php
}
?>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges"); ?>" /></td>
</tr>
</table>
</div>
</form>
<?php
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+22
View File
@@ -0,0 +1,22 @@
<?php
admin_externalpage_print_header($adminroot);
$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);
print_tabs(array($tabs), 'mnetdetails');
print_simple_box_start("center", "");
?>
<table cellpadding="9" cellspacing="0" >
<tr>
<td align="right" valign="top"><?php print_string('site'); ?>:</td>
<td valign="top"><?php echo $mnet_peer->name; ?></td>
</tr>
<tr>
<td align="right" valign="top" colspan="2"><?php print_string('allhosts_no_options'); ?>:</td>
</tr>
</table>
<?php
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+100
View File
@@ -0,0 +1,100 @@
<?php
admin_externalpage_print_header($adminroot);
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
'%2F1&amp;user='.'0'.
'&amp;date=0'.
'&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
$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);
if ($mnet_peer->id != $CFG->mnet_all_hosts_id) $tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
print_tabs(array($tabs), 'mnetservices');
print_simple_box_start("center", "");
?>
<form method="post" action="mnet_services.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="<?php echo $mnet_peer->nextstep; ?>" />
<input type="hidden" name="hostid" value="<?php echo ($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
<table cellpadding="9" cellspacing="0" >
<?php
foreach($myservices as $name => $versions) {
$version = current($versions);
?>
<tr>
<td align="left" valign="top" colspan="2">
<h3><?php echo get_string($name.'_name', $version['parent_type'].'_'.$version['parent'] , $mnet_peer->name); ?></h3>
<?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?>
<?php
$breakstring = '';
foreach($versions as $version){
if (count($versions) > 1) {
$versionstring = '('.get_string('version','mnet') .' '.$version['apiversion'].')';
} else {
$versionstring = '';
}
echo $breakstring;
?>
<input type="hidden" name="exists[<?php echo $version['serviceid']; ?>]" value="1" />
<input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/>
<?php
print_string('publish','mnet');
echo $versionstring;
if (!empty($version['hostsubscribes'])) {
echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">&radic;</a> ';
}
if (!empty($version['allhosts_publish'])) {
print_string("enabled_for_all",'mnet',!empty($version['I_publish']));
}
echo '<br />';
?>
<input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/>
<?php
print_string('subscribe','mnet');
echo $versionstring;
if (!empty($version['hostpublishes'])) {
echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">&radic;</a> ';
}
if (!empty($version['allhosts_subscribe'])) {
print_string("enabled_for_all",'mnet',!empty($version['I_subscribe']));
}
echo '<br />';
$breakstring = '. . . . . . . . . . . . . . . . . . . . . . . . <br>';
} // end foreach
?>
</td>
</tr>
<?php
} // end foreach
?>
<tr>
<td align="left" valign="top" colspan="2">
<div id="pubTreeLoc"></div>
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">
<div id="subTreeLoc"></div>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">
<div id="formElements"><input type="hidden" name="outer" value="4" /></div>
</td>
</tr>
</table>
</div>
</form>
<?php
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+176
View File
@@ -0,0 +1,176 @@
<?php
// Allows the admin to configure services for remote hosts
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('mnetpeers', $adminroot);
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!$site = get_site()) {
print_error('nosite', '', '', NULL, true);
}
/// Initialize variables.
// Step must be one of:
// input Parse the details of a new host and fetch its public key
// commit Save our changes (to a new OR existing host)
// force Go ahead with something we've been warned is strange
$step = optional_param('step', NULL, PARAM_ALPHA);
$hostid = optional_param('hostid', NULL, PARAM_INT);
$nocertstring = '';
$nocertmatch = '';
$badcert = '';
$certerror = '';
$noipmatch = '';
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strmnetsettings = get_string('mnetsettings', 'mnet');
$strmnetservices = get_string('mnetservices', 'mnet');
$strmnetlog = get_string('mnetlog', 'mnet');
$strmnetedithost = get_string('reviewhostdetails', 'mnet');
$strmneteditservices = get_string('reviewhostservices', 'mnet');
$mnet_peer = new mnet_peer();
if (($form = data_submitted()) && confirm_sesskey()) {
$mnet_peer->set_id($hostid);
$treevals = array();
foreach($_POST['exists'] as $key => $value) {
$host2service = get_record('mnet_host2service', 'hostid', $_POST['hostid'], 'serviceid', $key);
$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)) {
$host2service = new stdClass();
$host2service->hostid = $_POST['hostid'];
$host2service->serviceid = $key;
$host2service->publish = $publish;
$host2service->subscribe = $subscribe;
$host2service->id = insert_record('mnet_host2service', $host2service);
} elseif ($host2service->publish != $publish || $host2service->subscribe != $subscribe) {
$host2service->publish = $publish;
$host2service->subscribe = $subscribe;
$tf = update_record('mnet_host2service', $host2service);
}
}
}
if (is_int($hostid)) {
if (0 == $mnet_peer->id) $mnet_peer->set_id($hostid);
$mnet_peer->nextstep = 'verify';
$id_list = $mnet_peer->id;
if (!empty($CFG->mnet_all_hosts_id)) {
$id_list .= ', '.$CFG->mnet_all_hosts_id;
}
$concat = sql_concat('COALESCE(h2s.id,0) ', ' \'-\' ', ' svc.id');
$query = "
SELECT DISTINCT
$concat as id,
svc.id as serviceid,
svc.name,
svc.offer,
svc.apiversion,
r.parent_type,
r.parent,
h2s.hostid,
h2s.publish,
h2s.subscribe
FROM
{$CFG->prefix}mnet_service2rpc s2r,
{$CFG->prefix}mnet_rpc r,
{$CFG->prefix}mnet_service svc
LEFT JOIN
{$CFG->prefix}mnet_host2service h2s
ON
h2s.hostid in ($id_list) AND
h2s.serviceid = svc.id
WHERE
svc.offer = '1' AND
s2r.serviceid = svc.id AND
s2r.rpcid = r.id
ORDER BY
svc.name ASC";
$resultset = get_records_sql($query);
if (is_array($resultset)) {
$resultset = array_values($resultset);
} else {
$resultset = array();
}
require_once $CFG->dirroot.'/mnet/xmlrpc/client.php';
$remoteservices = array();
if ($hostid != $CFG->mnet_all_hosts_id) {
// Create a new request object
$mnet_request = new mnet_xmlrpc_client();
// Tell it the path to the method that we want to execute
$mnet_request->set_method('system/listServices');
$mnet_request->send($mnet_peer);
if (is_array($mnet_request->response)) {
foreach($mnet_request->response as $service) {
$remoteservices[$service['name']][$service['apiversion']] = $service;
}
}
}
$myservices = array();
foreach($resultset as $result) {
$result->hostpublishes = false;
$result->hostsubscribes = false;
if (isset($remoteservices[$result->name][$result->apiversion])) {
if ($remoteservices[$result->name][$result->apiversion]['publish'] == 1) {
$result->hostpublishes = true;
}
if ($remoteservices[$result->name][$result->apiversion]['subscribe'] == 1) {
$result->hostsubscribes = true;
}
}
if (empty($myservices[$result->name][$result->apiversion])) {
$myservices[$result->name][$result->apiversion] = array('serviceid' => $result->serviceid,
'name' => $result->name,
'offer' => $result->offer,
'apiversion' => $result->apiversion,
'parent_type' => $result->parent_type,
'parent' => $result->parent,
'hostsubscribes' => $result->hostsubscribes,
'hostpublishes' => $result->hostpublishes
);
}
// allhosts_publish allows us to tell the admin that even though he
// is disabling a service, it's still available to the host because
// he's also publishing it to 'all hosts'
if ($result->hostid == $CFG->mnet_all_hosts_id && $CFG->mnet_all_hosts_id != $mnet_peer->id) {
$myservices[$result->name][$result->apiversion]['allhosts_publish'] = $result->publish;
$myservices[$result->name][$result->apiversion]['allhosts_subscribe'] = $result->subscribe;
} elseif (!empty($result->hostid)) {
$myservices[$result->name][$result->apiversion]['I_publish'] = $result->publish;
$myservices[$result->name][$result->apiversion]['I_subscribe'] = $result->subscribe;
}
}
} else {
redirect('peers.php', get_string('nohostid','mnet'), '5');
exit;
}
include('./mnet_services.html');
?>
+93
View File
@@ -0,0 +1,93 @@
<?php
admin_externalpage_print_header($adminroot);
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
print_box(get_string('mnetdisabled','mnet'));
}
?>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<form method="post" action="peers.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="updateregisterall" value="1" />
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
<td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
</tr>
<tr>
<td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
</tr>
</table>
</div>
</form>
<table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
<tr>
<th class="header c0"><?php print_string('site'); ?></th>
<th class="header c1"><?php print_string('system','mnet'); ?></th>
<th class="header c2"><?php print_string('last_connect_time', 'mnet'); ?></th>
<th class="header c3"></th>
</tr>
<?php
foreach($hosts as $host) {
if ($host->last_connect_time == 0) {
$last_connect = get_string('never');
} else {
$last_connect = date('H:i:s d/m/Y', $host->last_connect_time);
}
?>
<tr>
<td class="cell c0"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->name; ?></a></td>
<td class="cell c1"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->wwwroot; ?></a></td>
<td class="cell c2"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
<td class="cell c3">
<?php if ($host->id != $CFG->mnet_all_hosts_id){ ?>
<form method="post" action="delete.php">
<div>
<input type="hidden" name="hostid" value="<?php echo $host->id; ?>" />
<input type="hidden" name="step" value="verify" />
<input type="submit" name="submit" value="<?php print_string('delete'); ?>"/>
</div>
</form>
<?php } ?>
</td>
</tr>
<?php
}
?>
</table>
<form method="post" action="peers.php">
<table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
<tr>
<th class="header c4" colspan="4">
<?php print_string('addnewhost', 'mnet'); ?>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="input" />
</th>
</tr>
<tr>
<td class="cell c0"></td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2"></td>
<td class="cell c3"></td>
</tr>
<tr>
<td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
</tr>
</table>
</form>
</div>
<?php
admin_externalpage_print_footer($adminroot);
?>
+151
View File
@@ -0,0 +1,151 @@
<?PHP // $Id$
// Allows the admin to configure other Moodle hosts info
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('mnetpeers', $adminroot);
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!extension_loaded('openssl')) {
admin_externalpage_print_header($adminroot);
print_error('requiresopenssl', 'mnet', '', NULL, true);
}
if (!$site = get_site()) {
admin_externalpage_print_header($adminroot);
print_error('nosite', '', '', NULL, true);
}
if (!function_exists('curl_init') ) {
admin_externalpage_print_header($adminroot);
print_error('nocurl', 'mnet', '', NULL, true);
}
/// Initialize variables.
// Step must be one of:
// input Parse the details of a new host and fetch its public key
// commit Save our changes (to a new OR existing host)
$step = optional_param('step', NULL, PARAM_ALPHA);
$hostid = optional_param('hostid', NULL, PARAM_INT);
// Fetch some strings for the HTML templates
$strmnetservices = get_string('mnetservices', 'mnet');
$strmnetlog = get_string('mnetlog', 'mnet');
$strmnetedithost = get_string('reviewhostdetails', 'mnet');
if (!isset($CFG->mnet_dispatcher_mode)) set_config('mnet_dispatcher_mode', 'off');
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->wwwroot)) {
// ensure we remove trailing slashes
$form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
}
if(!function_exists('xmlrpc_encode_request')) {
trigger_error("You must have xml-rpc enabled in your PHP build to use this feature.");
error(get_string('xmlrpc-missing', 'mnet'),'peers.php');
exit;
}
if (!empty($form->updateregisterall)) {
if (!empty($form->registerallhosts)) {
set_config('mnet_register_allhosts',1);
} else {
set_config('mnet_register_allhosts',0);
}
redirect('peers.php', get_string('changessaved'));
} else {
$mnet_peer = new mnet_peer();
if (!empty($form->id)) {
$form->id = clean_param($form->id, PARAM_INT);
$mnet_peer->set_id($form->id);
} else {
// PARAM_URL requires a genuine TLD (I think) This breaks my testing
$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');
exit;
}
unset($temp_wwwroot);
$mnet_peer->bootstrap($form->wwwroot);
}
if (isset($form->name) && $form->name != $mnet_peer->name) {
$form->name = clean_param($form->name, PARAM_NOTAGS);
$mnet_peer->set_name($form->name);
}
if (isset($form->deleted) && ($form->deleted == '0' || $form->deleted == '1')) {
$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);
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);
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);
exit;
}
}
}
// 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);
}
}
if ('input' == $form->step) {
include('./mnet_review.html');
} elseif ('commit' == $form->step) {
$bool = $mnet_peer->commit();
if ($bool) {
redirect('peers.php?step=update&amp;hostid='.$mnet_peer->id, get_string('changessaved'));
} else {
error('Invalid action parameter.', 'index.php');
}
}
}
} elseif (is_int($hostid)) {
$mnet_peer = new mnet_peer();
$mnet_peer->set_id($hostid);
$currentkey = mnet_get_public_key($mnet_peer->wwwroot);
if($currentkey == $mnet_peer->public_key) unset($currentkey);
$form = new stdClass();
if ($hostid != $CFG->mnet_all_hosts_id) {
include('./mnet_review.html');
} else {
include('./mnet_review_allhosts.html');
}
} else {
$hosts = get_records_select('mnet_host', " id != '{$CFG->mnet_localhost_id}' AND deleted = '0' ",'wwwroot ASC' );
if (empty($hosts)) $hosts = array();
include('./peers.html');
}
?>
+68
View File
@@ -0,0 +1,68 @@
<?php
admin_externalpage_print_header($adminroot);
?>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('trustedhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1" colspan="2">
<form method="post" action="trustedhosts.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
<input type="submit" value="<?php print_string('savechanges'); ?>" />
</div>
</form>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
</tr>
<?php
if (!empty($test_ip_address)){
?>
<tr>
<td class="cell c1" colspan="2">
<?php
if ($in_range) {
print_string('is_in_range', 'mnet', $test_ip_address);
echo '<br />';
print_string('validated_by', 'mnet', $validated_by);
} else {
print_string('not_in_range', 'mnet', $test_ip_address);
}
?>
</td>
</tr>
<?php
} else {
?>
<tr>
<td class="cell c1" colspan="2"><?php print_string('testtrustedhostsexplain', 'mnet'); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="cell c1" colspan="2">
<form method="get" action="trustedhosts.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
<input type="submit" value="<?php print_string('go'); ?>" />
</div>
</form>
</td>
</tr>
</table>
</div>
<?php
admin_externalpage_print_footer($adminroot);
?>
+72
View File
@@ -0,0 +1,72 @@
<?php
// Allows the admin to configure services for remote hosts
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('trustedhosts', $adminroot);
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!extension_loaded('openssl')) {
admin_externalpage_print_header($adminroot);
print_error('requiresopenssl', 'mnet', '', NULL, true);
}
if (!$site = get_site()) {
admin_externalpage_print_header($adminroot);
print_error('nosite', '', '', NULL, true);
}
$trusted_hosts = '';//array();
$old_trusted_hosts = get_config('mnet', 'mnet_trusted_hosts');
if (!empty($old_trusted_hosts)) {
$old_trusted_hosts = explode(',', $old_trusted_hosts);
} else {
$old_trusted_hosts = array();
}
$test_ip_address = optional_param('testipaddress', NULL, PARAM_HOST);
$in_range = false;
if (!empty($test_ip_address)) {
foreach($old_trusted_hosts as $host) {
list($network, $mask) = explode('/', $host.'/');
if (empty($network)) continue;
if (strlen($mask) == 0) $mask = 32;
if (ip_in_range($test_ip_address, $network, $mask)) {
$in_range = true;
$validated_by = $network.'/'.$mask;
break;
}
}
}
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
$hostlist = preg_split("/[\s,]+/", $form->hostlist);
foreach($hostlist as $host) {
list($address, $mask) = explode('/', $host.'/');
if (empty($address)) continue;
if (strlen($mask) == 0) $mask = 32;
$trusted_hosts .= trim($address).'/'.trim($mask)."\n";
unset($address, $mask);
}
set_config('mnet_trusted_hosts', str_replace("\n", ',', $trusted_hosts), 'mnet');
} elseif (!empty($old_trusted_hosts)) {
foreach($old_trusted_hosts as $host) {
list($address, $mask) = explode('/', $host.'/');
if (empty($address)) continue;
if (strlen($mask) == 0) $mask = 32;
$trusted_hosts .= trim($address).'/'.trim($mask)."\n";
unset($address, $mask);
}
}
include('./trustedhosts.html');
?>
+1 -1
View File
@@ -55,7 +55,7 @@
print_heading($strmodulename);
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "60%");
print_simple_box(get_string("configwarning", 'admin'), "center", "60%");
echo "<br />";
print_simple_box_start("center", "");
+39 -16
View File
@@ -2,10 +2,15 @@
// Allows the admin to manage activity modules
require_once('../config.php');
require_once('../course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// defines
define('MODULE_TABLE','module_administration_table');
$adminroot = admin_get_root();
admin_externalpage_setup('managemodules', $adminroot);
require_once('../course/lib.php');
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
@@ -23,6 +28,7 @@
$strsettings = get_string("settings");
$stractivities = get_string("activities");
$stractivitymodule = get_string("activitymodule");
$strshowmodulecourse = get_string('showmodulecourse');
admin_externalpage_print_header($adminroot);
@@ -149,16 +155,19 @@
ksort($modulebyname);
/// Print the table of all modules
$table->head = array ($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings);
$table->align = array ("left", "right", "left", "center", "center", "center");
$table->wrap = array ("nowrap", "", "", "", "","");
$table->size = array ("100%", "10", "10", "10", "10","12");
$table->width = "100";
// construct the flexible table ready to display
$table = new flexible_table(MODULE_TABLE);
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
$table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/modules.php');
$table->set_attribute('id', 'modules');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
foreach ($modulebyname as $modulename => $module) {
$icon = "<img src=\"$CFG->modpixpath/$module->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
// took out hspace="\10\", because it does not validate. don't know what to replace with.
$icon = "<img src=\"$CFG->modpixpath/$module->name/icon.gif\" class=\"icon\" alt=\"\" />";
$delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=$USER->sesskey\">$strdelete</a>";
@@ -168,27 +177,41 @@
$settings = "";
}
$count = count_records("$module->name");
$count = count_records_select("$module->name",'course<>0');
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey={$USER->sesskey}\" title=\"$strshowmodulecourse\">$count</a>";
}
else {
$countlink = "$count";
}
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
"<img src=\"$CFG->pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
"<img src=\"$CFG->pixpath/i/hide.gif\" class=\"icon\" alt=\"$strhide\" /></a>";
$class = "";
} else {
$visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strshow\">".
"<img src=\"$CFG->pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
$class = "class=\"dimmed_text\"";
"<img src=\"$CFG->pixpath/i/show.gif\" class=\"icon\" alt=\"$strshow\" /></a>";
$class = " class=\"dimmed_text\"";
}
if ($module->name == "forum") {
$delete = "";
$visible = "";
$class = "";
}
$table->data[] = array ("<span $class>$icon $modulename</span>", $count, $module->version, $visible, $delete, $settings);
}
print_table($table);
echo "<br /><br />";
$table->add_data(array(
'<span'.$class.'>'.$icon.' '.$modulename.'</span>',
$countlink,
'<span'.$class.'>'.$module->version.'</span>',
$visible,
$delete,
$settings
));
}
$table->print_html();
admin_externalpage_print_footer($adminroot);
+112
View File
@@ -0,0 +1,112 @@
<?php /// $Id$
/// Search and replace strings throughout all texts in the whole database
require_once('../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('multilangupgrade', $adminroot);
$go = optional_param('go', 0, PARAM_BOOL);
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
###################################################################
admin_externalpage_print_header($adminroot);
print_heading(get_string('multilangupgrade', 'admin'));
$strmultilangupgrade = get_String('multilangupgradeinfo', 'admin');
if (!$go or !data_submitted() or !confirm_sesskey()) { /// Print a form
$optionsyes = array('go'=>1, 'sesskey'=>sesskey());
notice_yesno($strmultilangupgrade, 'multilangupgrade.php', 'index.php', $optionsyes, null, 'post', 'get');
admin_externalpage_print_footer($adminroot);
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());
echo '<strong>Progress:</strong>';
$i = 0;
$skiptables = array($CFG->prefix.'config');//, $CFG->prefix.'sessions2');
foreach ($tables as $table) {
if (($CFG->prefix && strpos($table, $CFG->prefix) !== 0)
or strpos($table, $CFG->prefix.'pma') === 0) { // Not our tables
continue;
}
if (in_array($table, $skiptables)) { // Don't process these
continue;
}
if ($columns = $db->MetaColumns($table, false)) {
if (!array_key_exists('id', $columns) and !array_key_exists('ID', $columns)) {
continue; // moodle tables have id
}
foreach ($columns as $column => $data) {
if (in_array($data->type, array('text','mediumtext','longtext','varchar'))) { // Text stuff only
// first find candidate records
$rs = get_recordset_sql("SELECT id, $column FROM $table WHERE $column LIKE '%</lang>%' OR $column LIKE '%<span lang=%'");
if ($rs and $rs->RecordCount() > 0) {
while (!$rs->EOF) {
$text = $rs->fields[$column];
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=".$rs->fields['id'], false);
}
if ($i % 600 == 0) {
echo '<br />';
}
if ($i % 10 == 0) {
echo '.';
}
$i++;
$rs->MoveNext();
}
}
}
}
}
}
// set conversion flag - switches to new plugin automatically
set_config('filter_multilang_converted', 1);
print_simple_box_end();
/// Rebuild course cache which might be incorrect now
notify('Rebuilding course cache...', 'notifysuccess');
rebuild_course_cache();
notify('...finished', 'notifysuccess');
print_continue('index.php');
admin_externalpage_print_footer($adminroot);
die;
function multilangupgrade_impl($langblock) {
$searchtosplit = '/<(?:lang|span) lang="([a-zA-Z0-9_-]*)".*?>(.+?)<\/(?:lang|span)>/is';
preg_match_all($searchtosplit, $langblock[0], $rawlanglist);
$return = '';
foreach ($rawlanglist[1] as $index=>$lang) {
$return .= '<span lang="'.$lang.'" class="multilang">'.$rawlanglist[2][$index].'</span>';
}
return $return;
}
?>
+2 -2
View File
@@ -46,7 +46,7 @@ function online_assignment_cleanup($output=false) {
/// get a list of all courses on this site
$courses = get_courses();
$courses = get_records('course');
/// cycle through each course
foreach ($courses as $course) {
@@ -99,7 +99,7 @@ function online_assignment_cleanup($output=false) {
/// grab the section record
if (!($section = get_record('course_sections', 'id', $newsection))) {
if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '.$course->fullname.'<br />';
if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. format_string($course->fullname) .'<br />';
continue;
}
+16 -9
View File
@@ -4,11 +4,18 @@ require_once($CFG->libdir.'/pagelib.php');
define('PAGE_ADMIN', 'admin');
define('BLOCK_L_MIN_WIDTH',0);
define('BLOCK_L_MAX_WIDTH',210);
define('BLOCK_R_MIN_WIDTH',0);
define('BLOCK_R_MAX_WIDTH',210);
// Bounds for block widths
// more flexible for theme designers taken from theme config.php
$lmin = (empty($THEME->block_l_min_width)) ? 0 : $THEME->block_l_min_width;
$lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width;
$rmin = (empty($THEME->block_r_min_width)) ? 0 : $THEME->block_r_min_width;
$rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width;
define('BLOCK_L_MIN_WIDTH', $lmin);
define('BLOCK_L_MAX_WIDTH', $lmax);
define('BLOCK_R_MIN_WIDTH', $rmin);
define('BLOCK_R_MAX_WIDTH', $rmax);
page_map_class(PAGE_ADMIN, 'page_admin');
class page_admin extends page_base {
@@ -109,12 +116,12 @@ class page_admin extends page_base {
$this->init_full($section); // we're trusting that init_full() has already been called by now; it should have.
// if not, print_header() has to be called with a $section parameter
if ($this->user_allowed_editing()) {
$buttons = '<table><tr><td><form target="' . $CFG->framename . '" method="get" action="' . $this->url_get_path() . '">'.
'<input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
// The search page currently doesn't handle block editing
if ($this->section != 'search' and $this->user_allowed_editing()) {
$buttons = '<div><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'.
'<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
'<input type="hidden" name="section" value="'.$this->section.'" />'.
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>' .
'</tr></table>';
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
} else {
$buttons = '&nbsp;';
}
+6
View File
@@ -20,8 +20,14 @@
$html = ob_get_contents();
ob_end_clean();
/// Delete styles from output
$html = preg_replace('#(\n?<style[^>]*?>.*?</style[^>]*?>)|(\n?<style[^>]*?/>)#is', '', $html);
$html = preg_replace('#(\n?<head[^>]*?>.*?</head[^>]*?>)|(\n?<head[^>]*?/>)#is', '', $html);
/// Delete DOCTYPE from output
$html = preg_replace('/<!DOCTYPE html PUBLIC.*?>/is', '', $html);
/// Delete body and html tags
$html = preg_replace('/<html.*?>.*?<body.*?>/is', '', $html);
$html = preg_replace('/<\/body><\/html>/is', '', $html);
echo $html;
+2 -2
View File
@@ -16,8 +16,8 @@ if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) {
}
$site = get_site();
$subject = get_string('noreplybouncesubject','moodle',$site->fullname);
$body = get_string('noreplybouncemessage','moodle',$site->fullname)."\n\n";
$subject = get_string('noreplybouncesubject','moodle',format_string($site->fullname));
$body = get_string('noreplybouncemessage','moodle',format_string($site->fullname))."\n\n";
$fd = fopen('php://stdin','r');
if ($fd) {
+75 -88
View File
@@ -24,7 +24,7 @@
}
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
@@ -34,98 +34,94 @@
$strregistration = get_string("registration");
$strregistrationinfo = get_string("registrationinfo");
print_header("$site->shortname: $strregistration", "$site->fullname",
print_header("$site->shortname: $strregistration", $site->fullname,
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
print_heading($strregistration);
print_simple_box($strregistrationinfo, "center", "70%");
echo "<br />";
/// Print the form
print_simple_box_start("center", "");
echo "<form id=\"mform1\" class=\"mform\" action=\"http://moodle.org/register/\" method=\"post\">\n";
echo '<fieldset id="registration">';
echo '<legend>Registration Information</legend>';
echo "<form name=\"form\" action=\"http://moodle.org/register/\" method=\"post\">\n";
echo "<table cellpadding=\"9\" border=\"0\">\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"center\" colspan=\"2\">".get_string("location")."</td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">Moodle URL:</td>\n";
echo "<td>$CFG->wwwroot</td>\n";
echo "<!-- The following hidden variables are to help prevent fake entries being sent. -->\n";
echo "<!-- Together they form a key. If any of these change between updates then the entry -->\n";
echo "<!-- is flagged as a new entry and will be manually checked by the list maintainer -->\n";
echo "<input type=\"hidden\" name=\"url\" value=\"$CFG->wwwroot\">\n";
echo "<input type=\"hidden\" name=\"secret\" value=\"$CFG->siteidentifier\">\n";
echo "<input type=\"hidden\" name=\"host\" value=\"".$_SERVER["HTTP_HOST"]."\">\n";
echo "<input type=\"hidden\" name=\"lang\" value=\"".current_language()."\">\n";
echo "</td></tr>\n";
echo "<input type=\"hidden\" name=\"url\" value=\"$CFG->wwwroot\" />\n";
echo "<input type=\"hidden\" name=\"secret\" value=\"$CFG->siteidentifier\" />\n";
echo "<input type=\"hidden\" name=\"host\" value=\"".$_SERVER["HTTP_HOST"]."\" />\n";
echo "<input type=\"hidden\" name=\"lang\" value=\"".current_language()."\" />\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("currentversion").":</td>\n";
echo "<td>$CFG->release ($CFG->version)</td>\n";
echo "<input type=\"hidden\" name=\"version\" value=\"$CFG->version\">\n";
echo "<input type=\"hidden\" name=\"release\" value=\"$CFG->release\">\n";
echo "</td></tr>\n";
echo "<input type=\"hidden\" name=\"version\" value=\"$CFG->version\" />\n";
echo "<input type=\"hidden\" name=\"release\" value=\"$CFG->release\" />\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("fullsitename").":</td>\n";
echo "<td><input size=\"50\" type=\"text\" name=\"sitename\" value=\"$site->fullname\"></td>\n";
echo "</tr>\n";
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label>URL</label></div>';
echo '<div class="felement ftext">'.$CFG->wwwroot.'</div>';
echo '</div>';
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label>'.get_string("currentversion").'</label></div>';
echo '<div class="felement ftext">'."$CFG->release ($CFG->version)".'</div>';
echo '</div>';
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="sitename">'.get_string("fullsitename").'</label></div>';
echo '<div class="felement ftext">';
echo '<input size="50" id="sitename" type="text" name="sitename" value="'.format_string($site->fullname).'" />';
echo '</div>';
echo '</div>';
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("country").":</td>\n";
echo "<td>";
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="menucountry">'.get_string("country").'</label></div>';
echo '<div class="felement ftext">';
choose_from_menu (get_list_of_countries(), "country", $admin->country, get_string("selectacountry")."...", "", "");
echo "</td>\n";
echo "</tr>\n";
echo '</div>';
echo '</div>';
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\"><a href=\"http://moodle.org/sites/?country=$admin->country\" title=\"See the current list of sites\" target=_blank>".get_string("publicdirectory")."</a>:</td>\n";
echo "<td>";
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="menupublic">'."<a href=\"http://moodle.org/sites/?country=$admin->country\" title=\"".get_string("publicdirectorytitle")."\">".get_string("publicdirectory")."</a>".'</label></div>';
echo '<div class="felement ftext">';
$options[0] = get_string("publicdirectory0");
$options[1] = get_string("publicdirectory1");
$options[2] = get_string("publicdirectory2");
choose_from_menu ($options, "public", "2", "", "", "");
unset($options);
echo "</td>\n";
echo "</tr>\n";
echo '</div>';
echo '</div>';
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("registrationcontact")."</a>:</td>\n";
echo "<td>\n";
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="menucontact">'.get_string("registrationcontact").'</label></div>';
echo '<div class="felement ftext">';
$options[0] = get_string("registrationcontactno");
$options[1] = get_string("registrationcontactyes");
choose_from_menu ($options, "contact", "1", "", "", "");
unset($options);
echo "</td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("statistics").":";
echo "<br />(".get_string("notpublic").')';
echo "</td>\n";
echo "<td>";
echo '</div>';
echo '</div>';
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label>'.get_string("statistics")."<br />(".get_string("notpublic").')'.'</label></div>';
echo '<div class="felement ftext">';
$count = count_records('course')-1;
echo get_string("courses").": ".$count;
echo "<input type=\"hidden\" name=\"courses\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"courses\" value=\"$count\" />\n";
echo '<br />';
$count = count_records('user', 'deleted', 0);
echo get_string("users").": ".$count;
echo "<input type=\"hidden\" name=\"users\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"users\" value=\"$count\" />\n";
echo '<br />';
// total number of role assignments
$count = count_records('role_assignments');
echo get_string('roleassignments', 'role').": ".$count;
echo "<input type=\"hidden\" name=\"roleassignments\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"roleassignments\" value=\"$count\" />\n";
echo '<br />';
// first find all distinct roles with mod/course:update
@@ -140,64 +136,55 @@
$count = count_records_sql($sql);
echo get_string("teachers").": ".$count;
echo "<input type=\"hidden\" name=\"courseupdaters\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"courseupdaters\" value=\"$count\" />\n";
echo '<br />';
$count = count_records('forum_posts');
echo get_string("posts", 'forum').": ".$count;
echo "<input type=\"hidden\" name=\"posts\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"posts\" value=\"$count\" />\n";
echo '<br />';
$count = count_records('question');
echo get_string("questions", 'quiz').": ".$count;
echo "<input type=\"hidden\" name=\"questions\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"questions\" value=\"$count\" />\n";
echo '<br />';
$count = count_records('resource');
echo get_string("modulenameplural", "resource").": ".$count;
echo "<input type=\"hidden\" name=\"resources\" value=\"$count\">\n";
echo '<br />';
echo "<input type=\"hidden\" name=\"resources\" value=\"$count\" />\n";
echo '</div>';
echo '</div>';
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="adminname">'.get_string("administrator").'</label></div>';
echo '<div class="felement ftext">';
echo "<input size=\"50\" type=\"text\" id=\"adminname\" name=\"adminname\" value=\"".fullname($admin, true)."\" />";
echo '</div>';
echo '</div>';
echo "</td>\n";
echo "</tr>\n";
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="adminemail">'.get_string("email").'</label></div>';
echo '<div class="felement ftext">';
echo "<input size=\"50\" type=\"text\" id=\"adminemail\" name=\"adminemail\" value=\"$admin->email\" />";
echo '</div>';
echo '</div>';
echo "<tr valign=\"top\">\n";
echo "<td align=\"center\" colspan=\"2\"><hr size=\"1\" noshade>".get_string("administrator")."</td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("administrator").":</td>\n";
echo "<td><input size=\"50\" type=\"text\" name=\"adminname\" value=\"".fullname($admin, true)."\"></td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("email").":</td>\n";
echo "<td><input size=\"50\" type=\"text\" name=\"adminemail\" value=\"$admin->email\"></td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">".get_string("registrationemail")."</a>:</td>\n";
echo "<td>\n";
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="menumailme">'.get_string("registrationemail").'</label></div>';
echo '<div class="felement ftext">';
$options[0] = get_string("registrationno");
$options[1] = get_string("registrationyes");
choose_from_menu ($options, "mailme", "1", "", "", "");
unset($options);
echo "</td>\n";
echo "</tr>\n";
echo '</div>';
echo '</div>';
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\">&nbsp;</td>\n";
echo "<td><input type=\"submit\" value=\"".get_string("registrationsend")."\"></td>\n";
echo "</tr>\n";
echo '<div class="felement fsubmit"><input name="submitbutton" value="'.get_string('registrationsend').'" type="submit" id="id_submitbutton" /></div>';
echo "</fieldset>\n";
echo "</table>\n";
echo "</form>\n";
print_simple_box_end();
echo "<br />\n";
print_footer();
?>
+4 -4
View File
@@ -25,10 +25,10 @@ if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Pr
print_simple_box_start('center');
echo '<div align="center">';
echo '<form action="replace.php" method="post">';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'">';
echo 'Search whole database for: <input type="text" name="search"><br />';
echo 'Replace with this string: <input type="text" name="replace"><br /></br />';
echo '<input type="submit" value="Yes, do it now"><br />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo 'Search whole database for: <input type="text" name="search" /><br />';
echo 'Replace with this string: <input type="text" name="replace" /><br />';
echo '<input type="submit" value="Yes, do it now" /><br />';
echo '</form>';
echo '</div>';
print_simple_box_end();
+16 -13
View File
@@ -17,7 +17,7 @@
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID)); // needed?
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'));
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3, $adminroot);
}
@@ -31,9 +31,9 @@
$tableprefix = $CFG->prefix.'stats_';
$earliestday = get_field_sql('SELECT timeend FROM '.$tableprefix.'daily ORDER BY timeend LIMIT 1');
$earliestweek = get_field_sql('SELECT timeend FROM '.$tableprefix.'weekly ORDER BY timeend LIMIT 1');
$earliestmonth = get_field_sql('SELECT timeend FROM '.$tableprefix.'monthly ORDER BY timeend LIMIT 1');
$earliestday = get_field_sql('SELECT timeend FROM '.$tableprefix.'daily ORDER BY timeend');
$earliestweek = get_field_sql('SELECT timeend FROM '.$tableprefix.'weekly ORDER BY timeend');
$earliestmonth = get_field_sql('SELECT timeend FROM '.$tableprefix.'monthly ORDER BY timeend');
if (empty($earliestday)) $earliestday = time();
if (empty($earliestweek)) $earliestweek = time();
@@ -46,13 +46,13 @@
$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);
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id, $adminroot);
}
echo '<form action="index.php" method="post">'."\n";
echo '<fieldset class="invisiblefieldset">';
$table->width = '*';
$table->align = array('left','left','left','left','left','left');
$table->data[] = array(get_string('statsreporttype'),choose_from_menu($reportoptions,'report',$report,'','','',true),
get_string('statstimeperiod'),choose_from_menu($timeoptions,'time',$time,'','','',true),
@@ -60,30 +60,34 @@
'<input type="submit" value="'.get_string('view').'" />') ;
print_table($table);
echo '</fieldset>';
echo '</form>';
if (!empty($report) && !empty($time)) {
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$sql = $param->sql ." LIMIT ".$numcourses;
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
." ORDER BY ".$param->orderby;
}
error_log($sql);
$courses = get_records_sql($sql);
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
notify(get_string('statsnodata'));
notify(get_string('statsnodata'));echo '</td></tr></table>';echo '<p>after notify</p>';
} else {
echo '<div align="center"><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
if (empty($CFG->gdversion)) {
echo '<div class="boxaligncenter">(' . 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>';
}
$table = new StdClass;
$table->align = array('left','center','center','center');
@@ -111,7 +115,6 @@
print_table($table);
}
}
admin_externalpage_print_footer($adminroot);
?>
+5 -4
View File
@@ -17,17 +17,16 @@
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$sql = $param->sql ." LIMIT ".$numcourses;
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
." ORDER BY ".$param->orderby;
}
$courses = get_records_sql($sql);
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
@@ -40,6 +39,8 @@
$graph->parameter['legend_size'] = 10;
$graph->parameter['x_axis_angle'] = 90;
$graph->parameter['title'] = false; // moodle will do a nicer job.
$graph->y_tick_labels = null;
$graph->offset_relation = null;
if ($report != STATS_REPORT_ACTIVE_COURSES) {
$graph->parameter['y_decimal_left'] = 2;
}
+7 -5
View File
@@ -16,16 +16,18 @@
print_heading(get_string('chooselogs') .':');
print_log_selector_form($course);
print_mnet_log_selector_form($CFG->mnet_localhost_id, $course);
echo '<br />';
print_heading(get_string('chooselivelogs') .':');
echo '<center><h3>';
link_to_popup_window('/course/report/log/live.php?id='. $course->id,'livelog', get_string('livelogs'), 500, 800);
echo '</h3></center>';
$heading = link_to_popup_window('/course/report/log/live.php?id='. $course->id,
'livelog', get_string('livelogs'),
500, 800, '', 'none', true);
print_heading($heading, 'center', 3);
admin_externalpage_print_footer($adminroot);
?>
?>
+2 -2
View File
@@ -38,14 +38,14 @@ class ExHtmlReporter extends HtmlReporter {
* @param bool $showpasses Whether this reporter should output anything for passes.
*/
function ExHtmlReporter($showpasses) {
global $CFG;
global $CFG, $THEME;
$this->HtmlReporter();
$this->showpasses = $showpasses;
$this->strrunonlyfolder = $this->get_string('runonlyfolder');
$this->strrunonlyfile = $this->get_string('runonlyfile');
$this->strseparator = ' <img src="' . $CFG->pixpath . '/a/r_breadcrumb.gif" class="resize" alt="" /> ';
$this->strseparator = get_separator();
}
/**
+4 -2
View File
@@ -90,16 +90,18 @@ if (!is_null($path)) {
}
// Print the form for adjusting options.
print_simple_box_start('center', '70%');
echo '<form method="GET" action="index.php">';
echo '<form method="get" action="index.php">';
echo '<fieldset class="invisiblefieldset">';
print_heading($formheader);
echo '<p>'; print_checkbox('showpasses', 1, $showpasses, get_string('showpasses', $langfile)); echo '</p>';
echo '<p>'; print_checkbox('showsearch', 1, $showsearch, get_string('showsearch', $langfile)); echo '</p>';
echo '<p>'; print_checkbox('thorough', 1, $thorough, get_string('thorough', $langfile)); echo '</p>';
echo '<p>';
echo '<label for="path">', get_string('onlytest', $langfile), '</label> ';
echo '<input type="text" id="path" name="path" value="', $displaypath, '" size="60" />';
echo '<input type="text" id="path" name="path" value="', $displaypath, '" size="40" />';
echo '</p>';
echo '<input type="submit" value="' . get_string('runtests', $langfile) . '" />';
echo '</fieldset>';
echo '</form>';
print_simple_box_end();
+4 -4
View File
@@ -30,7 +30,7 @@
}
if ($mode == STATS_MODE_RANKED) {
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?time='.$time);
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?time='.$time, '', 3, $adminroot);
}
if (!$course = get_record("course","id",$courseid)) {
@@ -46,7 +46,7 @@
require_login();
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'));
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3, $adminroot);
}
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $course->id));
@@ -59,7 +59,7 @@
// $strreports = get_string("reports");
// $strstats = get_string('stats');
//
// $menu = report_stats_mode_menu($course, $mode, $time);
// $menu = report_stats_mode_menu($course, $mode, $time); // add 4th $url parameter if uncommented!
//
//
// $crumb = "<a href=\"{$CFG->wwwroot}/admin\">".get_string('administration')."</a> ->
@@ -67,7 +67,7 @@
// $strstats";
// print_header("$course->shortname: $strstats", "$course->fullname",
// $crumb, '', '', true, '&nbsp', $menu);
// $crumb, '', '', true, '&nbsp;', $menu);
require_once($CFG->dirroot.'/course/report/stats/report.php');
+2 -2
View File
@@ -80,9 +80,9 @@
echo '<form action="allowassign.php" method="post">';
print_table($table);
echo '<div class="singlebutton"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
echo '</div></form>';
admin_externalpage_print_footer($adminroot);
+2 -2
View File
@@ -78,9 +78,9 @@
echo '<form action="allowoverride.php" method="post">';
print_table($table);
echo '<div class="singlebutton"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
echo '</div></form>';
admin_externalpage_print_footer($adminroot);
+80 -64
View File
@@ -1,98 +1,114 @@
<form name="assignform" id="assignform" method="post" action="">
<form id="assignform" method="post" action="">
<div>
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<table align="center" border="0" cellpadding="5" cellspacing="0">
<table summary="" style="margin-left:auto;margin-right:auto" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php print_string('existingusers', 'role', count($contextusers)); ?>
</td>
<td></td>
<td valign="top">
<?php print_string('potentialusers', 'role', $usercount); ?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.assignform.add.disabled=true;
document.assignform.remove.disabled=false;
document.assignform.addselect.selectedIndex=-1;" />
<?php
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email."</option>\n";
}
?>
<label for="removeselect"><?php print_string('existingusers', 'role', count($contextusers)); ?></label>
<br />
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=false;
getElementById('assignform').addselect.selectedIndex=-1;">
<?php
$i = 0;
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
if ($contextuser->hidden) {
$hidden=' ('.get_string('hiddenassign').') ';
} else {
$hidden="";
}
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
$i++;
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select></td>
<td valign="top">
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="submit" id="remove" value="&rarr;" />
<br />
<label title="<?php print_string('hiddenassign') ?>">
<input type="checkbox" name="hidden" value="1" />
<img src="<?php echo $CFG->pixpath; ?>/t/hide.gif" alt="<?php print_string('hiddenassign') ?>" class="hide-show-image" />
<?php helpbutton('hiddenassign', get_string('hiddenassign')); ?>
</label>
<?php check_theme_arrows(); ?>
<p class="arrow_button">
<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'); ?>" />
</p>
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple
onFocus="document.assignform.add.disabled=false;
document.assignform.remove.disabled=true;
document.assignform.removeselect.selectedIndex=-1;">
<label for="addselect"><?php print_string('potentialusers', 'role', $usercount); ?></label>
<br />
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=false;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
}
echo "</optgroup>\n";
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while (! $availableusers->EOF) {
$user = $availableusers->FetchObj();
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
$availableusers->MoveNext();
}
echo "</optgroup>\n";
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while (! $availableusers->EOF) {
$user = $availableusers->FetchObj();
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
$availableusers->MoveNext();
}
}
}
} else {
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
}
}
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
onFocus ="document.assignform.add.disabled=true;
document.assignform.remove.disabled=true;
document.assignform.removeselect.selectedIndex=-1;
document.assignform.addselect.selectedIndex=-1;"
<label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
<input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>"
onfocus ="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;
getElementById('assignform').addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
document.assignform.previoussearch.value=1;
document.assignform.submit();
getElementById('assignform').previoussearch.value=1;
getElementById('assignform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
if (!empty($searchusers)) {
if (!empty($searchtext)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
</table>
</div>
</form>
+61 -29
View File
@@ -36,7 +36,6 @@
error("Context ID was incorrect (can't find it)");
}
$inmeta = 0;
if ($context->contextlevel == CONTEXT_COURSE) {
$courseid = $context->instanceid;
@@ -51,9 +50,11 @@
}
} else {
$courseid = SITEID;
$course = get_site();
$course = clone($SITE);
}
require_login($course);
if ($context->contextlevel == CONTEXT_COURSE) {
require_login($context->instanceid);
} else {
@@ -62,7 +63,9 @@
require_capability('moodle/role:assign', $context);
$assignableroles = get_assignable_roles($context);
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
/// Get some language strings
@@ -100,13 +103,13 @@
if ($courseid != SITEID) {
print_header("$fullname", "$fullname",
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> ->".$straction,
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid\">$fullname</a> ->".$straction,
"", "", true, "&nbsp;", navmenu($course));
/// site header
} else {
print_header("$course->fullname: $fullname", "$course->fullname",
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
print_header("$course->fullname: $fullname", $course->fullname,
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
$showroles = 1;
@@ -116,14 +119,19 @@
$adminroot = admin_get_root();
admin_externalpage_setup('assignroles', $adminroot);
admin_externalpage_print_header($adminroot);
print_heading($straction);
} else if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
$adminroot = admin_get_root();
admin_externalpage_setup('frontpageroles', $adminroot);
admin_externalpage_print_header($adminroot);
$currenttab = '';
$tabsmode = 'assign';
include_once('tabs.php');
} else {
$currenttab = '';
$tabsmode = 'assign';
include_once('tabs.php');
}
/// Process incoming role assignment
if ($frm = data_submitted()) {
@@ -158,8 +166,25 @@
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$topleveladmin = false;
// we only worry about this if the role has doanything capability at site level
if ($context->id == $sitecontext->id && $adminroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext)) {
foreach ($adminroles as $adminrole) {
if ($adminrole->id == $roleid) {
$topleveladmin = true;
}
}
}
foreach ($frm->removeselect as $removeuser) {
$removeuser = clean_param($removeuser, PARAM_INT);
if ($topleveladmin && ($removeuser == $USER->id)) { // Prevent unassigning oneself from being admin
continue;
}
if (! role_unassign($roleid, $removeuser, 0, $context->id)) {
$errors[] = "Could not remove user with id $removeuser from this role!";
} else if ($inmeta) {
@@ -179,17 +204,27 @@
}
}
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');
}
if ($context->contextlevel==CONTEXT_SYSTEM) {
print_box(get_string('globalroleswarning', 'role'));
}
if ($roleid) { /// prints a form to swap roles
/// Get all existing participants in this context.
// Why is this not done with get_users???
if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email')) {
if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email, r.hidden')) {
$contextusers = array();
}
$select = "username <> 'guest' AND username <> 'changeme' AND deleted = 0 AND confirmed = 1";
$select = "username <> 'guest' AND deleted = 0 AND confirmed = 1";
$usercount = count_records_select('user', $select) - count($contextusers);
$searchtext = trim($searchtext);
@@ -201,22 +236,18 @@
$select .= " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
}
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
ORDER BY lastname ASC, firstname ASC');
/// In the .html file below we loop through these results and exclude any in $contextusers
echo '<form name="rolesform" action="assign.php" method="post">';
echo '<div align="center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
if ($userid) {
echo '<input type="hidden" name="userid" value="'.$userid.'" />';
}
echo '<input type="hidden" name="courseid" value="'.$courseid.'" />';
echo '<input type="hidden" name="contextid" value="'.$context->id.'" />'.$strroletoassign.': ';
choose_from_menu ($assignableroles, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='rolesform.submit()');
echo '</div></form>';
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
$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);
echo '</div>';
print_simple_box_start('center');
include('assign.html');
@@ -243,20 +274,21 @@
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '20%';
$table->head = array(get_string('roles', 'role'), get_string('users'));
$table->wrap = array('nowrap', 'nowrap');
$table->align = array('right', 'center');
$table->width = '60%';
$table->head = array(get_string('roles', 'role'), get_string('description'), get_string('users'));
$table->wrap = array('nowrap', '', 'nowrap');
$table->align = array('right', 'left', 'center');
foreach ($assignableroles as $roleid => $rolename) {
$countusers = count_role_users($roleid, $context);
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>', $countusers);
$description = format_string(get_field('role', 'description', 'id', $roleid));
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>',$description, $countusers);
}
print_table($table);
}
if ($context->contextlevel == CONTEXT_SYSTEM) {
if ($context->contextlevel == CONTEXT_SYSTEM or ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID)) {
admin_externalpage_print_footer($adminroot);
} else {
print_footer($course);
+141 -66
View File
@@ -4,65 +4,106 @@
case 'add':
$submitlabel = get_string('addrole', 'role');
break;
case 'view':
$submitlabel = get_string('listallroles', 'role');
break;
case 'edit':
default:
$submitlabel = get_string('savechanges');
}
if ($action == 'view') {
?>
<form name="rolesform" action="manage.php" method="post">
<?php
}
?>
<form id="rolesform" action="manage.php" method="post">
<fieldset class="invisiblefieldset">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="action" value="<?php if ($action != 'view') { echo p($action); } ?>" />
<table cellpadding="9" cellspacing="0" align="center">
<tr valign="top">
<td align="right"><?php print_string('name') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->name);
} else {
echo '<input type="text" name="name" maxlength="254" size="50" value="'.s($role->name).'" />';
if (isset($errors["name"])) formerr($errors["name"]);
} ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('shortname') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->shortname);
} else {
echo '<input type="text" name="shortname" maxlength="20" size="15" value="'.s($role->shortname).'" />';
if (isset($errors["shortname"])) formerr($errors["shortname"]);
} ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('description') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->description);
$usehtmleditor = false;
} else {
print_textarea($usehtmleditor, 10, 50, 50, 10, 'description', $role->description);
} ?></td>
</tr>
</fieldset>
<table class="roledesc" cellpadding="9" cellspacing="0">
<?php if ($action == 'view') { ?>
<tr valign="top">
<td align="right"><?php print_string('name') ?>:</td>
<td><?php p($role->name); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('shortname') ?>:</td>
<td><?php p($role->shortname); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('description') ?>:</td>
<td><?php p($role->description); $usehtmleditor = false; ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('legacytype', 'role') ?>:</td>
<td><?php
$usehtmleditor = false;
if (empty($role->legacytype)) {
print_string('none');
} else {
print_string('legacy:'.$role->legacytype, 'role');
}
?>
</td>
</tr>
<?php } else { ?>
<tr valign="top">
<td align="right"><label for="name"><?php print_string('name') ?></label></td>
<td><?php
echo '<input type="text" id="name" name="name" maxlength="254" size="50" value="'.s($role->name).'" />';
if (isset($errors["name"])) formerr($errors["name"]);
?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="shortname"><?php print_string('shortname') ?></label></td>
<td><?php
echo '<input type="text" id="shortname" name="shortname" maxlength="20" size="15" value="'.s($role->shortname).'" />';
if (isset($errors["shortname"])) formerr($errors["shortname"]);
?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="edit-description"><?php print_string('description') ?></label></td>
<td><?php
print_textarea($usehtmleditor, 10, 50, 50, 10, 'description', $role->description);
?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="menulegacytype"><?php print_string('legacytype', 'role') ?></label></td>
<td><?php
$options = array();
$options[''] = get_string('none');
$legacyroles = get_legacy_roles();
foreach($legacyroles as $ltype=>$lcap) {
$options[$ltype] = get_string('legacy:'.$ltype, 'role');
}
choose_from_menu($options, 'legacytype', $role->legacytype, '');
?>
</td>
</tr>
<?php } ?>
</table>
<?php print_heading(get_string('permissions','role')) ?>
<?php
print_heading_with_help(get_string('permissions','role'), 'permissions');
<table class="rolecap" align="center">
$strinherit = get_string('notset','role');
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
?>
<table class="rolecap">
<tr>
<th class="name" align="left"><?php print_string('capability','role') ?></th>
<th class="inherit"><?php print_string('inherit','role') ?></th>
<th class="allow"><?php print_string('allow','role') ?></th>
<th class="prevent"><?php print_string('prevent','role') ?></th>
<th class="prohibit"><?php print_string('prohibit','role') ?></th>
<th class="risk"><?php print_string('risks','role') ?></th>
<th class="name" align="left" scope="col"><?php print_string('capability','role') ?></th>
<th class="inherit" scope="col"><?php p($strinherit); ?></th>
<th class="allow" scope="col"><?php p($strallow); ?></th>
<th class="prevent" scope="col"><?php p($strprevent); ?></th>
<th class="prohibit" scope="col"><?php p($strprohibit); ?></th>
<th class="risk" colspan="5" scope="col"><?php print_string('risks','role') ?></th>
</tr>
<?php
@@ -71,10 +112,26 @@
$contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// prepare legacy defaults
if (!empty($role->legacytype)) {
$defaultcaps = get_default_capabilities($role->legacytype);
} else {
$defaultcaps = false;
}
foreach ($capabilities as $capability) {
//legacy caps have their own selector
if (islegacy($capability->name)) {
continue;
}
// prints a breaker if component or name or context level
if ($capability->component != $component or $capability->contextlevel != $contextlevel) {
echo ('<tr class="rolecapheading header"><td colspan="6" class="header"><strong>'.
echo ('<tr class="rolecapheading header"><td colspan="10" class="header"><strong>'.
get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
}
@@ -84,59 +141,77 @@ foreach ($capabilities as $capability) {
if (empty($errors)) {
// check the capability override for this cap, this role in this context
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$localoverride = get_local_override($roleid, $sitecontext->id, $capability->name);
} else {
$localoverride = new object();
$localoverride->permission = $role->{$capability->name};
}
$disabled = ($action != 'edit') ? ' disabled="disabled" ' : '';
$disabled = ($action != 'edit' and $action != 'add') ? ' disabled="disabled" ' : '';
$riskinfo = '';
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">T</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_managetrust.gif" alt="'.get_string('riskmanagetrustshort', 'admin').'" /></a>';
$rowclasses .= ' riskmanagetrust';
}
$riskinfo .= '</td><td class="risk config">';
if (RISK_CONFIG & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">C</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_config.gif" alt="'.get_string('riskconfigshort', 'admin').'" /></a>';
$rowclasses .= ' riskconfig';
}
$riskinfo .= '</td><td class="risk xss">';
if (RISK_XSS & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">X</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_xss.gif" alt="'.get_string('riskxssshort', 'admin').'" /></a>';
$rowclasses .= ' riskxss';
}
$riskinfo .= '</td><td class="risk personal">';
if (RISK_PERSONAL & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">P</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_personal.gif" alt="'.get_string('riskpersonalshort', 'admin').'" /></a>';
$rowclasses .= ' riskpersonal';
}
$riskinfo .= '</td><td class="risk spam">';
if (RISK_SPAM & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">S</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_spam.gif" alt="'.get_string('riskspamshort', 'admin').'" /></a>';
$rowclasses .= ' riskspam';
}
$riskinfo .= '</td>';
$isinherit = (!isset($defaultcaps[$capability->name]) or $defaultcaps[$capability->name] == CAP_INHERIT) ? 'capdefault' : '';
$isallow = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_ALLOW) ? 'capdefault' : '';
$isprevent = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PREVENT) ? 'capdefault' : '';
$isprohibit = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PROHIBIT) ? 'capdefault' : '';
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name"><span title="<?php echo $capability->name ?>"><?php echo get_capability_string($capability->name); ?></span></td>
<td class="inherit"><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_INHERIT ?>" <?php if (!isset($localoverride->permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="allow"><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_ALLOW ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prevent" ><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PREVENT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prohibit" ><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PROHIBIT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="risk"><?php
echo $riskinfo;
?></td>
<td class="name"><span class="cap-desc"><a onclick="this.target='docspopup'" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></span></td>
<td class="inherit <?php echo $isinherit ?>">
<input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_INHERIT ?>" <?php if (!isset($localoverride->permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="allow <?php echo $isallow ?>">
<input type="radio" title="<?php p($strallow); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_ALLOW ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prevent <?php echo $isprevent ?>" >
<input type="radio" title="<?php p($strprevent); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PREVENT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prohibit <?php echo $isprohibit ?>" >
<input type="radio" title="<?php p($strprohibit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PROHIBIT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
</table>
<div class="submit" align="center">
<input type="submit" value="<?php p($submitlabel) ?>" />
<?php if ($action != 'view') { ?>
<div class="submit buttons">
<input type="submit" value="<?php p($submitlabel) ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
<?php } ?>
</div>
<?php } ?>
</form>
+213 -38
View File
@@ -15,7 +15,9 @@
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$cancel = optional_param('cancel', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/role:manage', $sitecontext);
if ($cancel) {
redirect('manage.php');
@@ -42,6 +44,12 @@
$i++;
}
// do not delete these default system roles
$defaultroles = array();
$defaultroles[] = $CFG->notloggedinroleid;
$defaultroles[] = $CFG->guestroleid;
$defaultroles[] = $CFG->defaultuserroleid;
$defaultroles[] = $CFG->defaultcourseroleid;
/// form processing, editing a role, adding a role, deleting a role etc.
switch ($action) {
@@ -49,6 +57,12 @@
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
$legacyroles = get_legacy_roles();
if (!array_key_exists($legacytype, $legacyroles)) {
$legacytype = '';
}
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
@@ -63,12 +77,19 @@
}
if (empty($errors)) {
$newrole = create_role($name, $shortname, $description);
$newroleid = create_role($name, $shortname, $description);
// set proper legacy type
if (!empty($legacytype)) {
assign_capability($legacyroles[$legacytype], CAP_ALLOW, $newroleid, $sitecontext->id);
}
} else {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
$newrole->legacytype = $legacytype;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
@@ -78,6 +99,12 @@
if (!isset($data->{$cap->name})) {
continue;
}
// legacy caps have their own selector
if (islegacy($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
@@ -85,11 +112,12 @@
}
if (empty($errors)) {
assign_capability($capname, $value, $newrole, $sitecontext->id);
assign_capability($capname, $value, $newroleid, $sitecontext->id);
} else {
$newrole->$capname = $value;
}
}
if (empty($errors)) {
redirect('manage.php');
}
@@ -100,6 +128,12 @@
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
$legacyroles = get_legacy_roles();
if (!array_key_exists($legacytype, $legacyroles)) {
$legacytype = '';
}
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
@@ -120,9 +154,10 @@
}
if (!empty($errors)) {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
$newrole->legacytype = $legacytype;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
@@ -132,6 +167,12 @@
if (!isset($data->{$cap->name})) {
continue;
}
// legacy caps have their own selector
if (islegacy($data->{$cap->name}) === 0 ) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
@@ -165,23 +206,38 @@
assign_capability($capname, $value, $roleid, $sitecontext->id);
}
}
}
if (empty($errors)) {
// update normal role settings
$role->id = $roleid;
$role->name = $name;
$role->shortname = $shortname;
$role->description = $description;
if (!update_record('role', $role)) {
error('Could not update role!');
}
// set proper legacy type
foreach($legacyroles as $ltype=>$lcap) {
if ($ltype == $legacytype) {
assign_capability($lcap, CAP_ALLOW, $roleid, $sitecontext->id);
} else {
unassign_capability($lcap, $roleid);
}
}
redirect('manage.php');
}
}
break;
case 'delete':
if (in_array($roleid, $defaultroles)) {
error('This role is used as one of the default system roles, it can not be deleted');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
if (!delete_role($roleid)) {
error('Could not delete role with ID '.$roleid);
@@ -223,9 +279,9 @@
if (array_key_exists($roleid, $roles) and confirm_sesskey()) {
$role = $roles[$roleid];
if ($role->sortorder + 1 < $rolescount) {
$bellow = $roles[$rolesort[$role->sortorder + 1]];
$below = $roles[$rolesort[$role->sortorder + 1]];
if (!switch_roles($role, $bellow)) {
if (!switch_roles($role, $below)) {
error("Cannot move role with ID $roleid");
}
}
@@ -234,9 +290,94 @@
redirect('manage.php');
break;
default:
case 'duplicate':
if (!array_key_exists($roleid, $roles)) {
redirect('manage.php');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
//ok - lets duplicate!
} else {
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'duplicate', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$optionsno = array('action'=>'view', 'roleid'=>$roleid);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
notice_yesno(get_string('duplicaterolesure', 'role', $a), 'manage.php', 'manage.php', $optionsyes, $optionsno, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
// duplicate current role
$sourcerole = get_record('role','id',$roleid);
$fullname = $sourcerole->name;
$shortname = $sourcerole->shortname;
$currentfullname = "";
$currentshortname = "";
$counter = 0;
// find a name for the duplicated role
do {
if ($counter) {
$suffixfull = " ".get_string("copyasnoun")." ".$counter;
$suffixshort = "_".$counter;
} else {
$suffixfull = "";
$suffixshort = "";
}
$currentfullname = $fullname.$suffixfull;
// Limit the size of shortname - database column accepts <= 15 chars
$currentshortname = substr($shortname, 0, 15 - strlen($suffixshort)).$suffixshort;
$coursefull = get_record("role","name",addslashes($currentfullname));
$courseshort = get_record("role","shortname",addslashes($currentshortname));
$counter++;
} while ($coursefull || $courseshort);
$description = 'duplicate of '.$fullname;
if ($newrole = create_role($currentfullname, $currentshortname, $description)) {
// dupilcate all the capabilities
role_cap_duplicate($sourcerole, $newrole);
}
redirect('manage.php');
break;
case 'reset':
if (!array_key_exists($roleid, $roles)) {
redirect('manage.php');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
reset_role_capabilities($roleid);
redirect('manage.php?action=view&amp;roleid='.$roleid);
} else {
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'reset', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$optionsno = array('action'=>'view', 'roleid'=>$roleid);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->legacytype = get_legacy_type($roleid);
if (empty($a->legacytype)) {
$warning = get_string('resetrolesurenolegacy', 'role', $a);
} else {
$warning = get_string('resetrolesure', 'role', $a);
}
notice_yesno($warning, 'manage.php', 'manage.php', $optionsyes, $optionsno, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
break;
default:
break;
}
/// print UI now
@@ -252,9 +393,10 @@
$roleid = 0;
if (empty($errors) or empty($newrole)) {
$role = new object();
$role->name='';
$role->shortname='';
$role->description='';
$role->name = '';
$role->shortname = '';
$role->description = '';
$role->legacytype = '';
} else {
$role = stripslashes_safe($newrole);
}
@@ -264,6 +406,7 @@
if(!$role = get_record('role', 'id', $roleid)) {
error('Incorrect role ID!');
}
$role->legacytype = get_legacy_type($role->id);
}
foreach ($roles as $rolex) {
@@ -280,28 +423,38 @@
switch ($action) {
case 'add':
print_heading(get_string('addrole', 'role'));
print_heading_with_help(get_string('addrole', 'role'), 'roles');
break;
case 'view':
print_heading(get_string('viewrole', 'role'));
print_heading_with_help(get_string('viewrole', 'role'), 'roles');
break;
case 'edit':
print_heading(get_string('editrole', 'role'));
print_heading_with_help(get_string('editrole', 'role'), 'roles');
break;
}
echo '<div align="center" class="selector">';
echo '<div class="selector">';
if ($action == 'view') {
echo get_string('selectrole', 'role').': ';
echo '<form style="display:inline;" name="switchrole" action="manage.php" method="get">';
echo '<input type="hidden" name="action" value="view" />';
choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()');
echo '</form>';
echo '<form style="display:inline;" name="editrole" action="manage.php" method="get">';
echo '<input type="hidden" name="roleid" value="'.$roleid.'" />';
echo '<input type="hidden" name="action" value="edit" />';
echo '<input type="submit" value="'.get_string('edit').'" />';
echo '</form>';
popup_form('manage.php?action=view&amp;roleid=', $roleoptions, 'switchrole', $roleid, '', '', '',
false, 'self', get_string('selectrole', 'role'));
echo '<div class="buttons">';
$legacytype = get_legacy_type($roleid);
$options = array();
$options['roleid'] = $roleid;
$options['action'] = 'edit';
print_single_button('manage.php', $options, get_string('edit'));
$options['action'] = 'reset';
if (empty($legacytype)) {
print_single_button('manage.php', $options, get_string('resetrolenolegacy', 'role'));
} else {
print_single_button('manage.php', $options, get_string('resetrole', 'role'));
}
$options['action'] = 'duplicate';
print_single_button('manage.php', $options, get_string('duplicaterole', 'role'));
print_single_button('manage.php', null, get_string('listallroles', 'role'));
echo '</div>';
}
echo '</div>';
@@ -317,6 +470,8 @@
} else {
print_heading_with_help(get_string('roles', 'role'), 'roles');
$table = new object;
$table->tablealign = 'center';
@@ -347,21 +502,25 @@
$row[0] = '<a href="manage.php?roleid='.$role->id.'&amp;action=view">'.format_string($role->name).'</a>';
$row[1] = format_text($role->description, FORMAT_HTML);
$row[2] = s($role->shortname);
$row[3] = '<a title="'.$stredit.'" href="manage.php?action=edit&roleid='.$role->id.'">'.
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.$stredit.'" /></a> ';
$row[3] .= '<a title="'.$strdelete.'" href="manage.php?action=delete&roleid='.$role->id.'&sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
if ($role->sortorder != 0) {
$row[3] .= '<a title="'.$strmoveup.'" href="manage.php?action=moveup&roleid='.$role->id.'&sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" height="11" width="11" border="0" alt="'.$strmoveup.'" /></a> ';
$row[3] = '<a title="'.$stredit.'" href="manage.php?action=edit&amp;roleid='.$role->id.'">'.
'<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" /></a> ';
if (in_array($role->id, $defaultroles)) {
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" class="iconsmall" alt="" /> ';
} else {
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" height="11" width="11" border="0" alt="" /> ';
$row[3] .= '<a title="'.$strdelete.'" href="manage.php?action=delete&amp;roleid='.$role->id.'&amp;sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" /></a> ';
}
if ($role->sortorder != 0) {
$row[3] .= '<a title="'.$strmoveup.'" href="manage.php?action=moveup&amp;roleid='.$role->id.'&amp;sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" alt="'.$strmoveup.'" /></a> ';
} else {
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" class="iconsmall" alt="" /> ';
}
if ($role->sortorder+1 < $rolescount) {
$row[3] .= '<a title="'.$strmovedown.'" href="manage.php?action=movedown&roleid='.$role->id.'&sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" height="11" width="11" border="0" alt="'.$strmovedown.'" /></a> ';
$row[3] .= '<a title="'.$strmovedown.'" href="manage.php?action=movedown&amp;roleid='.$role->id.'&amp;sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" alt="'.$strmovedown.'" /></a> ';
} else {
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" height="11" width="11" border="0" alt="" /> ';
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" class="iconsmall" alt="" /> ';
}
$table->data[] = $row;
@@ -371,7 +530,9 @@
$options = new object();
$options->action = 'add';
echo '<div class="buttons">';
print_single_button('manage.php', $options, get_string('addrole', 'role'), 'get');
echo '</div>';
}
admin_externalpage_print_footer($adminroot);
@@ -414,4 +575,18 @@ function switch_roles($first, $second) {
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);
}
}
?>
+7 -1
View File
@@ -1,7 +1,13 @@
<?php
// this page deals with the 2 tabs for manage.php and grant.php
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'));
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
$toprow = array();
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'),'', true);
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowassign.php', get_string('allowassign', 'role'));
+57 -30
View File
@@ -1,18 +1,27 @@
<form name="overrideform" action="override.php" method="post">
<input type="hidden" name="contextid" value="<?php p($contextid) ?>">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>">
<?php
$strinherit = get_string('inherit','role');
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
?>
<form id="overrideform" action="override.php" method="post">
<fieldset class="invisiblefieldset">
<input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
</fieldset>
<table class="rolecap">
<tr>
<th class="name" align="left"><?php print_string('capability','role') ?></th>
<th class="inherit"><?php print_string('inherit','role') ?></th>
<th class="allow"><?php print_string('allow','role') ?></th>
<th class="prevent"><?php print_string('prevent','role') ?></th>
<th class="prohibit"><?php print_string('prohibit','role') ?></th>
<th class="risk"><?php print_string('risks','role') ?></th>
<th class="name" align="left" scope="col"><?php print_string('capability','role') ?></th>
<th class="inherit" scope="col"><?php p($strinherit); ?></th>
<th class="allow" scope="col"><?php p($strallow); ?></th>
<th class="prevent" scope="col"><?php p($strprevent); ?></th>
<th class="prohibit" scope="col"><?php p($strprohibit); ?></th>
<th class="risk" colspan="5" scope="col"><?php print_string('risks','role') ?></th>
</tr>
<?php
@@ -20,10 +29,19 @@
$contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
foreach ($capabilities as $capability) {
// legacy caps should not be overriden - we must use proper capabilities if needed
if (islegacy($capability->name)) {
continue;
}
// prints a breaker if component or name or context level
if ($capability->component != $component or $capability->contextlevel != $contextlevel) {
echo ('<tr class="rolecapheading header"><td colspan="6" class="header"><strong>'.get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
echo ('<tr class="rolecapheading header"><td colspan="10" class="header"><strong>'.get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
}
// these 2 are used to see to group same mod/core capabilities together
@@ -47,71 +65,80 @@
$isprohibit = 0;
}
$isdisabled = $isprohibit || islegacy($capability->name);
$isdisabled = $isprohibit;
$riskinfo = '';
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">T</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_managetrust.gif" alt="'.get_string('riskmanagetrustshort', 'admin').'" /></a>';
$rowclasses .= ' riskmanagetrust';
}
$riskinfo .= '</td><td class="risk config">';
if (RISK_CONFIG & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">C</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_config.gif" alt="'.get_string('riskconfigshort', 'admin').'" /></a>';
$rowclasses .= ' riskconfig';
}
$riskinfo .= '</td><td class="risk xss">';
if (RISK_XSS & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">X</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_xss.gif" alt="'.get_string('riskxssshort', 'admin').'" /></a>';
$rowclasses .= ' riskxss';
}
$riskinfo .= '</td><td class="risk personal">';
if (RISK_PERSONAL & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">P</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_personal.gif" alt="'.get_string('riskpersonalshort', 'admin').'" /></a>';
$rowclasses .= ' riskpersonal';
}
$riskinfo .= '</td><td class="risk spam">';
if (RISK_SPAM & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">S</a>';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_spam.gif" alt="'.get_string('riskspamshort', 'admin').'" /></a>';
$rowclasses .= ' riskspam';
}
$riskinfo .= '</td>';
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name"><?php echo get_capability_string($capability->name); ?></td>
<td class="name"><span class="cap-desc"><a onclick="this.target='docspopup'" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></span></td>
<td class="inherit">
<input type="radio" name="<?php echo $capability->name; ?>" value="0"
<input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="0"
<?php
if ($localpermission == CAP_INHERIT) {echo 'checked="checked"';}
if ($localpermission == CAP_INHERIT) {echo 'checked="checked" ';}
if ($isdisabled) {echo 'disabled="disabled"';}?> />
</td>
<td class="inherit <?php if ($isallow) {echo ' capcurrent';} ?>">
<input type="radio" name="<?php echo $capability->name; ?>"
<td class="allow <?php if ($isallow) {echo ' capcurrent';} ?>">
<input type="radio" title="<?php p($strallow); ?>" name="<?php echo $capability->name; ?>"
<?php echo ' value="'.CAP_ALLOW.'"';
if ($localpermission == CAP_ALLOW) {echo ' checked="checked"';}
if ($localpermission == CAP_ALLOW) {echo ' checked="checked" ';}
if ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="prevent <?php if ($isprevent) {echo ' capcurrent';} ?>">
<input type="radio" name="<?php echo $capability->name; ?>"
<input type="radio" title="<?php p($strprevent); ?>" name="<?php echo $capability->name; ?>"
<?php echo ' value="'.CAP_PREVENT.'"';
if ($localpermission == CAP_PREVENT) {echo ' checked="checked"';}
if ($localpermission == CAP_PREVENT) {echo ' checked="checked" ';}
if ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="prohibit <?php if ($isprohibit) {echo ' capcurrent';} ?>">
<input type="radio" name="<?php echo $capability->name; ?>"
<input type="radio" title="<?php p($strprohibit); ?>" name="<?php echo $capability->name; ?>"
<?php echo ' value="'.CAP_PROHIBIT.'"';
if ($localpermission == CAP_PROHIBIT) {echo ' checked="checked"';}
if ($localpermission == CAP_PROHIBIT) {echo ' checked="checked" ';}
if ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="risk"><?php echo $riskinfo; ?></td>
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
</table>
<br />
<div align="center">
<div class="submit buttons">
<input type="submit" value="<?php print_string('savechanges') ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
</div>
+55 -29
View File
@@ -2,7 +2,7 @@
require_once('../../config.php');
$contextid = required_param('contextid',PARAM_INT); // context id
$contextid = required_param('contextid', PARAM_INT); // context id
$roleid = optional_param('roleid', 0, PARAM_INT); // requested role id
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tabs
@@ -12,29 +12,34 @@
error('Bad context ID');
}
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID)) {
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM)) {
error('No site ID');
}
if ($context->id == $sitecontext->id) {
error ('Can not override base role capabilities');
error('Can not override base role capabilities');
}
require_capability('moodle/role:override', $context); // Just to make sure
if (!has_capability('moodle/role:override', $context)) {
error('You do not have permission to change overrides in this context!');
}
if ($courseid) {
if (!$course = get_record('course', 'id', $courseid)) {
error('Bad course ID');
}
} else {
$course = $SITE;
$course = clone($SITE);
$courseid = SITEID;
}
require_login($course);
$baseurl = 'override.php?contextid='.$context->id;
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
if (!empty($courseid)) {
if ($courseid != SITEID) {
$baseurl .= '&amp;courseid='.$courseid;
}
@@ -42,6 +47,9 @@
redirect($baseurl);
}
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
/// Get some language strings
@@ -53,6 +61,7 @@
$strparticipants = get_string('participants');
/// Make sure this user can override that role
if ($roleid) {
if (!user_can_override($context, $roleid)) {
error ('you can not override this role in this context');
@@ -64,18 +73,27 @@
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
}
/// get all cababilities
$capabilities = fetch_context_capabilities($context);
/// Process incoming role override
if ($data = data_submitted() and $roleid and confirm_sesskey()) {
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($context); // capabilities applicable in this context
$localoverrides = get_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id",
'', 'capability, permission, id');
foreach ($capabilities as $cap) {
if (!isset($data->{$cap->name})) {
//cap not specified in form
continue;
}
if (islegacy($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
@@ -129,34 +147,36 @@
/// site header
} else {
print_header("$course->fullname: $fullname", "$course->fullname",
print_header("$course->fullname: $fullname", $course->fullname,
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$course->id\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
$showroles = 1;
$currenttab = 'override';
include_once($CFG->dirroot.'/user/tabs.php');
} else if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('frontpageroles', $adminroot);
admin_externalpage_print_header($adminroot);
$currenttab = '';
$tabsmode = 'override';
include_once('tabs.php');
} else {
$currenttab = '';
$tabsmode = 'override';
include_once('tabs.php');
}
$overridableroles = get_overridable_roles($context);
print_heading_with_help(get_string('overrides', 'role'), 'overrides');
if ($roleid) {
/// prints a form to swap roles
echo '<form name="rolesform" action="override.php" method="get">';
echo '<div align="center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
if ($userid) {
echo '<input type="hidden" name="userid" value="'.$userid.'" />';
}
if ($courseid) {
echo '<input type="hidden" name="courseid" value="'.$courseid.'" />';
}
echo '<input type="hidden" name="contextid" value="'.$context->id.'" />'.$strroletooverride.': ';
choose_from_menu ($overridableroles, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='rolesform.submit()');
echo '</div></form>';
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);
echo '</div>';
$parentcontexts = get_parent_contexts($context);
if (!empty($parentcontexts)) {
@@ -173,11 +193,12 @@
$lang = str_replace('_utf8', '', current_language());
// Get the capabilities overrideable in this context
if ($capabilities = fetch_context_capabilities($context)) {
if (!empty($capabilities)) {
// Print the capabilities overrideable in this context
print_simple_box_start('center');
include_once('override.html');
print_simple_box_end();
} else {
notice(get_string('nocapabilitiesincontext', 'role'),
$CFG->wwwroot.'/'.$CFG->admin.'/roles/'.$baseurl);
@@ -188,20 +209,25 @@
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '20%';
$table->head = array(get_string('roles', 'role'), get_string('overrides', 'role'));
$table->wrap = array('nowrap', 'nowrap');
$table->align = array('right', 'center');
$table->width = '60%';
$table->head = array(get_string('roles', 'role'), get_string('description'), get_string('overrides', 'role'));
$table->wrap = array('nowrap', '', 'nowrap');
$table->align = array('right', 'left', 'center');
foreach ($overridableroles as $roleid => $rolename) {
$countusers = 0;
$overridecount = count_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id");
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>', $overridecount);
$description = format_string(get_field('role', 'description', 'id', $roleid));
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>', $description, $overridecount);
}
print_table($table);
}
print_footer($course);
if ($context->contextlevel == CONTEXT_SYSTEM or ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID)) {
admin_externalpage_print_footer($adminroot);
} else {
print_footer($course);
}
?>
+46 -22
View File
@@ -1,6 +1,11 @@
<?php // $Id$
// Handles headers and tabs for the roles control at any level apart from SYSTEM level
// We also assume that $currenttab, $assignableroles and $overridableroles are defined
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
if ($currenttab != 'update') {
switch ($context->contextlevel) {
@@ -27,11 +32,16 @@ if ($currenttab != 'update') {
break;
case CONTEXT_COURSE:
$streditcoursesettings = get_string("editcoursesettings");
if ($context->instanceid != SITEID) {
$streditcoursesettings = get_string("editcoursesettings");
$course = get_record('course', 'id', $context->instanceid);
print_header($streditcoursesettings, "$course->fullname",
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $straction");
$course = get_record('course', 'id', $context->instanceid);
require_login($course);
print_header($streditcoursesettings, $course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $straction");
}
break;
case CONTEXT_GROUP:
@@ -52,6 +62,8 @@ if ($currenttab != 'update') {
error("The required instance of this module doesn't exist");
}
require_login($course);
$strnav = "<a href=\"$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id\">$instance->name</a> ->";
$fullmodulename = get_string("modulename", $module->name);
$streditinga = get_string("editinga", "moodle", $fullmodulename);
@@ -63,10 +75,9 @@ if ($currenttab != 'update') {
$focuscursor = "form.name";
}
$COURSE = $course;
print_header_simple($streditinga, '',
"<a href=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</a> ->
$strnav <a href=\"$CFG->wwwroot/course/mod.php?update=$cm->id&sesskey=".sesskey()."\">$streditinga</a> -> $straction", $focuscursor, "", false);
$strnav <a href=\"$CFG->wwwroot/course/mod.php?update=$cm->id&amp;sesskey=".sesskey()."\">$streditinga</a> -> $straction", $focuscursor, "", false);
break;
@@ -79,6 +90,9 @@ if ($currenttab != 'update') {
switch ($blockinstance->pagetype) {
case 'course-view':
if ($course = get_record('course', 'id', $blockinstance->pageid)) {
require_login($course);
if ($course->id != SITEID) {
$navigation = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
}
@@ -102,7 +116,7 @@ if ($currenttab != 'update') {
break;
default:
error ('This is an unknown context!');
error ('This is an unknown context (' . $context->contextlevel . ') in admin/roles/tabs.php!');
return false;
}
@@ -121,16 +135,8 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
$context->id, get_string('roles'));
if (isset($tabsmode)) {
if (!empty($tabsmode)) {
if (!isset($assignableroles)) {
$assignableroles = get_assignable_roles($context);
}
if (!isset($overridableroles)) {
$overridableroles = get_overridable_roles($context);
}
$inactive[] = 'roles';
if (!empty($assignableroles)) {
$secondrow[] = new tabobject('assign',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id,
@@ -147,14 +153,32 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
true);
}
if ($tabsmode == 'override') {
$currenttab = 'override';
} elseif ($tabsmode == 'assign') {
$currenttab = 'assign';
}
$inactive[] = 'roles';
$activetwo = array('roles');
$currenttab = $tabsmode;
} else {
$inactive[] = '';
$activetwo = array();
}
/// Here other core tabs should go (always calling tabs.php files)
/// All the logic to decide what to show must be self-cointained in the tabs file
/// ej.:
/// include_once($CFG->dirroot . '/grades/tabs.php');
/// Finally, we support adding some 'on-the-fly' tabs here
/// All the logic to decide what to show must be self-cointained in the tabs file
if (isset($CFG->extratabs) && !empty($CFG->extratabs)) {
if ($extratabs = explode(',', $CFG->extratabs)) {
asort($extratabs);
foreach($extratabs as $extratab) {
/// Each extra tab mus be one $CFG->dirroot relative file
if (file_exists($CFG->dirroot . '/' . $extratab)) {
include_once($CFG->dirroot . '/' . $extratab);
}
}
}
}
if (!empty($secondrow)) {
@@ -163,7 +187,7 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
$tabs = array($toprow);
}
print_tabs($tabs, $currenttab, $inactive);
print_tabs($tabs, $currenttab, $inactive, $activetwo);
}
?>
+31 -16
View File
@@ -13,47 +13,56 @@ admin_externalpage_setup('search', $adminroot); // now hidden page
$CFG->adminsearchquery = $query; // So we can reference it in search boxes later in this invocation
$resultshtml = search_settings_html(admin_get_root(), $query);
// now we'll deal with the case that the admin has submitted the form with changed settings
$statusmsg = '';
if ($data = data_submitted()) {
$data = (array)$data;
$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($data['s_' . $changedsetting->name])) {
$errors .= $changedsetting->write_setting($data['s_' . $changedsetting->name]);
} else {
$errors .= $changedsetting->write_setting($changedsetting->defaultsetting);
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)) {
// there must be either redirect without message or continue button or else upgrade would be sometimes broken
redirect($CFG->wwwroot . '/' . $CFG->admin . '/search.php?query=' . $query);
die;
$statusmsg = get_string('changessaved');
} else {
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors);
die;
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
die;
}
// now update $SITE - it might have been changed
$SITE = get_record('course', 'id', $SITE->id);
$COURSE = clone($SITE);
}
// and finally, if we get here, then there are matching settings and we have to print a form
// to modify them
admin_externalpage_print_header($adminroot);
// print_simple_box(get_string('upgradesettingsintro','admin'),'','100%','',5,'generalbox','');
if ($statusmsg != '') {
notify ($statusmsg);
}
echo '<form action="search.php" method="post" name="adminsettings" id="adminsettings">';
$resultshtml = search_settings_html(admin_get_root(), $query);
echo '<form action="search.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<input type="hidden" name="query" value="' . s($query) . '" />';
echo '</div>';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
if ($resultshtml != '') {
@@ -62,6 +71,7 @@ if ($resultshtml != '') {
} else {
echo get_string('noresults','admin');
}
echo '</fieldset>';
echo '</form>';
admin_externalpage_print_footer($adminroot);
@@ -104,6 +114,11 @@ function search_settings(&$node, $query) {
function search_settings_html(&$node, $query) {
global $CFG;
if ($query == ''){
return '';
}
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
+95 -25
View File
@@ -49,12 +49,17 @@ if (!($root->check_access())) {
$CFG->pagepath = 'admin/setting/'.$section;
// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
/// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
$statusmsg = '';
if ($data = data_submitted()) {
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$errors = $root->write_settings((array)$data);
$unslashed = (array)stripslashes_recursive($data);
$errors = $root->write_settings($unslashed);
//force logout if dbsession setting changes
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
@@ -66,21 +71,47 @@ if ($data = data_submitted()) {
case 'admin':
redirect("$CFG->wwwroot/$CFG->admin/");
default:
// following redirect should display confirmation message because it redirects
// to the same page, user might not know if save button worked
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=" . $PAGE->section, get_string('changessaved'),2);
$statusmsg = get_string('changessaved');
}
} else {
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors);
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
die;
}
// 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();
print_simple_box(get_string('configintrosite', 'admin'), 'center', '50%');
if ($statusmsg != '') {
notify ($statusmsg);
}
// ---------------------------------------------------------------------------------------------------------------
echo '<form action="settings.php" method="post" id="adminsettings">';
echo '<div class="settingsform">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
print_heading($root->visiblename);
echo $root->output_html();
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
echo '</div>';
echo '</form>';
}
if (!empty($SITE->fullname)) {
$pageblocks = blocks_setup($PAGE);
@@ -90,38 +121,77 @@ if (!empty($SITE->fullname)) {
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
// print header stuff
$PAGE->print_header();
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->roundcorners)) {
echo '<div class="bt"><div></div></div>';
echo '<div class="i1"><div class="i2"><div class="i3">';
}
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
if (!empty($THEME->roundcorners)) {
echo '</div></div></div>';
echo '<div class="bb"><div></div></div>';
}
echo '</td>';
break;
case 'middle':
echo '<td id="middle-column">';
} else {
if (!empty($THEME->roundcorners)) {
echo '<div class="bt"><div></div></div>';
echo '<div class="i1"><div class="i2"><div class="i3">';
}
echo '<a name="startofcontent"></a>';
print_header();
print_simple_box(get_string('configintrosite', 'admin'), 'center', '50%');
if ($statusmsg != '') {
notify ($statusmsg);
}
}
// ---------------------------------------------------------------------------------------------------------------
echo '<form action="settings.php" method="post" name="adminsettings" id="adminsettings">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
print_heading($root->visiblename);
echo '<form action="settings.php" method="post" id="adminsettings">';
echo '<div class="settingsform">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
print_heading($root->visiblename);
echo $root->output_html();
echo $root->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 '</form>';
echo '</div>';
echo '</form>';
if (!empty($SITE->fullname)) {
if (!empty($THEME->roundcorners)) {
echo '</div></div></div>';
echo '<div class="bb"><div></div></div>';
}
echo '</td>';
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
echo '</td></tr></table>';
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->roundcorners)) {
echo '<div class="bt"><div></div></div>';
echo '<div class="i1"><div class="i2"><div class="i3">';
}
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
if (!empty($THEME->roundcorners)) {
echo '</div></div></div>';
echo '<div class="bb"><div></div></div>';
}
echo '</td>';
}
break;
}
}
echo '</tr></table>';
}
if (!empty($CFG->adminusehtmleditor)) {
+17 -26
View File
@@ -10,39 +10,20 @@ $temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allow
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('tabselectedtofronttext', 'admin'), get_string('tabselectedtofront', 'admin'), 0));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
// "frontpage" settingpage
$temp = new admin_settingpage('frontpage', get_string('frontpage','admin'));
$temp->add(new admin_setting_sitesettext('fullname', get_string('fullsitename'), '', '', PARAM_NOTAGS));
$temp->add(new admin_setting_sitesettext('shortname', get_string('shortsitename'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_special_frontpagedesc());
$temp->add(new admin_setting_courselist_frontpage(false)); // non-loggedin version of the setting (that's what the parameter is for :) )
$temp->add(new admin_setting_courselist_frontpage(true)); // loggedin version of the setting
$temp->add(new admin_setting_sitesetcheckbox('numsections', get_string('sitesection'),
get_string('sitesectionhelp','admin'), 1));
$temp->add(new admin_setting_sitesetselect('newsitems', get_string('newsitemsnumber'),
'', 3,
array('0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
'7' => '7',
'8' => '8',
'9' => '9',
'10' => '10')));
$temp->add(new admin_setting_configtext('coursesperpage', get_string('coursesperpage', 'admin'), get_string('configcoursesperpage', 'admin'), 20, PARAM_INT));
$ADMIN->add('appearance', $temp);
# for CALENDAR_TF_12 and CALENDAR_TF_24 ...
require_once($CFG->dirroot . '/calendar/lib.php');
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
$temp->add(new admin_setting_configselect('calendar_site_timeformat', get_string('pref_timeformat', 'calendar'), get_string('explain_site_timeformat', 'calendar'), '0',
array( 0 => get_string('default', 'calendar'),
CALENDAR_TF_12 => get_string('timeformat_12', 'calendar'),
CALENDAR_TF_24 => get_string('timeformat_24', 'calendar')
)));
$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
array(
0 => get_string('sunday', 'calendar'),
@@ -118,6 +99,16 @@ $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"));
?>
+45
View File
@@ -0,0 +1,45 @@
<?php // $Id$
// This file defines everything related to frontpage
if (get_site()) { //do not use during installation
$frontpagecontext = get_context_instance(CONTEXT_COURSE, SITEID);
$frontpagecontextid = $frontpagecontext->id;
} else {
$frontpagecontext = NULL;
$frontpagecontextid = 0;
}
// "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'), '', ''));
$temp->add(new admin_setting_sitesettext('shortname', get_string('shortsitename'), '', ''));
$temp->add(new admin_setting_special_frontpagedesc());
$temp->add(new admin_setting_courselist_frontpage(false)); // non-loggedin version of the setting (that's what the parameter is for :) )
$temp->add(new admin_setting_courselist_frontpage(true)); // loggedin version of the setting
$temp->add(new admin_setting_sitesetcheckbox('numsections', get_string('sitesection'), get_string('sitesectionhelp','admin'), 1));
$temp->add(new admin_setting_sitesetselect('newsitems', get_string('newsitemsnumber'), '', 3,
array('0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
'7' => '7',
'8' => '8',
'9' => '9',
'10' => '10')));
$temp->add(new admin_setting_configtext('coursesperpage', get_string('coursesperpage', 'admin'), get_string('configcoursesperpage', 'admin'), 20, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('allowvisiblecoursesinhiddencategories', get_string('allowvisiblecoursesinhiddencategories', 'admin'), get_string('configvisiblecourses', 'admin'), 0));
$ADMIN->add('frontpage', $temp);
$ADMIN->add('frontpage', new admin_externalpage('frontpageroles', get_string('frontpageroles', 'admin'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $frontpagecontextid, 'moodle/role:assign', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('frontpagebackup', get_string('frontpagebackup', 'admin'), $CFG->wwwroot.'/backup/backup.php?id='.SITEID, 'moodle/site:backup', false, $frontpagecontext));
$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));
$ADMIN->add('frontpage', new admin_externalpage('sitefiles', get_string('sitefiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID, 'moodle/course:managefiles', false, $frontpagecontext));
?>
+6 -3
View File
@@ -6,13 +6,16 @@
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_configtext('langlist', get_string('langlist', 'admin'), get_string('configlanglist', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
// new CFG variable for excel encoding
$temp->add(new admin_setting_configselect('latinexcelexport', get_string('latinexcelexport', 'admin'), get_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
$ADMIN->add('language', $temp);
$ADMIN->add('language', new admin_externalpage('langedit', get_string('langedit', 'admin'), "$CFG->wwwroot/$CFG->admin/lang.php"));
$ADMIN->add('language', new admin_externalpage('langimport', get_string('langpacks', 'admin'), "$CFG->wwwroot/$CFG->admin/langimport.php"));
+11 -1
View File
@@ -1,12 +1,22 @@
<?php // $Id$
// * Miscellaneous settings (still to be sorted)
// * Miscellaneous settings
// Experimental settings page
$temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('smartpix', get_string('smartpix', 'admin'), get_string('configsmartpix', 'admin'), 0));
$ADMIN->add('misc', $temp);
// XMLDB editor
$ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "$CFG->wwwroot/$CFG->admin/xmldb/"));
// hidden scripts linked from elsewhere
$ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot.'/'.$CFG->admin.'/oacleanup.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot.'/'.$CFG->admin.'/upgradeforumread.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradelogs', 'Upgrade logs', $CFG->wwwroot.'/'.$CFG->admin.'/upgradelogs.php', 'moodle/site:config', true));
$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)));
?>
+21
View File
@@ -0,0 +1,21 @@
<?php // $Id$
// 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',
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('mnetpeers', 'mnet'),
$CFG->wwwroot . '/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',
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol', 'mnet'),
$CFG->wwwroot . '/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',
'moodle/site:config'));
?>
+7 -5
View File
@@ -6,7 +6,7 @@
$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'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$temp->add(new admin_setting_configtext('maxbytes', get_string('maxbytes', 'admin'), get_string('configmaxbytes', 'admin'), 0, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('messaging', get_string('messaging', 'admin'), get_string('configmessaging','admin'), 1));
@@ -25,7 +25,7 @@ $temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnam
'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_URL));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
4 => get_string('siteblogs','blog'),
3 => get_string('courseblogs','blog'),
@@ -33,6 +33,9 @@ $temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', '
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('cronclionly', get_string('cronclionly', 'admin'), get_string('configcronclionly', 'admin'), 0));
$temp->add(new admin_setting_configtext('cronremotepassword', get_string('cronremotepassword', 'admin'), get_string('configcronremotepassword', 'admin'), '', PARAM_RAW));
$ADMIN->add('security', $temp);
@@ -41,7 +44,6 @@ $ADMIN->add('security', $temp);
// "httpsecurity" settingpage
$temp = new admin_settingpage('httpsecurity', get_string('httpsecurity', 'admin'));
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('secureforms', get_string('secureforms', 'admin'), get_string('configsecureforms', 'admin'), 0));
$ADMIN->add('security', $temp);
@@ -87,8 +89,8 @@ $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_PATH));
$temp->add(new admin_setting_configtext('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), '', PARAM_PATH));
$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);
+38 -15
View File
@@ -7,10 +7,10 @@ $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_PATH));
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), '', PARAM_RAW)); // TODO: add path validation
$ADMIN->add('server', $temp, 0);
@@ -47,15 +47,13 @@ $temp->add(new admin_setting_configselect('digestmailtime', get_string('digestma
'21' => '21',
'22' => '22',
'23' => '23')));
if (!empty($CFG->unicodedb)) { // These options are only available if running under unicodedb
unset($options);
unset($charsets);
$charsets = get_list_of_charsets();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '', $options));
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', get_string('allowusermailcharset', 'admin'), get_string('configallowusermailcharset', 'admin'), 0));
}
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']); // not needed here
$options = array();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '', $options));
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', get_string('allowusermailcharset', 'admin'), get_string('configallowusermailcharset', 'admin'), 0));
$ADMIN->add('server', $temp, 100);
@@ -87,6 +85,8 @@ $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('debugsmtp', get_string('debugsmtp', 'admin'), get_string('configdebugsmtp', 'admin'), 0));
$temp->add(new admin_setting_special_perfdebug());
$ADMIN->add('server', $temp);
@@ -127,8 +127,6 @@ $temp->add(new admin_setting_configtext('proxyhost', get_string('proxyhost', 'ad
$temp->add(new admin_setting_configtext('proxyport', get_string('proxyport', 'admin'), get_string('configproxyport', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('sitefiles', get_string('sitefiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID));
$ADMIN->add('server', new admin_externalpage('maintenancemode', get_string('sitemaintenancemode', 'admin'), "$CFG->wwwroot/$CFG->admin/maintenance.php"));
@@ -175,6 +173,31 @@ $ADMIN->add('server', new admin_externalpage('environment', get_string('environm
$ADMIN->add('server', new admin_externalpage('phpinfo', get_string('phpinfo'), "$CFG->wwwroot/$CFG->admin/phpinfo.php"));
// "performance" settingpage
$temp = new admin_settingpage('performance', get_string('performance', 'admin'));
$temp->add(new admin_setting_configselect('cachetype', get_string('cachetype', 'admin'),
get_string('configcachetype', 'admin'), false,
array( '' => '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'), false,
array( '0' => 'false',
'1' => 'true')));
$temp->add(new admin_setting_configtext('rcachettl', get_string('rcachettl', 'admin'),
get_string('configrcachettl', 'admin'), 10));
$temp->add(new admin_setting_configtext('intcachemax', get_string('intcachemax', 'admin'),
get_string('configintcachemax', 'admin'), 10));
$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'), false,
array( '0' => 'false',
'1' => 'true')));
$ADMIN->add('server', $temp);
if (file_exists("$CFG->dirroot/$CFG->admin/mysql/frame.php")) {
$ADMIN->add('server', new admin_externalpage('database', get_string('managedatabase'), "$CFG->wwwroot/$CFG->admin/mysql/frame.php"));
}
+8 -1
View File
@@ -25,10 +25,17 @@ $ADMIN->add('modules', new admin_externalpage('managefilters', get_string('manag
$ADMIN->add('root', new admin_category('security', get_string('security','admin')));
$ADMIN->add('root', new admin_category('appearance', get_string('appearance','admin')));
$ADMIN->add('root', new admin_category('frontpage', get_string('frontpage','admin')));
$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('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;
}
/// End of removable snippet
$ADMIN->add('reports', new admin_externalpage('report'.$plugin, get_string($plugin, 'admin'), "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php"));
}
+43 -7
View File
@@ -6,23 +6,30 @@
$ADMIN->add('users', new admin_externalpage('userauthentication', get_string('authentication','admin'), "$CFG->wwwroot/$CFG->admin/auth.php"));
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('addnewuser', get_string('addnewuser'), "$CFG->wwwroot/$CFG->admin/user.php?newuser=true", 'moodle/user:create'));
$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'));
// 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"));
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . SITEID));
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
// "userpolicies" settingpage
$temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
$context = get_context_instance(CONTEXT_SYSTEM);
if (!$guestrole = get_guest_role()) {
$guestrole->id = 0;
}
@@ -31,16 +38,45 @@ if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW
} else {
$studentrole->id = 0;
}
$assignableroles = get_assignable_roles($context);
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);
}
}
// 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));
}
}
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
get_string('confignotloggedinroleid', 'admin'), $guestrole->id, $assignableroles ));
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'), $guestrole->id, $assignableroles));
get_string('configdefaultuserroleid', 'admin'), $userrole->id, $allroles));
$temp->add(new admin_setting_configselect('defaultcourseroleid', get_string('defaultcourseroleid', 'admin'),
get_string('configdefaultcourseroleid', 'admin'), $studentrole->id, $assignableroles));
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));
$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(),
+4 -7
View File
@@ -63,14 +63,11 @@
}
print_simple_box_start('center');
print_box_start();
print_heading($strheading);
echo '<form method="post" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php">'
.'<p align="center">'.get_string('stickyblockspagetype','admin').': ';
choose_from_menu($options,'pt',$pt,'choose','this.form.submit();');
echo '</p></form>';
echo get_string('stickyblocksduplicatenotice','admin');
print_simple_box_end();
popup_form("$CFG->wwwroot/$CFG->admin/stickyblocks.php?pt=", $options, 'selecttype', $pt, 'choose', '', '', false, 'self', get_string('stickyblockspagetype','admin').': ');
echo '<p>'.get_string('stickyblocksduplicatenotice','admin').'</p>';
print_box_end();
if (!empty($pt)) {
+2 -2
View File
@@ -33,8 +33,8 @@
echo '<center><form action="timezone.php" method="get">';
echo "$strusers ($strall): ";
choose_from_menu ($timezones, "zone", 99, get_string("serverlocaltime"), "", "99");
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\">";
echo "<input type=\"submit\" value=\"$strsavechanges\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
echo "<input type=\"submit\" value=\"$strsavechanges\" />";
echo "</form></center>";
print_footer();
+3 -4
View File
@@ -15,7 +15,6 @@
/// Print headings
$strcalendarsettings = get_string('calendarsettings', 'admin');
$strimporttimezones = get_string('importtimezones', 'admin');
admin_externalpage_print_header($adminroot);
@@ -23,16 +22,16 @@
print_heading($strimporttimezones);
if (!$ok or !confirm_sesskey()) {
$message = '<p>';
$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 .= '</p>';
$message .= '<br />';
$message = get_string("configintrotimezones", 'admin', $message);
notice_yesno($message, 'timezoneimport.php?ok=1&sesskey='.sesskey(), 'index.php');
notice_yesno($message, 'timezoneimport.php?ok=1&amp;sesskey='.sesskey(), 'index.php');
admin_externalpage_print_footer($adminroot);
exit;
+1 -5
View File
@@ -52,11 +52,7 @@
$starttime = time();
$sleeptime = 0;
if ($CFG->dbtype == "mysql") {
$LIKE = "LIKE";
} else {
$LIKE = "ILIKE";
}
$LIKE = sql_ilike();
if ($cmcount > 10) {
print_simple_box('This process may take a very long time ... please be patient and let it finish.',
+5 -4
View File
@@ -24,14 +24,14 @@ if ($newsettingshtml == '') {
// now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted()) {
$data = (array)$data;
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$newsettings = find_new_settings(admin_get_root());
$errors = '';
foreach($newsettings as $newsetting) {
if (isset($data['s_' . $newsetting->name])) {
$errors .= $newsetting->write_setting($data['s_' . $newsetting->name]);
if (isset($unslashed['s_' . $newsetting->name])) {
$errors .= $newsetting->write_setting($unslashed['s_' . $newsetting->name]);
} else {
$errors .= $newsetting->write_setting($newsetting->defaultsetting);
}
@@ -58,11 +58,12 @@ admin_externalpage_print_header($adminroot);
print_simple_box(get_string('upgradesettingsintro','admin'),'','100%','',5,'generalbox','');
echo '<form action="upgradesettings.php" method="post" name="adminsettings" id="adminsettings">';
echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
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 '</form>';
+23 -26
View File
@@ -62,13 +62,16 @@ if ($um->preprocess_files() && confirm_sesskey()) {
// that we'll take longer, and that the process should be recycled soon
// to free up memory.
@set_time_limit(0);
@raise_memory_limit("128M");
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
@apache_child_terminate();
}
//Fix mac/dos newlines
$text = my_file_get_contents($filename);
//trim utf-8 bom
$textlib = new textlib();
$text = $textlib->trim_utf8_bom($text);
//Fix mac/dos newlines
$text = preg_replace('!\r\n?!',"\n",$text);
$fp = fopen($filename, "w");
fwrite($fp,$text);
@@ -82,7 +85,8 @@ if ($um->preprocess_files() && confirm_sesskey()) {
"firstname" => 1,
"lastname" => 1,
"email" => 1);
$optionalDefaults = array("institution" => 1,
$optionalDefaults = array("mnethostid" => 1,
"institution" => 1,
"department" => 1,
"city" => 1,
"country" => 1,
@@ -130,10 +134,10 @@ if ($um->preprocess_files() && confirm_sesskey()) {
// check for valid field names
foreach ($header as $i => $h) {
$h = trim($h); $header[$i] = $h; // remove whitespace
if (!($required[$h] or $optionalDefaults[$h] or $optional[$h])) {
if (!(isset($required[$h]) or isset($optionalDefaults[$h]) or isset($optional[$h]))) {
error(get_string('invalidfieldname', 'error', $h), 'uploaduser.php?sesskey='.$USER->sesskey);
}
if ($required[$h]) {
if (isset($required[$h])) {
$required[$h] = 0;
}
}
@@ -172,7 +176,7 @@ if ($um->preprocess_files() && confirm_sesskey()) {
// add fields to object $user
foreach ($record as $name => $value) {
// check for required values
if ($required[$name] and !$value) {
if (isset($required[$name]) and !$value) {
error(get_string('missingfield', 'error', $name). " ".
get_string('erroronline', 'error', $linenum) .". ".
get_string('processingstops', 'error'),
@@ -226,17 +230,11 @@ if ($um->preprocess_files() && confirm_sesskey()) {
}
}
if ($user->username === 'changeme') {
notify(get_string('invaliduserchangeme', 'admin'));
$userserrors++;
continue;
}
// before insert/update, check whether we should be updating
// an old record instead
if ($allowrenames && !empty($user->oldusername) ) {
$user->oldusername = moodle_strtolower($user->oldusername);
if ($olduser = get_record('user','username',$user->oldusername)) {
if ($olduser = get_record('user', 'username', $user->oldusername, 'mnethostid', $user->mnethostid)) {
if (set_field('user', 'username', $user->username, 'username', $user->oldusername)) {
notify(get_string('userrenamed', 'admin') . " : $user->oldusername $user->username");
$renames++;
@@ -252,7 +250,7 @@ if ($um->preprocess_files() && confirm_sesskey()) {
}
}
if ($olduser = get_record("user","username",$username)) {
if ($olduser = get_record("user", "username", $username, "mnethostid", $user->mnethostid)) {
if ($updateaccounts) {
// Record is being updated
$user->id = $olduser->id;
@@ -270,7 +268,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
//This can be used to obtain a list of userids for existing users
notify("$olduser->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
} else { // new user
@@ -304,8 +301,8 @@ if ($um->preprocess_files() && confirm_sesskey()) {
if (!$course[$i]) {
notify(get_string('coursegroupunknown','error',$addgroup[$i]));
} else {
if ($group = get_record("groups","courseid",$course[$i]->id,"name",$addgroup[$i])) {
$groupid[$i] = $group->id;
if ($gid = groups_get_group_by_name($course[$i]->id, $addgroup[$i])) {
$groupid[$i] = $gid;
} else {
notify(get_string('groupunknown','error',$addgroup[$i]));
}
@@ -379,13 +376,13 @@ print_heading_with_help($struploadusers, 'uploadusers');
$noyesoptions = array( get_string('no'), get_string('yes') );
$maxuploadsize = get_max_upload_file_size();
echo '<center>';
echo '<form method="post" enctype="multipart/form-data" action="uploaduser.php">'.
$strfile.'&nbsp;<input type="hidden" name="MAX_FILE_SIZE" value="'.$maxuploadsize.'">'.
'<input type="hidden" name="sesskey" value="'.$USER->sesskey.'">'.
'<input type="file" name="userfile" size="30">';
echo '<div style="text-align:center">';
echo '<form method="post" enctype="multipart/form-data" action="uploaduser.php"><div>'.
$strfile.'&nbsp;<input type="hidden" name="MAX_FILE_SIZE" value="'.$maxuploadsize.'" />'.
'<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />'.
'<input type="file" name="userfile" size="30" />';
print_heading(get_string('settings'));
echo '<table>';
echo '<table style="margin-left:auto;margin-right:auto">';
echo '<tr><td>' . get_string('passwordhandling', 'auth') . '</td><td>';
$passwordopts = array( 0 => get_string('infilefield', 'auth'),
1 => get_string('createpasswordifneeded', 'auth'),
@@ -401,9 +398,9 @@ echo '<tr><td>' . get_string('allowrenames', 'admin') . '</td><td>';
choose_from_menu($noyesoptions, 'allowrenames', $allowrenames);
echo '</td></tr>';
echo '</table><br />';
echo '<input type="submit" value="'.$struploadusers.'">';
echo '</form><br />';
echo '</center>';
echo '<input type="submit" value="'.$struploadusers.'" />';
echo '</div></form><br />';
echo '</div>';
admin_externalpage_print_footer($adminroot);
+384 -350
View File
@@ -3,7 +3,6 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$newuser = optional_param('newuser', 0, PARAM_BOOL);
$delete = optional_param('delete', 0, PARAM_INT);
$confirm = optional_param('confirm', '', PARAM_ALPHANUM); //md5 confirmation hash
$confirmuser = optional_param('confirmuser', 0, PARAM_INT);
@@ -14,380 +13,415 @@
$search = trim(optional_param('search', '', PARAM_RAW));
$lastinitial = optional_param('lastinitial', '', PARAM_CLEAN); // only show students with this last initial
$firstinitial = optional_param('firstinitial', '', PARAM_CLEAN); // only show students with this first initial
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID)) { // Should never happen
redirect('index.php');
}
if (!$CFG->rolesactive) { // No admin user yet.
$user = new object();
$user->firstname = get_string('admin');
$user->lastname = get_string('user');
$user->username = 'admin';
$user->password = hash_internal_user_password('admin');
$user->email = 'root@localhost';
$user->confirmed = 1;
$user->lang = $CFG->lang;
$user->maildisplay = 1;
$user->timemodified = time();
if (! $user->id = insert_record('user', $user)) {
error("SERIOUS ERROR: Could not create admin user record !!!");
}
if (! $user = get_record('user', 'id', $user->id)) { // Double check.
error("User ID was incorrect (can't find it)");
}
// Assign the default admin role to the new user.
if (!$adminroles = get_roles_with_capability('moodle/legacy:admin', CAP_ALLOW)) {
error('No admin role could be found');
}
foreach ($adminroles as $adminrole) {
role_assign($adminrole->id, $user->id, 0, $sitecontext->id);
}
set_config('rolesactive', 1);
if (! $site = get_site()) {
error("Could not find site-level course");
}
// Log the user in.
$USER = $user;
$USER->loggedin = true;
$USER->sessionIP = md5(getremoteaddr()); // Store the current IP in the session
$USER->site = $CFG->wwwroot;
$USER->admin = true;
$USER->newadminuser = true;
sesskey(); // For added security, used to check script parameters
load_user_capability();
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id"); // Edit thyself
exit;
} else {
if (! $site = get_site()) {
error("Could not find site-level course");
}
}
require_login();
$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)
$adminroot = admin_get_root();
admin_externalpage_setup('editusers', $adminroot);
if ($newuser) {
admin_externalpage_setup('addnewuser', $adminroot);
// 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 {
admin_externalpage_setup('editusers', $adminroot);
$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);
$site = get_site();
if ($newuser) { // Create a new user
if (!has_capability('moodle/user:update', $sitecontext) and !has_capability('moodle/user:delete', $sitecontext)) {
error('You do not have the required permission to edit/delete users.');
}
if (!has_capability('moodle/user:create', $sitecontext)) {
error('You do not have the required permission to create new users.');
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strdeletecheck = get_string('deletecheck');
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
admin_externalpage_print_header($adminroot);
if ($confirmuser and confirm_sesskey()) {
if (!$user = get_record('user', 'id', $confirmuser)) {
error("No such user!", '', true);
}
if (!$user = get_record('user', 'username', 'changeme')) { // half finished user from another time
$auth = get_auth_plugin($user->auth);
$user = new object();
$user->auth = 'manual';
$user->firstname = '';
$user->lastname = '';
$user->username = 'changeme';
$user->password = '';
$user->email = '';
$user->lang = $CFG->lang;
$user->confirmed = 1;
$user->timemodified = time();
$result = $auth->user_confirm(addslashes($user->username), addslashes($user->secret));
if (! $user->id = insert_record('user', $user)) {
error('Could not start a new user!');
}
}
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
} else { // List all users for editing
if (!has_capability('moodle/user:update', $sitecontext) and !has_capability('moodle/user:delete', $sitecontext)) {
error('You do not have the required permission to edit/delete users.');
}
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strdeletecheck = get_string('deletecheck');
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');
admin_externalpage_print_header($adminroot);
if ($confirmuser and confirm_sesskey()) {
if (!$user = get_record('user', 'id', $confirmuser)) {
error("No such user!");
}
$confirmeduser = new object();
$confirmeduser->id = $confirmuser;
$confirmeduser->confirmed = 1;
$confirmeduser->timemodified = time();
if (update_record('user', $confirmeduser)) {
notify(get_string('userconfirmed', '', fullname($user, true)) );
} else {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
} else if ($delete and confirm_sesskey()) { // Delete a selected user, after confirmation
if (!has_capability('moodle/user:delete', $sitecontext)) {
error('You do not have the required permission to delete a user.');
}
if (!$user = get_record('user', 'id', $delete)) {
error("No such user!");
}
$primaryadmin = get_admin();
if ($user->id == $primaryadmin->id) {
error("You are not allowed to delete the primary admin user!");
}
if ($confirm != md5($delete)) {
$fullname = fullname($user, true);
print_heading(get_string('deleteuser', 'admin'));
$optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey());
notice_yesno(get_string('deletecheckfull', '', "'$fullname'"), 'user.php', 'user.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
} else if (data_submitted() and !$user->deleted) {
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = 1;
$updateuser->username = "$user->email.".time(); // Remember it just in case
$updateuser->email = ''; // Clear this field to free it up
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record('user', $updateuser)) {
// not sure if this is needed. unenrol_student($user->id); // From all courses
delete_records('role_assignments', 'userid', $user->id); // unassign all roles
// remove all context assigned on this user?
notify(get_string('deletedactivity', '', fullname($user, true)) );
} else {
notify(get_string('deletednot', '', fullname($user, true)));
}
}
}
// Carry on with the user listing
$columns = array("firstname", "lastname", "email", "city", "country", "lastaccess");
foreach ($columns as $column) {
$string[$column] = get_string("$column");
if ($sort != $column) {
$columnicon = "";
if ($column == "lastaccess") {
$columndir = "DESC";
} else {
$columndir = "ASC";
}
} else {
$columndir = $dir == "ASC" ? "DESC":"ASC";
if ($column == "lastaccess") {
$columnicon = $dir == "ASC" ? "up":"down";
} else {
$columnicon = $dir == "ASC" ? "down":"up";
}
$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";
}
if ($sort == "name") {
$sort = "firstname";
}
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial);
$usercount = get_users(false);
$usersearchcount = get_users(false, $search, true, "", "", $firstinitial, $lastinitial);
if ($search or $firstinitial or $lastinitial) {
print_heading("$usersearchcount / $usercount ".get_string('users'));
$usercount = $usersearchcount;
if ($result == AUTH_CONFIRM_OK or $result == AUTH_CONFIRM_ALREADY) {
notify(get_string('userconfirmed', '', fullname($user, true)) );
} else {
print_heading("$usercount ".get_string('users'));
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
$alphabet = explode(',', get_string('alphabet'));
$strall = get_string('all');
} else if ($delete and confirm_sesskey()) { // Delete a selected user, after confirmation
if (!has_capability('moodle/user:delete', $sitecontext)) {
error('You do not have the required permission to delete a user.');
}
if (!$user = get_record('user', 'id', $delete)) {
error("No such user!", '', true);
}
$primaryadmin = get_admin();
if ($user->id == $primaryadmin->id) {
error("You are not allowed to delete the primary admin user!", '', true);
}
if ($confirm != md5($delete)) {
$fullname = fullname($user, true);
print_heading(get_string('deleteuser', 'admin'));
$optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey());
notice_yesno(get_string('deletecheckfull', '', "'$fullname'"), 'user.php', 'user.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
} else if (data_submitted() and !$user->deleted) {
//following code is also used in auth sync scripts
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = 1;
$updateuser->username = addslashes("$user->email.".time()); // Remember it just in case
$updateuser->email = ''; // Clear this field to free it up
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record('user', $updateuser)) {
// not sure if this is needed. unenrol_student($user->id); // From all courses
delete_records('role_assignments', 'userid', $user->id); // unassign all roles
// remove all context assigned on this user?
notify(get_string('deletedactivity', '', fullname($user, true)) );
} else {
notify(get_string('deletednot', '', fullname($user, true)));
}
}
} else if ($acl and confirm_sesskey()) {
if (!has_capability('moodle/user:delete', $sitecontext)) {
// TODO: this should be under a separate capability
error('You are not permitted to modify the MNET access control list.');
}
if (!$user = get_record('user', 'id', $acl)) {
error("No such user.", '', true);
}
if (!is_mnet_remote_user($user)) {
error('Users in the MNET access control list must be remote MNET users.');
}
$accessctrl = strtolower(required_param('accessctrl', PARAM_ALPHA));
if ($accessctrl != 'allow' and $accessctrl != 'deny') {
error('Invalid access parameter.');
}
$aclrecord = get_record('mnet_sso_access_control', 'username', $user->username, 'mnet_host_id', $user->mnethostid);
if (empty($aclrecord)) {
$aclrecord = new object();
$aclrecord->mnet_host_id = $user->mnethostid;
$aclrecord->username = $user->username;
$aclrecord->accessctrl = $accessctrl;
if (!insert_record('mnet_sso_access_control', $aclrecord)) {
error("Database error - Couldn't modify the MNET access control list.", '', true);
}
} else {
$aclrecord->accessctrl = $accessctrl;
if (!update_record('mnet_sso_access_control', $aclrecord)) {
error("Database error - Couldn't modify the MNET access control list.", '', true);
}
}
$mnethosts = get_records('mnet_host', '', '', 'id', 'id,wwwroot,name');
notify("MNET access control list updated: username '$user->username' from host '"
. $mnethosts[$user->mnethostid]->name
. "' access now set to '$accessctrl'.");
}
// Carry on with the user listing
$columns = array("firstname", "lastname", "email", "city", "country", "lastaccess");
foreach ($columns as $column) {
$string[$column] = get_string("$column");
if ($sort != $column) {
$columnicon = "";
if ($column == "lastaccess") {
$columndir = "DESC";
} else {
$columndir = "ASC";
}
} else {
$columndir = $dir == "ASC" ? "DESC":"ASC";
if ($column == "lastaccess") {
$columnicon = $dir == "ASC" ? "up":"down";
} else {
$columnicon = $dir == "ASC" ? "down":"up";
}
$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";
}
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) {
print_heading("$usersearchcount / $usercount ".get_string('users'));
$usercount = $usersearchcount;
} else {
print_heading("$usercount ".get_string('users'));
}
$alphabet = explode(',', get_string('alphabet'));
$strall = get_string('all');
/// Bar of first initials
/// Bar of first initials
echo "<center><p align=\"center\">";
echo get_string("firstname")." : ";
if ($firstinitial) {
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\">$strall</a> ";
"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 " <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> ";
"perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$letter\">$letter</a> ";
}
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;");
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));
$table = NULL;
} else {
$countries = get_list_of_countries();
if (empty($mnethosts)) {
$mnethosts = get_records('mnet_host', '', '', 'id', 'id,wwwroot,name');
}
foreach ($users as $key => $user) {
if (!empty($user->country)) {
$users[$key]->country = $countries[$user->country];
}
}
if ($sort == "country") { // Need to resort by full country name, not code
foreach ($users as $user) {
$susers[$user->id] = $user->country;
}
asort($susers);
foreach ($susers as $key => $value) {
$nusers[] = $users[$key];
}
$users = $nusers;
}
$mainadmin = get_admin();
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {
if ($user->username == 'guest') {
continue; // do not dispaly dummy new user and guest here
}
if ($user->id == $USER->id) {
$deletebutton = "";
} else {
if (has_capability('moodle/user:delete', $sitecontext)) {
$deletebutton = "<a href=\"user.php?delete=$user->id&amp;sesskey=$USER->sesskey\">$strdelete</a>";
} else {
$deletebutton ="";
}
}
if (has_capability('moodle/user:update', $sitecontext) and ($user->id==$USER->id or $user->id != $mainadmin->id) and !is_mnet_remote_user($user)) {
$editbutton = "<a href=\"$securewwwroot/user/editadvanced.php?id=$user->id&amp;course=$site->id\">$stredit</a>";
if ($user->confirmed == 0) {
$confirmbutton = "<a href=\"user.php?confirmuser=$user->id&amp;sesskey=$USER->sesskey\">" . get_string('confirm') . "</a>";
} else {
$confirmbutton = "";
}
} else {
$editbutton ="";
if ($user->confirmed == 0) {
$confirmbutton = "<span class=\"dimmed_text\">".get_string('confirm')."</span>";
} else {
$confirmbutton = "";
}
}
// for remote users, shuffle columns around and display MNET stuff
if (is_mnet_remote_user($user)) {
$accessctrl = 'allow';
if ($acl = get_record('mnet_sso_access_control', 'username', $user->username, 'mnet_host_id', $user->mnethostid)) {
$accessctrl = $acl->accessctrl;
}
$changeaccessto = ($accessctrl == 'deny' ? 'allow' : 'deny');
// delete button in confirm column - remote users should already be confirmed
// TODO: no delete for remote users, for now. new userid, delete flag, unique on username/host...
$confirmbutton = "";
// ACL in delete column
$deletebutton = get_string($accessctrl, 'mnet');
if (has_capability('moodle/user:delete', $sitecontext)) {
// TODO: this should be under a separate capability
$deletebutton .= " (<a href=\"?acl={$user->id}&amp;accessctrl=$changeaccessto&amp;sesskey={$USER->sesskey}\">"
. get_string($changeaccessto, 'mnet') . " access</a>)";
}
// mnet info in edit column
if (isset($mnethosts[$user->mnethostid])) {
$editbutton = $mnethosts[$user->mnethostid]->name;
}
}
if ($user->lastaccess) {
$strlastaccess = format_time(time() - $user->lastaccess);
} else {
$strlastaccess = get_string('never');
}
$fullname = fullname($user, true);
$table->data[] = array ("<a href=\"../user/view.php?id=$user->id&amp;course=$site->id\">$fullname</a>",
"$user->email",
"$user->city",
"$user->country",
$strlastaccess,
$editbutton,
$deletebutton,
$confirmbutton);
}
}
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 "</center>";
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&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));
$table = NULL;
} else {
$countries = get_list_of_countries();
foreach ($users as $key => $user) {
if (!empty($user->country)) {
$users[$key]->country = $countries[$user->country];
}
}
if ($sort == "country") { // Need to resort by full country name, not code
foreach ($users as $user) {
$susers[$user->id] = $user->country;
}
asort($susers);
foreach ($susers as $key => $value) {
$nusers[] = $users[$key];
}
$users = $nusers;
}
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {
if ($user->username == 'changeme' or $user->username == 'guest') {
continue; // do not dispaly dummy new user and guest here
}
if ($user->id == $USER->id) {
$deletebutton = "";
} else {
if (has_capability('moodle/user:delete', $sitecontext)) {
$deletebutton = "<a href=\"user.php?delete=$user->id&amp;sesskey=$USER->sesskey\">$strdelete</a>";
} else {
$deletebutton ="";
}
}
if (has_capability('moodle/user:update', $sitecontext)) {
$editbutton = "<a href=\"../user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>";
if ($user->confirmed == 0) {
$confirmbutton = "<a href=\"user.php?confirmuser=$user->id&amp;sesskey=$USER->sesskey\">" . get_string('confirm') . "</a>";
} else {
$confirmbutton = "";
}
} else {
$editbutton ="";
if ($user->confirmed == 0) {
$confirmbutton = "<span class=\"dimmed_text\">".get_string('confirm')."</span>";
} else {
$confirmbutton = "";
}
}
if ($user->lastaccess) {
$strlastaccess = format_time(time() - $user->lastaccess);
} else {
$strlastaccess = get_string('never');
}
$fullname = fullname($user, true);
$table->data[] = array ("<a href=\"../user/view.php?id=$user->id&amp;course=$site->id\">$fullname</a>",
"$user->email",
"$user->city",
"$user->country",
$strlastaccess,
$editbutton,
$deletebutton,
$confirmbutton);
}
}
echo "<table class=\"searchbox\" align=\"center\" cellpadding=\"10\"><tr><td>";
echo "<form action=\"user.php\" method=\"get\">";
echo "<input type=\"text\" name=\"search\" value=\"".s($search, true)."\" size=\"20\" />";
echo "<input type=\"submit\" value=\"$strsearch\" />";
if ($search) {
echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"$strshowallusers\" />";
}
echo "</form>";
echo "</td></tr></table>";
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading("<a href=\"user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string('addnewuser')."</a>");
}
if (!empty($table)) {
print_table($table);
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading("<a href=\"user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
}
}
admin_externalpage_print_footer($adminroot);
}
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>";
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
print_table($table);
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&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($adminroot);
?>
-70
View File
@@ -1,70 +0,0 @@
<?php
if (!isset($form->dbhost)) {
$form->dbhost = '';
}
if (!isset($form->dbname)) {
$form->dbname = '';
}
if (!isset($form->dbuser)) {
$form->dbuser = '';
}
if (!isset($form->dbpass)) {
$form->dbpass = '';
}
if (!isset($form->dbcluster)) {
$form->dbcluster = '';
}
if (!isset($form->pathtopgdump)) {
$form->pathtopgdump = '';
}
if (!isset($form->pathtopsql)) {
$form->pathtopsql = '';
}
?>
<form name="migratefrom" action="utfdbmigrate.php" method="POST">
<input name="migrate" type="hidden" value="1" />
<input name="sesskey" type="hidden" value="<?php echo sesskey() ?>" />
<?php if (isset($err["dbconnect"])) formerr($err["dbconnect"]); ?>
<?php if (isset($err["pathtopgdump"])) formerr($err["pathtopgdump"]); ?>
<?php if (isset($err["pathtopsql"])) formerr($err["pathtopsql"]); ?>
<table cellpadding="9" cellspacing="0" width="500">
<tr valign="top">
<td align="right"><?php print_string("dbhost", "install") ?>:</td>
<td><input type="text" name="dbhost" value="<?php p($form->dbhost) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("database", "install") ?>:</td>
<td><input type="text" name="dbname" value="<?php p($form->dbname) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("user") ?>:</td>
<td><input type="text" name="dbuser" value="<?php p($form->dbuser) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("password") ?>:</td>
<td><input type="text" name="dbpass" value="<?php p($form->dbpass) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("pgcluster", "admin") ?>:</td>
<td><input type="text" name="dbcluster" value="<?php p($form->dbcluster) ?>" />
<td><?php print_string("pgclusterdescription", "admin") ?></td>
</tr>
<tr valign="top">
<td align="right" nowrap="nowrap"><?php print_string("pathtopgdump","admin") ?>:</td>
<td><input type="text" name="pathtopgdump" value="<?php p($form->pathtopgdump) ?>" />
<td><?php print_string("pathtopgdumpdesc","admin"); ?></td>
</tr>
<tr valign="top">
<td align="right" nowrap="nowrap"><?php print_string("pathtopsql","admin") ?>:</td>
<td><input type="text" name="pathtopsql" value="<?php p($form->pathtopsql) ?>" />
<td><?php print_string("pathtopsqldesc","admin"); ?></td>
</tr>
</table>
<center>
<input type="submit" value="<?php print_string('continue') ?>"/>
&nbsp;<input type="button" value="<?php print_string('cancel') ?>" onclick="javascript:history.go(-1)" />
</center>
File diff suppressed because it is too large Load Diff
@@ -72,17 +72,17 @@ class delete_field extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletefield'] . '<br /><br />' . $fieldparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeletefield'] . '<br /><br />' . $fieldparam . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_field&amp;confirmed=yes&amp;postaction=edit_table&amp;field=' . $fieldparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_field&amp;confirmed=yes&amp;postaction=edit_table&amp;field=' . $fieldparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></div></form></fieldset>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -72,17 +72,17 @@ class delete_index extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeleteindex'] . '<br /><br />' . $indexparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeleteindex'] . '<br /><br />' . $indexparam . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_index&amp;confirmed=yes&amp;postaction=edit_table&amp;index=' . $indexparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_index&amp;confirmed=yes&amp;postaction=edit_table&amp;index=' . $indexparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -72,17 +72,17 @@ class delete_key extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletekey'] . '<br /><br />' . $keyparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeletekey'] . '<br /><br />' . $keyparam . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_key&amp;confirmed=yes&amp;postaction=edit_table&amp;key=' . $keyparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_key&amp;confirmed=yes&amp;postaction=edit_table&amp;key=' . $keyparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -72,17 +72,17 @@ class delete_sentence extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletesentence'] . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeletesentence'] . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_sentence&amp;confirmed=yes&amp;postaction=edit_statement&amp;sentence=' . $sentenceparam . '&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_sentence&amp;confirmed=yes&amp;postaction=edit_statement&amp;sentence=' . $sentenceparam . '&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -71,17 +71,17 @@ class delete_statement extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletestatement'] . '<br /><br />' . $statementparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeletestatement'] . '<br /><br />' . $statementparam . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_statement&amp;confirmed=yes&amp;postaction=edit_xml_file&amp;statement=' . $statementparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_statement&amp;confirmed=yes&amp;postaction=edit_xml_file&amp;statement=' . $statementparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -71,17 +71,17 @@ class delete_table extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletetable'] . '<br /><br />' . $tableparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeletetable'] . '<br /><br />' . $tableparam . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_table&amp;confirmed=yes&amp;postaction=edit_xml_file&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_table&amp;confirmed=yes&amp;postaction=edit_xml_file&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -70,17 +70,17 @@ class delete_xml_file extends XMLDBAction {
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletexmlfile'] . '<br /><br />' . $dirpath . '/install.php</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <p class="centerpara">' . $this->str['confirmdeletexmlfile'] . '<br /><br />' . $dirpath . '/install.php</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_xml_file&amp;confirmed=yes&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;postaction=main_view#lastused" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' <form action="index.php?action=delete_xml_file&amp;confirmed=yes&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;postaction=main_view#lastused" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=main_view#lastused" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' <form action="index.php?action=main_view#lastused" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
@@ -98,13 +98,14 @@ class edit_field extends XMLDBAction {
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
$o = '<form name="form" id="form" action="index.php" method="post">';
$o = '<form id="form" action="index.php" method="post">';
$o.= ' <div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="field" value="' . $fieldparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_field_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
/// XMLDB field name
/// If the field has dependencies, we cannot change its name
$disabled = '';
@@ -170,18 +171,18 @@ class edit_field extends XMLDBAction {
/// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getField($fieldparam)) {
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($field->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
@@ -98,20 +98,21 @@ class edit_index extends XMLDBAction {
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
$o = '<form name="form" id="form" action="index.php" method="post">';
$o = '<form id="form" action="index.php" method="post">';
$o.= '<div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="index" value="' . $indexparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_index_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
/// XMLDB index name
/// If the index has dependencies, we cannot change its name
$disabled = '';
if ($structure->getIndexUses($table->getName(), $index->getName())) {
$disabled = ' disabled="disabled " ';
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . 'value="' . s($index->getName()) . '" /></td></tr>';
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . ' value="' . s($index->getName()) . '" /></td></tr>';
/// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($index->getComment()) . '</textarea></td></tr>';
/// XMLDBIndex Type
@@ -125,18 +126,18 @@ class edit_index extends XMLDBAction {
/// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getIndex($indexparam)) {
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($index->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
@@ -98,20 +98,21 @@ class edit_key extends XMLDBAction {
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
$o = '<form name="form" id="form" action="index.php" method="post">';
$o = '<form id="form" action="index.php" method="post">';
$o.= '<div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="key" value="' . $keyparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_key_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
/// XMLDB key name
/// If the key has dependencies, we cannot change its name
$disabled = '';
if ($structure->getKeyUses($table->getName(), $key->getName())) {
$disabled = ' disabled="disabled " ';
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . 'value="' . s($key->getName()) . '" /></td></tr>';
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . ' value="' . s($key->getName()) . '" /></td></tr>';
/// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($key->getComment()) . '</textarea></td></tr>';
/// XMLDBKey Type
@@ -137,18 +138,18 @@ class edit_key extends XMLDBAction {
/// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getKey($keyparam)) {
$b .= '&nbsp;<a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;key=' . $keyparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;key=' . $keyparam . '">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($key->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;key=' . $keyparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;key=' . $keyparam . '">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
@@ -114,13 +114,14 @@ class edit_sentence extends XMLDBAction {
$values = $statement->getValuesFromInsertSentence($sentence);
/// Add the main form
$o = '<form name="form" id="form" action="index.php" method="post">';
$o = '<form id="form" action="index.php" method="post">';
$o.= '<div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="statement" value="' . $statementparam .'" />';
$o.= ' <input type="hidden" name ="sentence" value="' . $sentenceparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_sentence_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_statement" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
/// The fields box
$o.= ' <tr><td>INSERT INTO ' . s($statement->getTable()) . '</td></tr>';
$o.= ' <tr><td><textarea name="fields" rows="2" cols="70" id="fields">' . s(implode(', ', $fields)) . '</textarea></td></tr>';
@@ -130,9 +131,9 @@ class edit_sentence extends XMLDBAction {
/// The submit button
$o.= ' <tr valign="top"><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The back to edit statement button
$b .= '&nbsp;<a href="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
@@ -103,27 +103,28 @@ class edit_statement extends XMLDBAction {
/// Add the main form
$o = '<form id="form" action="index.php" method="post">';
$o.= '<div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="statement" value="' . $statementparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_statement_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_statement" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
$o.= ' <tr valign="top"><td>Name:</td><td><input type="hidden" name ="name" value="' . s($statement->getName()) . '" />' . s($statement->getName()) .'</td></tr>';
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td><textarea name="comment" rows="3" cols="80" id="comment">' . s($statement->getComment()) . '</textarea></td></tr>';
$o.= ' <tr valign="top"><td>&nbsp;</td><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($origstructure->getStatement($statementparam)) {
$b .= '&nbsp;<a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;statement=' . $statementparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;statement=' . $statementparam . '">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($statement->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;statement=' . $statementparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;statement=' . $statementparam . '">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
@@ -141,7 +142,7 @@ class edit_statement extends XMLDBAction {
$sentences =& $statement->getSentences();
if (!empty($sentences)) {
$o .= '<h3 class="main">' . $this->str['sentences'] . '</h3>';
$o .= '<table id="listfields" border="0" align="center" cellpadding="5" cellspacing="1" class="flexible">';
$o .= '<table id="listfields" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$row = 0;
foreach ($sentences as $key => $sentence) {
/// Prepend some SQL
@@ -103,11 +103,12 @@ class edit_table extends XMLDBAction {
/// Add the main form
$o = '<form id="form" action="index.php" method="post">';
$o.= '<div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_table_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
/// If the table is being used, we cannot rename it
if ($structure->getTableUses($table->getName())) {
$o.= ' <tr valign="top"><td>Name:</td><td><input type="hidden" name ="name" value="' . s($table->getName()) . '" />' . s($table->getName()) .'</td></tr>';
@@ -117,18 +118,18 @@ class edit_table extends XMLDBAction {
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td><textarea name="comment" rows="3" cols="80" id="comment">' . s($table->getComment()) . '</textarea></td></tr>';
$o.= ' <tr valign="top"><td>&nbsp;</td><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($origstructure->getTable($tableparam)) {
$b .= '&nbsp;<a href="index.php?action=view_table_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_table_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($table->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_table_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_table_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
@@ -141,7 +142,7 @@ class edit_table extends XMLDBAction {
/// The back to edit xml file button
$b .= '&nbsp;<a href="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
$b .= ' <p align="center" class="buttons">';
$b .= ' <p class="centerpara buttons">';
/// The view sql code button
$b .= '<a href="index.php?action=view_table_sql&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' .$this->str['viewsqlcode'] . ']</a>';
/// The view php code button
@@ -170,7 +171,7 @@ class edit_table extends XMLDBAction {
$fields =& $table->getFields();
if (!empty($fields)) {
$o .= '<h3 class="main">' . $this->str['fields'] . '</h3>';
$o .= '<table id="listfields" border="0" align="center" cellpadding="5" cellspacing="1" class="flexible">';
$o .= '<table id="listfields" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$row = 0;
foreach ($fields as $field) {
/// Calculate buttons
@@ -210,7 +211,7 @@ class edit_table extends XMLDBAction {
/// The readable info
$r = '</td><td class="readableinfo cell">' . $field->readableInfo() . '</td>';
/// Print table row
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;field=' . $field->getName() . '&amp;table=' . $table->getName() . '&amp;select=edited" target="_blank">' . $field->getName() . '</a>' . $b . $r . '</tr>';
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;field=' . $field->getName() . '&amp;table=' . $table->getName() . '&amp;select=edited">' . $field->getName() . '</a>' . $b . $r . '</tr>';
$row = ($row + 1) % 2;
}
$o .= '</table>';
@@ -219,7 +220,7 @@ class edit_table extends XMLDBAction {
$keys =& $table->getKeys();
if (!empty($keys)) {
$o .= '<h3 class="main">' . $this->str['keys'] . '</h3>';
$o .= '<table id="listkeys" border="0" align="center" cellpadding="5" cellspacing="1" class="flexible">';
$o .= '<table id="listkeys" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$row = 0;
foreach ($keys as $key) {
/// Calculate buttons
@@ -254,7 +255,7 @@ class edit_table extends XMLDBAction {
/// The readable info
$r = '</td><td class="readableinfo cell">' . $key->readableInfo() . '</td>';
/// Print table row
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;key=' . $key->getName() . '&amp;table=' . $table->getName() . '&amp;select=edited" target="_blank">' . $key->getName() . '</a>' . $b . $r .'</tr>';
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;key=' . $key->getName() . '&amp;table=' . $table->getName() . '&amp;select=edited">' . $key->getName() . '</a>' . $b . $r .'</tr>';
$row = ($row + 1) % 2;
}
$o .= '</table>';
@@ -263,7 +264,7 @@ class edit_table extends XMLDBAction {
$indexes =& $table->getIndexes();
if (!empty($indexes)) {
$o .= '<h3 class="main">' . $this->str['indexes'] . '</h3>';
$o .= '<table id="listindexes" border="0" align="center" cellpadding="5" cellspacing="1" class="flexible">';
$o .= '<table id="listindexes" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$row = 0;
foreach ($indexes as $index) {
/// Calculate buttons
@@ -290,7 +291,7 @@ class edit_table extends XMLDBAction {
/// The readable info
$r = '</td><td class="readableinfo cell">' . $index->readableInfo() . '</td>';
/// Print table row
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;index=' . $index->getName() . '&amp;table=' . $table->getName() . '&amp;select=edited" target="_blank">' . $index->getName() . '</a>' . $b . $r .'</tr>';
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;index=' . $index->getName() . '&amp;table=' . $table->getName() . '&amp;select=edited">' . $index->getName() . '</a>' . $b . $r .'</tr>';
$row = ($row + 1) % 2;
}
$o .= '</table>';
@@ -107,7 +107,7 @@ class edit_table_save extends XMLDBAction {
"<a href=\"../index.php\">" . $this->str['administration'] . "</a> -> <a href=\"index.php\">XMLDB</a>");
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $temptable->readableInfo(),
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . str_replace($CFG->dirroot, '', urlencode($dirpath)));
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
die; /// re-die :-P
}
@@ -101,32 +101,33 @@ class edit_xml_file extends XMLDBAction {
$structure =& $editeddir->xml_file->getStructure();
/// Add the main form
$o = '<form id="form" action="index.php" method="post">';
$o .= '<div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="action" value="edit_xml_file_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_xml_file" />';
$o.= ' <input type="hidden" name ="path" value="' . s($structure->getPath()) .'" />';
$o.= ' <input type="hidden" name ="version" value="' . s($structure->getVersion()) .'" />';
$o.= ' <table id="formelements" align="center">';
$o.= ' <table id="formelements" class="boxaligncenter">';
$o.= ' <tr valign="top"><td>Path:</td><td>' . s($structure->getPath()) . '</td></tr>';
$o.= ' <tr valign="top"><td>Version:</td><td>' . s($structure->getVersion()) . '</td></tr>';
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td><textarea name="comment" rows="3" cols="80" id="comment">' . $structure->getComment() . '</textarea></td></tr>';
$o.= ' <tr><td>&nbsp;</td><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
$b .= '&nbsp;<a href="index.php?action=view_structure_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_structure_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original">[' . $this->str['vieworiginal'] . ']</a>';
/// The view edited XML button
if ($structure->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_structure_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited" target="_blank">[' . $this->str['viewedited'] . ']</a>';
$b .= '&nbsp;<a href="index.php?action=view_structure_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
/// The new table button
$b .= '&nbsp;<a href="index.php?action=new_table&amp;postaction=edit_table&amp;table=changeme&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['newtable'] . ']</a>';
/// The new from MySQL button
if ($CFG->dbtype == 'mysql') {
if ($CFG->dbfamily == 'mysql') {
$b .= '&nbsp;<a href="index.php?action=new_table_from_mysql&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['newtablefrommysql'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['newtablefrommysql'] . ']';
@@ -136,7 +137,7 @@ class edit_xml_file extends XMLDBAction {
/// The back to main menu button
$b .= '&nbsp;<a href="index.php?action=main_view#lastused">[' . $this->str['backtomainview'] . ']</a>';
$b .= '</p>';
$b .= ' <p align="center" class="buttons">';
$b .= ' <p class="centerpara buttons">';
/// The view sql code button
$b .= '<a href="index.php?action=view_structure_sql&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' .$this->str['viewsqlcode'] . ']</a>';
/// The view php code button
@@ -158,7 +159,7 @@ class edit_xml_file extends XMLDBAction {
$tables =& $structure->getTables();
if ($tables) {
$o .= '<h3 class="main">' . $this->str['tables'] . '</h3>';
$o .= '<table id="listtables" border="0" align="center" cellpadding="5" cellspacing="1" class="flexible">';
$o .= '<table id="listtables" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$row = 0;
foreach ($tables as $table) {
/// Calculate buttons
@@ -194,7 +195,7 @@ class edit_xml_file extends XMLDBAction {
}
$b .= '</td>';
/// Print table row
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_table_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;table=' . $table->getName() . '&amp;select=edited" target="_blank">' . $table->getName() . '</a>' . $b . '</tr>';
$o .= '<tr class="r' . $row . '"><td class="table cell"><a href="index.php?action=view_table_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;table=' . $table->getName() . '&amp;select=edited">' . $table->getName() . '</a>' . $b . '</tr>';
$row = ($row + 1) % 2;
}
$o .= '</table>';
@@ -203,7 +204,7 @@ class edit_xml_file extends XMLDBAction {
$statements =& $structure->getStatements();
if ($statements) {
$o .= '<h3 class="main">' . $this->str['statements'] . '</h3>';
$o .= '<table id="liststatements" border="0" align="center" cellpadding="5" cellspacing="1" class="flexible">';
$o .= '<table id="liststatements" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$row = 0;
foreach ($statements as $statement) {
/// Calculate buttons
@@ -229,7 +230,7 @@ class edit_xml_file extends XMLDBAction {
$b .= '<a href="index.php?action=delete_statement&amp;statement=' . $statement->getName() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['delete'] . ']</a>';
$b .= '</td>';
/// Print statement row
$o .= '<tr class="r' . $row . '"><td class="statement cell"><a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;statement=' . $statement->getName() . '&amp;select=edited" target="_blank">' . $statement->getName() . '</a>' . $b . '</tr>';
$o .= '<tr class="r' . $row . '"><td class="statement cell"><a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;statement=' . $statement->getName() . '&amp;select=edited">' . $statement->getName() . '</a>' . $b . '</tr>';
$row = ($row + 1) % 2;
}
$o .= '</table>';
@@ -141,6 +141,15 @@ class get_db_directories extends XMLDBAction {
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, groups
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/group/db';
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);

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