Compare commits

...

5910 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
nfreear 1bece9174c Fixes bug, "Warning: Invalid argument supplied for foreach() in /var/www/html/ndf42/head/lib/blocklib.php on line 174" 2006-10-10 11:03:35 +00:00
nfreear 6fbe028442 Fixes bug MDL-6896, "Global search block - relative form URL broken" 2006-10-10 10:58:29 +00:00
toyomoyo 55656968b3 do not write inherit into db! 2006-10-10 09:22:38 +00:00
moodler 39ec6a6f4b Bumped to launch into 1.8 dev 2006-10-10 08:31:44 +00:00
moodler 2179989947 Merged bogon fix from stable 2006-10-10 07:43:19 +00:00
jamiesensei d9dce4e7b1 changed $default to $toform - more meaningful 2006-10-10 07:16:05 +00:00
jamiesensei 461f512795 moved setting of defaults from edit2.php to edit_form.php 2006-10-10 07:05:19 +00:00
moodler 4139c81ab8 Updating to 1.7 Beta 2006-10-10 06:21:59 +00:00
moodler 328af436b4 Latest tags 2006-10-10 06:17:44 +00:00
vyshane 3d044d6012 Removed teacher forum string 2006-10-10 05:24:16 +00:00
vyshane ee5cdf3466 Removed teacher forums from course reset. 2006-10-10 05:23:44 +00:00
vyshane 25b75c6053 Merged fix for MDL-6537 2006-10-10 05:20:43 +00:00
vyshane 5b32e3bc3c Merged from 1.6 stable. 2006-10-10 05:17:12 +00:00
toyomoyo beba128f6d fix for MDL-6831 2006-10-10 03:17:49 +00:00
toyomoyo 4473252d7c changing default capabilities for coursecreators so that they could create courses 2006-10-10 03:03:17 +00:00
toyomoyo 7246585a70 setting default value for backup/restore capabilities for teacheredit and coursecreators 2006-10-10 02:52:08 +00:00
vyshane 3ecc49d495 Turn off display of week dates if we are in editing mode and if ajax is turned on. We do this for now because the ajax code does not yet update the week dates when sections are moved around. Will have to fix later. 2006-10-10 02:38:33 +00:00
cap2501 c4308cfa1b Bug:MDL-6674
made changes to blocks_exeute_repositioning_atomic to fix some logic errors with shifting around the weight list
2006-10-10 02:06:51 +00:00
stronk7 a08a698895 Updated moodle notes to reflect latest change to odbc_mssql driver. 2006-10-09 23:39:32 +00:00
stronk7 d5d50c2d54 Fixed ServerInfo() behaviour for odbc_mssql. We need this working properly NOW!
(will be back once ADOdb code supports it properly)
2006-10-09 23:36:27 +00:00
stronk7 97ab73aad4 Add odbc_msql dbtype to a bunch of places. 2006-10-09 22:55:55 +00:00
stronk7 354bb6035a And now, Moodle is able to work with the odbc_mssql driver. Simple! B-) 2006-10-09 22:29:52 +00:00
stronk7 1c460b0bc9 Show error if the dbtype specified isn't supported by XMLDB 2006-10-09 22:28:22 +00:00
stronk7 cd2acc4aa1 Added MetaIndexes() support to the odbc_mssql driver. We need it NOW!
I've posted one comment about this in ADOdb forums:

http://phplens.com/lens/lensforum/msgs.php?id=15930
2006-10-09 22:26:21 +00:00
stronk7 a3f3ff1b69 Added MetaIndexes() support to the odbc_mssql driver. We need it NOW!
I've posted one comment about this in ADOdb forums:

http://phplens.com/lens/lensforum/msgs.php?id=15930
2006-10-09 22:21:01 +00:00
stronk7 2d31c39397 Not necessary to set unicodedb for each admin/index.php invocation
because setup.php saves it if needed.
2006-10-09 16:33:31 +00:00
stronk7 9b3bacf077 Raising MSSQL min req. to 2005 (9.0)
Merged from MOODLE_16_STABLE
2006-10-09 16:19:29 +00:00
sam_marshall 745c19685c Wiki: some changes to improve error messages and (slightly) behaviour when in group mode 2006-10-09 14:29:14 +00:00
jamiesensei 29f1cae1b0 removed htmleditors array - not needed 2006-10-09 11:34:43 +00:00
jamiesensei 0d26ea7af9 fix for bug that value of restrictmodules field wasn't available which breaks disabling of allowedmods multiple select 2006-10-09 11:23:23 +00:00
skodak a44091bffe Fixing Theme Config Variables MDL-6784 2006-10-09 10:12:41 +00:00
skodak 4dd5d7513d fixed wrong capability name and function name typo 2006-10-09 10:07:15 +00:00
vyshane 3203f10402 Fix for MDL-6889. See bug report for description. 2006-10-09 08:35:39 +00:00
jamiesensei 230a910a0b added 2 new methods to form class data_submitted and setDefault
Fixed bug in id generation
2006-10-09 08:32:30 +00:00
bobopinna 89656c6129 Fixed some bugs in the datamodel definition 2006-10-09 07:36:51 +00:00
skodak c544838d29 index.html of assignment help needs update. MDL-6888 2006-10-08 21:44:59 +00:00
cap2501 2fb6deb574 added main.getString function to better emulate php-moodle. In the future this could be extended to dynamically pull strings from moodle.php. 2006-10-08 21:24:38 +00:00
cap2501 6d9fbe85b6 delete confirmation now useing main.getString function. 2006-10-08 21:23:51 +00:00
cap2501 196fe04635 resolved: MDL-6579
added string for 'resource'
2006-10-08 21:10:14 +00:00
cap2501 f2e3c53ad6 resolved: MDL-6579
created language independant prompt for resource/activity deletion
2006-10-08 21:09:47 +00:00
cap2501 3287cb4cba resolved: MDL-6579
Added strings needed for delete confirmation.
2006-10-08 21:09:18 +00:00
skodak 8b902ba4a0 change_password.php produces JS error fixed typo MDL-6750 2006-10-08 20:29:13 +00:00
cap2501 39d764f932 removed code for the old way of updating the block weight. 2006-10-08 20:26:25 +00:00
cap2501 9e28e05f62 movement of the blocks is now handled completely seperately on the serverside and on the clientside. This was unavoidable. 2006-10-08 20:25:10 +00:00
cap2501 bb781a70c5 made changes to the way the block movment was handled to eliminate some errors that came up. 2006-10-08 20:24:15 +00:00
cap2501 77e65ff786 removed some debugging output accidently left in. 2006-10-08 20:23:30 +00:00
cap2501 e028ed34da created blocks_execute_repositioning_atomic as an extension of blocks_execute_repositioning, the original did adjust the column that the block was coming from but it did not insert it properly into the target column (adjusting the weights of the other blocks). This is currently only really nessicary for the ajax formats. 2006-10-08 20:21:15 +00:00
skodak 78d4711ebb fixed data/index.php when no databases available, initialized array in get_all_instances_in_course() from datalib.php; merged from MOODLE_16_STABLE 2006-10-08 19:45:29 +00:00
skodak d8247de55e problem with incorrect redirect url - wwwroot without the trailning slash in not standard compliant MDL-6193 2006-10-08 18:55:18 +00:00
skodak cefd17e991 docs for advanced uploading of files assignment type 2006-10-08 18:16:18 +00:00
skodak 2597d73128 a small typo 'helpupload' on /lang/en_utf8/assignment.php MDL-6883, found by Mitsuhiro Yoshida 2006-10-08 17:35:27 +00:00
skodak 17e5635c36 fixed 'capabilitities' typos and removed forgotten debug_print_backtrace() commited with MDL-6728 2006-10-08 11:00:49 +00:00
skodak ab61d01b06 Typo in lib/accesslib.php MDL-6728, found by Nicolas Martignoni. 2006-10-08 10:52:54 +00:00
skodak a8f5a8a2e4 Insert a Chinese charachter string to label resource result error MDL-6757 2006-10-08 10:07:03 +00:00
stronk7 5fbab6173a Now Oracle uses the new find_sequence_name() function to find the
correct sequence name for each table on insert.

Also, introduced initial hooks to support Oracle LOBs in insert_record()
2006-10-08 09:58:11 +00:00
skodak badc7070cd removed obsoleted backup configuration scripts 2006-10-08 09:51:22 +00:00
stronk7 c5ac44c69e Added find_sequence_name() to be used by insert_record() to get the correct sequence 2006-10-08 09:38:09 +00:00
stronk7 abbd460ff9 Adding getSequenceFromDB() for Oracle in order to detect the correct
sequence name in the insert_record() function.
2006-10-08 09:36:33 +00:00
skodak 1c55ce748d add note to admin settings to check max_allowed_packet when enabling db sessions in MySQL - MDL-6866 , fixed quotes :-( 2006-10-08 09:20:46 +00:00
skodak 25bbaee716 add note to admin settings to check max_allowed_packet when enabling db sessions in MySQL - MDL-6866 2006-10-08 09:16:38 +00:00
skodak 91b678f306 Grades computed incorrectly if assignment name appears more than twice in a course MDL-6876 , patch submitted by Gary Anderson 2006-10-08 09:04:59 +00:00
skodak b3cbe3a333 fixed wrong strip_slashes() when printing blog entry 2006-10-08 08:52:15 +00:00
skodak b15d469ec2 Error when adding Recent activity as a sticky block MDL-6801 2006-10-08 08:44:32 +00:00
skodak 14df27ad3c fixed wrong redirect when editing blocks in stickyblocks page 2006-10-08 08:36:45 +00:00
skodak cf0c601fb9 fixed encoding header() in messaging frames MDL-6128 - 1.6, special chars and messaging system. 2006-10-08 08:29:35 +00:00
skodak 0ca30166f3 Resource frameset error in IE6 MDL-6842, patch submitted by Chris Fryer. 2006-10-08 08:20:38 +00:00
skodak 4db69ffb82 Scalable Vector Graphics (SVG) files in Moodle are not correctly displayed in many Browsers MDL-6878, patch submitted by Geoffrey Rowland, thanks! 2006-10-08 08:13:41 +00:00
skodak c664a03609 added 'Reviewed' assignment status to My moodle page MDL-6834, patch submitted by Stephen Bourget - thanks! 2006-10-08 08:06:04 +00:00
moodler 67a6156c5a Automatic installer.php lang files by installer_builder (20061008) 2006-10-08 02:52:12 +00:00
skodak 57f1b91497 fixed some incorrect strtolower() calls that were breaking non ascii languages MDL-6135 2006-10-07 20:47:54 +00:00
gustav_delius 6a8b20b790 Don't strip slashes from data send to htmlarea, after all it is not being stripped from data going to the normal textarea either. 2006-10-07 17:20:35 +00:00
gustav_delius 1ca20e0272 Don't use stripslashes on data coming from database 2006-10-07 17:18:15 +00:00
gbateson c0e19266db simplified the javascript to hide "name", "studentfeedbackurl" and dates when not required 2006-10-07 14:57:37 +00:00
stronk7 dd00dbd799 Allow load average to be displayed in servers using the comma as
decimal separator.
2006-10-07 10:33:58 +00:00
gbateson fb414b62e5 added PARAM types for all calls to "optional_param()" and "required_param()" 2006-10-07 08:59:59 +00:00
gbateson cc4782064d adjust "best grade" to range 0 to hotpot->maxgrade 2006-10-07 05:03:52 +00:00
gbateson 1cc9e57b94 removed "thiscourse" and "allmycourses" as they are no longer used in hotpot/report.php 2006-10-07 02:00:53 +00:00
gbateson dee022991a remvoved course selection for admins, and tidied up handling of capabilities 2006-10-07 01:57:57 +00:00
gbateson 967cede92e remove "Selecting a course" section 2006-10-07 01:53:49 +00:00
stronk7 b7e58d8f8c Wood-ising the adminsettings fieldset 2006-10-06 22:25:49 +00:00
tjhunt 13835c77b6 MDL-6731 Can't save manual comment on a quiz question. I had missed one instance of the comment -> manualcomment column rename. 2006-10-06 17:22:08 +00:00
tjhunt 8ff134db82 Typo. 2006-10-06 17:20:37 +00:00
tjhunt b20ea66988 Hopefully improve performance on site with lots of question categories Merged from MOODLE_16_STABLE. 2006-10-06 16:48:54 +00:00
stronk7 29bbfb339a One malformed XML was preventing wiki_logs to be properly UTF8-ised. MDL-6854 2006-10-06 15:26:13 +00:00
stronk7 b695b9106b Typo recently introduced. MDL-6336
(merged from MOODLE_16_STABLE)
2006-10-06 15:03:46 +00:00
skodak e96f2a77db Code cleanup in blog.
MDL-6805  Fixed redirects in blog; MDL-6807  partially fixed use of capabilitites - it needs more testing and possibly minor fixing, the commit contains other blog bugfixes too. In general it should work exactly the same. The introduction of roles makes proper setup more difficult :-(

Expect some more fixes soon, no other bigger changes...
2006-10-06 10:11:52 +00:00
gbateson bd9c7e8473 fix undefined variable $context on line 135 2006-10-06 09:36:40 +00:00
toyomoyo 837bde0cc0 fix for MDL-6336 2006-10-06 08:26:37 +00:00
gbateson a81468432a allow display and deletion of attempts by "All users" including unenrolled students 2006-10-06 08:02:07 +00:00
vyshane 64e5a68d91 Some fixes for MDL-6674. This should fix moving activities (resources).
Thanks to Dan Poltawski for suggestions.
2006-10-06 07:56:37 +00:00
gbateson 8e6461f749 fix typo on line 89: get_context_instance(CONTEXT_COURSE, $course) ... should be ... get_context_instance(CONTEXT_COURSE, $course->id) 2006-10-06 07:09:27 +00:00
moodler 83ea392ee1 Drop the user_xxx tables after Roles install 2006-10-06 06:47:12 +00:00
moodler 47545d4161 Removed some references to user_teachers that will probably cause a bug 2006-10-06 06:42:33 +00:00
moodler f0c9f676db Remove user_students references 2006-10-06 06:39:29 +00:00
moodler cf85513250 Added missing cap strings 2006-10-06 06:37:58 +00:00
moodler 99938ae7b6 Added some defaults to make sure Exercise is off by default 2006-10-06 06:34:08 +00:00
moodler 95056a03f9 Fix some doc links 2006-10-06 06:26:06 +00:00
gbateson 259bcf0c8b added "format_string" and "stripslashes" when print HotPot name to browser 2006-10-06 06:22:15 +00:00
moodler e27a943788 Disable the exercise module as it's not maintained or upgraded for roles 2006-10-06 06:15:57 +00:00
toyomoyo 1b19e8107e fix for MDL-6859, MDL-6860 2006-10-06 06:04:32 +00:00
moodler 010b211f51 Fixes for naming of forms to make them XHTML compatible 2006-10-06 06:02:17 +00:00
moodler e32fb9a4f7 Fixed a misplaced form tag MDL-6861 2006-10-06 05:57:07 +00:00
gbateson 2398e835a8 renamed all $hp to $hotpot; added/update/delete calendar events when adding/updating/deleting hotpots; add functions required for participation report; 2006-10-06 05:56:53 +00:00
moodler 76b41407ea Made alt tags translatable MDL-6861 2006-10-06 05:53:28 +00:00
moodler 46f8bacfc8 Fixed some unencoded & in urls 2006-10-06 05:44:05 +00:00
moodler 670fc5123a MOre fixes to remove erros due to JS 2006-10-06 05:28:57 +00:00
moodler 4418a1125a FIxed some incorrect backslashes MDL-6861 2006-10-06 05:06:25 +00:00
gbateson bf4665c362 In "Selecting Users" section, added "All users" and modified "All participants" and "Existing students" 2006-10-06 04:03:39 +00:00
toyomoyo 0c40e390ad adding utf8 support for new fields 2006-10-06 04:03:02 +00:00
gbateson 7676e965b9 added $string['allusers'] = 'All users'; for "hotpot/report.php" 2006-10-06 03:46:46 +00:00
moodler 86a8eb5841 Automatic installer.php lang files by installer_builder (20061006) 2006-10-06 02:56:20 +00:00
gbateson 85b05f3784 removed all references to obsolete indexes on "hotpot_questions.name" and "hotpot_strings.string" 2006-10-06 02:03:43 +00:00
gbateson cd49109677 reset version number in HotPot v1 with over-advanced version number 2006-10-06 01:25:56 +00:00
gustav_delius 6ac0909983 Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570. For some reason this script is not using get_users() but is instead constructing its own sql, so the change to get_users() had to be duplicated here. 2006-10-05 22:45:01 +00:00
gustav_delius 6bff0453f5 Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570 2006-10-05 22:21:09 +00:00
stronk7 1db1336bd4 Avoid some notices. Part of MDL-6854 2006-10-05 19:51:47 +00:00
stronk7 10f36d68e8 Avoid some notices. Part of MDL-6854 2006-10-05 19:29:39 +00:00
tjhunt ec467c6929 MDL-6837 - move warning about pupup blockers into the lang file. Merged from MOODLE_16_STABLE. 2006-10-05 15:58:08 +00:00
andreabix 446b52f908 overlapping fix 2006-10-05 09:52:38 +00:00
toyomoyo 1e248b442c fixed a bug with user listing where user_lastaccess entries are not set, e.g. after a resotre 2006-10-05 08:54:35 +00:00
vyshane 35b974dae6 Some small formatting changes.
Added some missing semi-colons in js code.
2006-10-05 08:47:13 +00:00
moodler 881a77bfcf Fix to ignore hidden courses when using switchrole in a course MDL-6841 2006-10-05 08:41:06 +00:00
vyshane 191acd5964 Fix for MDL-6682. Removed duplicate string quiz:grade 2006-10-05 08:05:55 +00:00
vyshane d8947f95dc Merged fix for MDL-6819 2006-10-05 07:22:48 +00:00
moodler 04338f9ea1 Removed user_students, user_teachers, user_coursecreators and user_admins
as they are now irrelevant   MDL-6830
2006-10-05 07:05:06 +00:00
moodler 36832f4d41 Moved sticky blocks to Appearance section 2006-10-05 07:01:28 +00:00
bobopinna 04231a9547 Fixed comments_from_learner data element to fit ADL requirements 2006-10-05 06:48:30 +00:00
toyomoyo cfa7cdb958 droppinf utf8 support for user_* tables 2006-10-05 06:05:02 +00:00
toyomoyo 013b90ed92 a few fixes, for MDL-6836, MDL-6835, and MDL-6765 2006-10-05 04:05:07 +00:00
toyomoyo b1e68bff0e removing some debugging statements 2006-10-05 03:26:22 +00:00
vyshane 1a7cdb11b4 Merged fixes for MDL-2583 2006-10-05 03:18:29 +00:00
koenr edb14e52fc closing MDL-5510 2006-10-04 21:40:18 +00:00
skodak f47f4659de fixed nocache option in format_text() 2006-10-04 21:22:57 +00:00
mits 0a1361f61f Soften the color of currently selected admin menu. 2006-10-04 20:42:57 +00:00
urs_hunkler 37e7b362bb 'MDL-6790 Grab handle icon is missing from blocks. Added property to show the move curser for a simmilar signal as for the crosses' 2006-10-04 16:23:44 +00:00
urs_hunkler 57d13c2468 'merged from 1.6 - MDL-6824, redundant declaration: .categorybox .category' 2006-10-04 15:51:48 +00:00
urs_hunkler eef90b805f 'MDL-6824, redundant declaration: .categorybox .category' 2006-10-04 15:51:00 +00:00
moodler 7e6add3eab Was this checked in by accident? 2006-10-04 15:49:54 +00:00
urs_hunkler 9596181286 merged from 1.6 - MDL-6824 2006-10-04 15:49:41 +00:00
moodler acc26e71bd Reverted my changes to ddlib 2006-10-04 15:35:27 +00:00
moodler a9b1f143d2 Undoing my hacks to try and keep this code clean as possible. 2006-10-04 15:30:54 +00:00
thompson697 eb87ac71c5 Change creation of restorelog file location to protected backupdata folder.
Reassign style and language links
2006-10-04 14:50:50 +00:00
moodler 57bdc37ddb Committed a fix for streaming chat from Dan Polawski, MDL-6791
Seems to help!
2006-10-04 12:58:09 +00:00
tjhunt ed586fb863 Typo. 2006-10-04 11:45:48 +00:00
tjhunt 834e58a9d2 Fix indent. 2006-10-04 10:39:42 +00:00
tjhunt b22fc90182 MDL-6814 - Can't change "maximum grade" value on a quiz. Now you can. 2006-10-04 10:21:23 +00:00
sam_marshall b9f67bd23d [MDL-6701] Added closing </form> tags in wiki admin pages (the pages are still not xhtml, but...) 2006-10-04 10:20:21 +00:00
sam_marshall bdbed68baf Wiki: list of pages to strip in the 'are you sure' message was incorrectly URL-encoded on display to user, this fix removes url encoding and html-encodes it instead 2006-10-04 10:11:15 +00:00
sam_marshall 1e4c8535ef Wiki - fixed 'Strip versions' that didn't work in postgres because of GROUP BY a select alias not being allowed. (Even tested in mysql this time...) 2006-10-04 10:03:02 +00:00
moodler 4e423cbf5d Bye-bye to old database upgrade files and hellow to upgrade.php!
First order of business:  drop all the extraneous user_xxx tables.
2006-10-04 09:47:05 +00:00
moodler eb437bd351 Some changes to ddllib.php to make some functions a bit easier to call.
May not be final ... see MDL-6817 for details.
2006-10-04 09:44:38 +00:00
toyomoyo c0c98c7c78 fixing roles support for backup/restore 2006-10-04 09:01:50 +00:00
vyshane e0539647aa Added $restore->mods[$mod->type]->granular to restore_create_sections() and to restore_create_modules(). This defines whether we are doing a granular restore where we care about the individual module instances to be restored, or whether we are not doing a granular restore, in which case we just restore all course module instances. 2006-10-04 08:35:00 +00:00
moodler 3a4c750bcc FIxed up some more references to user tables 2006-10-04 07:36:58 +00:00
moodler 7b37cb9a01 Added new function
function user_has_role_assignment($userid, $roleid, $contextid=0)
2006-10-04 07:07:57 +00:00
bobopinna acba841b09 Fixed a bad error code choose
Rewritten the GetErrorString function to fix bad error code call
2006-10-04 06:22:18 +00:00
bobopinna e743389667 Added API property version required from ADL Test Suite 2006-10-04 06:18:49 +00:00
moodler 3ede4ecbcb Fixes to remove access to user_coursecreators and use roles instead MDL-6800 2006-10-04 05:36:17 +00:00
moodler 7dfa686dbd Added button to turn editing off again ... ugly but ... 2006-10-04 04:49:44 +00:00
moodler c9f8e57f4a FIxed category editing button 2006-10-04 04:45:58 +00:00
moodler 0baf9f0f23 Fixed roles link a bit 2006-10-04 04:40:55 +00:00
moodler 4610e45b11 FIxed for duplicate icons MDL-6811 2006-10-04 04:37:40 +00:00
moodler ceb7638355 Automatic installer.php lang files by installer_builder (20061004) 2006-10-04 02:56:19 +00:00
toyomoyo 9b5d7a463e fixing typo 2006-10-04 02:43:29 +00:00
toyomoyo 7f8691201c fixed a bug where block instances aren't deleted properly 2006-10-04 02:43:11 +00:00
moodler e020c546c7 Fix for access to users at site level MDL-6810 2006-10-04 02:14:25 +00:00
skodak 793a8c3af7 Assignment Module breaks MyMoodle Page MDL-6802, revisited - I hope it is correct now 2006-10-03 23:34:03 +00:00
skodak 93caac3a72 MDL-6805 Fix redirects in blog - edit button now properly redirects to self 2006-10-03 21:07:13 +00:00
skodak db837673df MDL-6805 Fix redirects in blog; MDL-6807 fix blog capability checks 2006-10-03 20:41:15 +00:00
skodak 290cf2f484 fixed broken table layout in blog MDL-6806 2006-10-03 20:18:58 +00:00
ethem dc754f4f56 Put back last commit. Some functions check $extra->id. 2006-10-03 19:39:21 +00:00
skodak ab2f17b05b Completely disable all blog scripts when blog system disabled from site preferences MDL-6803 2006-10-03 19:21:35 +00:00
skodak 9731624c87 Assignment Module breaks MyMoodle Page MDL-6802, please test it 2006-10-03 18:31:51 +00:00
ethem c008cd2fcf If an error occures, id returns 0.
The user, who will be sent email, may be confused for $record->id=0.
Merged from 16stable.
2006-10-03 18:21:14 +00:00
gustav_delius 1dab3c8384 The course upload size limit applies to students only, it should not be imposed for teacher uploads. 2006-10-03 18:19:38 +00:00
ethem 9c59948e63 * enrol_into_course() doesn't send welcome message unless $course->welcomemessage is set.
This is actually good thing, because we can send our welcome message.

* enrol_into_course() added in Moodle(2006091700), so authorize plugin requires this version.
2006-10-03 18:00:48 +00:00
tjhunt 158e545945 MDL-5601 - restoring a course with a multianswer question sometimes causes an error() for a non-fatal contition. Change it to a notify, and everything seems to work. I don't really understand why, but this change does not make matters worse, so I am committing it. Thanks to Joseph Rezeau. Merged from MOODLE_16_STABLE. 2006-10-03 17:57:16 +00:00
tjhunt 54f306788a MDL-6649 Only show the HTML editor for the first essay question on a page, since it is unreliable when there are lots. Merged from MOODLE_16_STABLE. 2006-10-03 17:32:22 +00:00
stronk7 2ddec1f4ac Changed PG rename_index() to use the old ALTER TABLE ... RENAME TO syntax
(pretty strange syntax, but seems to work)
2006-10-03 15:00:55 +00:00
tjhunt 2da448161a MDL-6297 shuffleanswers option not imported correctly for MC questions. 2006-10-03 14:01:38 +00:00
moodler 921a34d61b Added copyright notice (they paid moodle.com for this development)
http://moodle.org/mod/forum/discuss.php?d=55410
2006-10-03 12:51:24 +00:00
ethem b99cb7fd23 No need extra $order->status check. These functions expired() and settled() do it for us. Merged from 16stable. 2006-10-03 09:05:38 +00:00
toyomoyo 5e67946d6c adding support for 1.6->1.7 backups 2006-10-03 08:54:46 +00:00
moodler 31aab450e0 Removed focussing altogether MDL-6750 2006-10-03 07:31:49 +00:00
moodler 088f12e3ff Automatic installer.php lang files by installer_builder (20061003) 2006-10-03 02:55:32 +00:00
moodler 8ea7e7b0f7 Merged endless loop fix from stable 2006-10-03 01:46:16 +00:00
moodler 50e07a4995 Patched login for discussions 2006-10-03 01:19:35 +00:00
stronk7 cc0bf61676 Now blocks deletion looks both for tables without and with the
"block_" part in table names.
This is an interim situation until "block_" will be required. See:
http://docs.moodle.org/en/Development:Coding#Database_structures
http://tracker.moodle.org/browse/MDL-6786

Also, it's the FIRST use of XMLDB DDL functions inside Moodle! B-)
2006-10-02 23:06:36 +00:00
skodak 5fe9a11d96 more diagnostics in has_capability() - number instead of context object detected and debug message displayed 2006-10-02 22:10:36 +00:00
skodak 403ba37a35 fixed has_capability context parameter in blog 2006-10-02 22:06:18 +00:00
skodak 26d038607a moodle/blog:view usage fixed in blog 2006-10-02 21:15:48 +00:00
skodak 11c467d939 some blog problems fixed - non existing capabilitites, pg incompatibilities;
in anycase the blog is still broken :-(
working on some more fixes now...
2006-10-02 20:50:49 +00:00
skodak a44de9c12f fixed print_texarea() capability requirement 2006-10-02 19:47:11 +00:00
skodak 3055079518 fixed sql text quoting, other fixes in blog ahead 2006-10-02 19:21:26 +00:00
stronk7 f8ca405052 re-enabling the rename_field() test 2006-10-02 17:42:31 +00:00
stronk7 ae5a83e6fd rename_field() under mssql completed 2006-10-02 17:42:14 +00:00
moodler 8303eb8447 Fixes related to presets and MDL-6755.
The original code was shocking once I started reviewing it, and even
after heavy editing I'm still not happy with it, but at least it works
more like it was supposed to.

Needs more cleaning up to make it clearer and probably safer.

Also, presets can now contain langage packs and they'll be used.
The image gallery is an example.
2006-10-02 17:24:54 +00:00
moodler 44abaca047 Added another s() to the query strings. Thanks Petr! 2006-10-02 17:09:18 +00:00
stronk7 c562997ff8 rename_field() under oracle completed 2006-10-02 17:06:37 +00:00
tjhunt ec6adca0f4 MDL-6761 Edit qestion link gone from question preview popup. It was checking the wrong capability. 2006-10-02 17:04:12 +00:00
stronk7 86bb076fc4 rename_field() under postgresql completed. 2006-10-02 17:02:35 +00:00
stronk7 dc7c388280 MySQL doesn't have check constraints. We use enums instead. 2006-10-02 17:02:07 +00:00
mits 2afc256919 Changed the currently selected admin menu bgcolor. 2006-10-02 16:51:48 +00:00
stronk7 f14080b0ad Prevent "id" fields to be renamed in generators 2006-10-02 16:47:02 +00:00
stronk7 6fdea1a0bd In my previous commit, "I" was "It" :-D
Plus one typo fixed.
2006-10-02 16:46:12 +00:00
stronk7 af72e37237 Prevent "id" fields to be renamed. I can cause lots of problems. 2006-10-02 16:37:41 +00:00
mits d917ecd46b Highlight the currently selected admin menu.
Changed admin search result color.
2006-10-02 16:35:34 +00:00
stronk7 0e204a1012 Some adjustments to be able to get names without prefix 2006-10-02 16:28:51 +00:00
stronk7 6c02f04b5a rename_table() under postgresql completed 2006-10-02 16:27:18 +00:00
stronk7 3033991184 Set debug off on tests 2006-10-02 16:26:34 +00:00
stronk7 bb7e5c472c rename_table() under oracle completed 2006-10-02 16:19:48 +00:00
moodler 40cbc8bb70 String should be printed using s() MDL-6779 2006-10-02 16:08:16 +00:00
stronk7 2f21754261 With the emotion, I forgot to delete some debug lines... :-P 2006-10-02 15:57:59 +00:00
stronk7 8aaf86642c rename_table() under mssql completed! B-) 2006-10-02 15:56:34 +00:00
moodler f22e389a41 Added language files to default preset as an example 2006-10-02 15:27:24 +00:00
moodler 53d052d029 Be a bit more flexible with the extra paths (can be a string or an array) 2006-10-02 15:15:23 +00:00
moodler b53b73bdb8 Additional paramter for get_string() that allows the calling code to
specify extra locations for strings
2006-10-02 15:08:25 +00:00
moodler 85489a5b42 Various little cleanups 2006-10-02 14:57:00 +00:00
moodler 94de4ab7f5 Fixed some missing strings 2006-10-02 14:30:28 +00:00
moodler 8eed3b30cf Strip slashes from admin search string (it's ok, it never gets near a database) 2006-10-02 13:35:28 +00:00
moodler 86a1dca773 Fixed overzealous cleaning MDL-6779 2006-10-02 13:26:02 +00:00
moodler 173006a313 Change default (old change not checked in) 2006-10-02 13:10:58 +00:00
moodler e9c82dca8f Fixed capability soring on course and coursecat override MDL-6780 2006-10-02 08:57:00 +00:00
toyomoyo 8020a0162f roles and capability support for backups. role mapping is in, please help test, thanks 2006-10-02 08:49:07 +00:00
skodak 8d9425149f fixed directory creation issues in advanced upload assignment 2006-10-02 08:44:58 +00:00
moodler c84ea828c3 Aligning capability override columns 2006-10-02 08:43:40 +00:00
moodler 2fdc2b9e49 FIxed missing string 2006-10-02 08:40:39 +00:00
moodler bf1e4b9cdc Only show search box when there is content in the block 2006-10-02 08:36:25 +00:00
skodak 8704af63b7 Student cannot see handed-in upload single assignment MDL-6770 2006-10-02 08:36:07 +00:00
skodak 8c408f8e46 assignment intro hiding before available date is now optional in advanced upload type ( MDL-6131 ), the rest of types will not be changed 2006-10-02 08:21:35 +00:00
moodler 27160c814b Cleaned up style for background of admin settings 2006-10-02 07:06:47 +00:00
moodler b4bfcc9c50 Added a missing string 2006-10-02 07:03:41 +00:00
moodler 455065f9ed Bring Sticky Blocks into the admin fold 2006-10-02 06:58:46 +00:00
moodler 203abb60b4 FIxed use of reserved SQL words for MDL-6778 2006-10-02 06:52:21 +00:00
moodler 80ee828de3 Fixed typo in capability name 2006-10-02 06:39:55 +00:00
moodler c5d08a1526 Highlight the currently selected admin menu 8-) 2006-10-02 06:37:58 +00:00
moodler 6fadb97b89 Tidy up admin search box, and fixed 4-spaces everywhere 2006-10-02 06:20:14 +00:00
moodler 36e5266fc1 Added search box for searching admin settings 2006-10-02 06:16:50 +00:00
vinkmar 6140dd8403 added strings for admin search 2006-10-02 06:03:51 +00:00
vinkmar e32df7aab1 links added to section titles 2006-10-02 06:02:52 +00:00
vinkmar e898f2b731 changes made for admin search page 2006-10-02 05:53:39 +00:00
vinkmar 1857cd7ff5 Admin search function.
Takes a "query" parameter... will be written into admintree block
2006-10-02 05:52:39 +00:00
moodler 3172faf70e Automatic installer.php lang files by installer_builder (20061002) 2006-10-02 02:56:19 +00:00
stronk7 cba6b7049a Enabling rename_field() test 2006-10-01 23:06:35 +00:00
stronk7 a2851e5f55 Basic rename_field() function added.
TODO: Automatic sequence/trigger/check constraint recreation
      under PG, MSSQL & Oracle
2006-10-01 23:02:39 +00:00
stronk7 7c07a93223 Added rename_field() support.
TODO: Sync sequences, triggers and check constraints
2006-10-01 22:54:51 +00:00
stronk7 4de0723f31 Added rename_field() support for mssql 2006-10-01 22:52:30 +00:00
stronk7 b5d61bfd9d Added rename_field() support for MySQL 2006-10-01 22:44:39 +00:00
skodak 01194b77ec fixed error in assignments when no students enrolled in course 2006-10-01 21:45:54 +00:00
skodak 29889a2a45 partially fixed - assignment intro always avaible even setting available date MDL-6131 2006-10-01 21:35:16 +00:00
tjhunt cc08091300 Fix performance problem with lots of categories. http://moodle.org/mod/forum/discuss.php?d=54945#252145. Merged from MOODLE_16_STABLE. 2006-10-01 20:32:12 +00:00
skodak bee8703ea5 Advanced Upload assignment type - student can't read teacher's uploaded response file MDL-6771 2006-10-01 20:04:53 +00:00
skodak 87a13824e1 fixed MDL-6625 - can't switch courses 2006-10-01 19:55:47 +00:00
skodak 310471950e Cannot add glossary category MDL-6713 2006-10-01 19:35:27 +00:00
skodak 1d4d2cebe0 left-hand pane on image upload screen is missing MDL-6759 2006-10-01 16:38:26 +00:00
moodler 33b17c67c9 Added IP lookup plugin choice to GUI 2006-10-01 16:25:35 +00:00
skodak a3627bb77d incorrect context used in rss_client block upgrade code MDL-6707 - part of the upgrade code is now rerun in existing installations - new upgrades should be ok, the cleanup of stale contexts and overrides will be done later as part on normal maintenance from cron 2006-10-01 16:17:30 +00:00
stronk7 3832682229 Fixed two bugs in the tests... 2006-10-01 16:08:25 +00:00
stronk7 51517ddc6d Avoid some double updates under PG 2006-10-01 16:02:09 +00:00
stronk7 1f0c7fae15 Now PG adds fields in various steps is order to fulfill 7.4 min req 2006-10-01 15:48:29 +00:00
stronk7 2cfea485a6 Added getDefaultValue() for better handling of default values 2006-10-01 15:47:48 +00:00
skodak ef04568ad3 removing obsoleted calendar.* files from admin area 2006-10-01 14:46:56 +00:00
stronk7 f6ebc34100 Fixed one wrong "return false" plus minor code reorder... 2006-10-01 14:39:50 +00:00
moodler 978c243f69 Disabled log 2006-10-01 13:06:40 +00:00
skodak ea580cdfa6 Recent wiki table changes have problems on PostgreSQL 7.4 MDL-6724 2006-10-01 12:04:34 +00:00
moodler c536c6b04c Some quick styles added to match manage.html MDL-6725 2006-10-01 10:15:50 +00:00
moodler 4fef9b76d1 Fixed links to Risks documentation 2006-10-01 09:59:03 +00:00
skodak c58facdd96 New installation with different prefix in one database fails MDL-6614 2006-10-01 09:47:20 +00:00
moodler 8be977c547 Fixed styles for user listings 2006-10-01 09:33:41 +00:00
moodler 2fdcf5e360 FIx the header too by requiring login to the course 2006-10-01 09:31:49 +00:00
moodler 1a5a5b0e04 Fixed a typo causing MDL-6758 2006-10-01 09:26:50 +00:00
moodler 937b63ee52 Adding some serious checks to make Moodle break when there is any
select, insert or update on user_students, user_teachers, user_coursecreators,
or user_admins (once roles is installed), because they should not be used
at all and we will drop them soon.
2006-10-01 09:16:49 +00:00
moodler cbf643f5f0 Make the sorting of the names always by lastname, to match assign roles 2006-10-01 08:48:58 +00:00
stronk7 abf980a587 Now table renaming is working properly on PostgreSQL
(only renaming of check constraints are pending)
2006-10-01 08:44:55 +00:00
moodler 5b1d599514 Tidied up groups interface to make it a bit more intuitive 2006-10-01 08:37:15 +00:00
moodler b16de84980 get_role_users() can now get all the people who have any role in that context,
which is useful
2006-10-01 08:34:36 +00:00
moodler a971a5985a FIxes for the assign screen, to make it a lot faster and able to cope
better with very large numbers of users   MDL-6766
2006-10-01 08:08:26 +00:00
moodler 7ea02fe987 FIxed some typos in get_role_users and count_role_users to do with parent contexts 2006-10-01 07:02:53 +00:00
gbateson 42cd7a105b do not join "hotpot_attempts" and "hotpot_details" tables when displaying "hotpot/index.php". This should speed display when courses have many HotPot activities, especially for students 2006-10-01 06:39:51 +00:00
moodler 0351730630 FIxed a debugging message 2006-10-01 06:39:20 +00:00
gbateson 172ab53650 add/delete calendar events when adding/updating/deleting hotpots 2006-10-01 06:36:50 +00:00
gbateson 6e69ab8afb added "hotpotopens" and "hotpotcloses" for calendar events 2006-10-01 06:35:54 +00:00
moodler 04186cd965 Improvements to the user listing, security and appearance 2006-10-01 06:18:18 +00:00
moodler ecaf56e5c9 Trivial spelling fix up 2006-10-01 05:49:41 +00:00
moodler 6c95827fdf New implementation of loginas see MDL-6626 2006-10-01 05:46:55 +00:00
moodler 9343a7333a Fixed a bug where load_user_capability() was not checking in the
specified context when it was provided (only in the parents)
2006-10-01 05:27:36 +00:00
moodler bad59bc0ee Some tidying and also a check to make sure that the user was a
participant in this particular course
2006-10-01 05:26:38 +00:00
moodler afe6d00384 FIxed a typo mod->id --> mod->cm 2006-10-01 04:56:43 +00:00
stronk7 20c559dd8d Now Oracle supports table renaming (both sequence and triggers
are kept on sync with the new table name)
2006-09-30 23:48:34 +00:00
stronk7 f086dd7da1 Drop one more table if present 2006-09-30 23:09:41 +00:00
stronk7 4702d62e32 Change slighty the style of RenameKey and RenameIndex functions. 2006-09-30 22:59:10 +00:00
stronk7 a59f3a34f3 Initial commit of rename_table(). Not ended! 2006-09-30 22:40:15 +00:00
skodak 8ad2207965 fixed Fatal error: Call to undefined function: print_recent_activity() when adding Recent Activity as a sticky block MDL-6437 and blocks block database MDL-5931 2006-09-30 21:02:09 +00:00
skodak 7208c579fd fixed missing required_login($courseid) that needs to be done to set up proper global $COURSE; MDL-6697 course/mod.php does not show the right navigation 2006-09-30 20:46:31 +00:00
skodak ba8d802720 MDL-6673 duplicate capabilities in list 2006-09-30 20:11:44 +00:00
mark-nielsen 5491947aa1 NO CODE CHANGES. Just added PHPdoc comments at the top of lesson files. 2006-09-30 19:49:40 +00:00
skodak a1069b070a MDL-6696 Default country doesn't display on dropdown menu 2006-09-30 19:46:10 +00:00
stronk7 142d7fb842 Added one more test to check the EXPERIMENTAL rename_key() function 2006-09-30 19:45:51 +00:00
stronk7 9c4ee55b6c Added rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:44:49 +00:00
stronk7 57770f7a50 Adding support to rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:44:16 +00:00
stronk7 e77fd021e6 Implemented rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:43:16 +00:00
mark-nielsen eefa69ce5c Bug Fix: The dependency drop-down was displaying incorrectly. Fixed up code to use API to gather Lessons correctly. 2006-09-30 19:24:22 +00:00
mark-nielsen b3b4bc44ce BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompted by a menu of options. 2006-09-30 19:00:07 +00:00
stronk7 6c89dc5514 Added rename_index()
Adding support for index renaming. Note that MySQL doesn't support this
but this shouldn't be important at all, mainly because, under xmldb,
accesses to index-names are always done with find_index_name() and
never explicity.
Anyway, this function could be useful in the future to normalize index
names in some Health center or another similar place.
2006-09-30 18:24:14 +00:00
stronk7 1c86ef5b1c Adding support for index renaming. Note that MySQL doesn't support this
but this shouldn't be important at all, mainly because, under xmldb,
accesses to index-names are always done with find_index_name() and
never explicity.
Anyway, this function could be useful in the future to normalize index
names in some Health center or another similar place.
2006-09-30 18:23:00 +00:00
danstowell 15add7bd29 Fixed PHP 4 compatibility re MDL-6753 2006-09-30 17:46:15 +00:00
stronk7 aa8503fdd0 Added 3 more tests to check change_field_enum() 2006-09-30 17:06:59 +00:00
stronk7 61af97e76b Added new function change_field_enum() 2006-09-30 17:06:20 +00:00
stronk7 b899d9bf1d Added support to change_field_enum() across all RDBMS 2006-09-30 17:03:17 +00:00
julmis 9337f3e48d Merging fixes from MOODLE_16_STABLE 2006-09-30 16:07:43 +00:00
stronk7 3650ba6f58 Using the new table_exists() to initialize tests properly. 2006-09-30 15:51:41 +00:00
stronk7 3e1861cc87 Applying the field_exists() check to add and drop fields. 2006-09-30 15:48:23 +00:00
skodak 55b4d09637 new advanced upload assignmet type - replaces old upload type, existing data and settings not fully compatible 2006-09-30 15:41:20 +00:00
stronk7 342da808c5 New function field_exists() to detect if one field exists 2006-09-30 15:35:32 +00:00
stronk7 73d111a820 Add some checks to detect if one table exists before creating or
dropping it. Part of MDL-6614
2006-09-30 15:19:56 +00:00
stronk7 7471f3f0dd Adding some debugging() for some controlled actions. 2006-09-30 15:15:34 +00:00
stronk7 ed37b15464 Moving some uses of find_index_name() to index_exists() 2006-09-30 15:00:46 +00:00
stronk7 cf9a1a40f1 Fixed typo 2006-09-30 14:59:03 +00:00
stronk7 4103c3545c Prevent tables without prefix to be duplicated at install time. MDL-6614 2006-09-30 14:36:52 +00:00
moodler 2c13082db0 Fixed up Preset name 2006-09-30 14:13:22 +00:00
moodler 26ea488855 Don't show progress bar when there's nothing worth showing 2006-09-30 13:52:15 +00:00
stronk7 2719f3e2c9 Inside ddllib, for consistency we call parameters table, field...
(without the xmldb_ prefix)
2006-09-30 13:04:17 +00:00
stronk7 a504ba0213 Added index_exists(). One wrapper over find_index_name() 2006-09-30 12:56:39 +00:00
stronk7 512a237ff6 One more use of getTableName() added. 2006-09-30 12:34:17 +00:00
stronk7 9af19c728d Extendig use of new getTableName() over all generators 2006-09-30 12:13:07 +00:00
stronk7 97b9178459 New getTableName() function to get normalised table names everywhere 2006-09-30 12:03:19 +00:00
stronk7 68bc165bed Added new function table_exists() to be used later... 2006-09-30 12:01:33 +00:00
stronk7 87c6baf4a1 Ah! forgot to interchange keys and values! 2006-09-30 11:09:44 +00:00
stronk7 ef18962b00 Execute the index_get_name() silently to avoid a lot of
output in the install/upgrade process. Original db->debug
is re-set to their original status once executed.
2006-09-30 10:54:37 +00:00
moodler d4484f3209 IFxed some notices when the block was used on sticky blocks page. MDL-6620 2006-09-30 08:22:17 +00:00
stronk7 4fae686bc2 Enablig PHP generation of code for change_field_type() 2006-09-29 23:12:40 +00:00
stronk7 cec4b7c621 Added to more tests to check float <---> char conversion 2006-09-29 23:10:31 +00:00
skodak 7d47261645 towards new upload assignment - expect brand-new version tomorrow :-) 2006-09-29 21:45:04 +00:00
skodak 03bfaba1fd fixed parameter cleanup SC#318; merged from MOODLE_16_STABLE 2006-09-29 20:54:15 +00:00
stronk7 6e152cc621 Now basic types of conversion (int2char, char2int, number2char, char2number)
are working properly under all RDBMS.
2006-09-29 17:49:04 +00:00
stronk7 b0cd86786b Change one test a bit... 2006-09-29 17:29:08 +00:00
vyshane d1cc283172 Fixed wrong context bug 2006-09-29 08:58:02 +00:00
vyshane 825d73aa33 Fixed missing separator (MDL-3975). 2006-09-29 07:28:11 +00:00
bobopinna aaa267965a Moved to scorm_1x.js.php 2006-09-29 06:45:25 +00:00
bobopinna ea5928ee16 No more used 2006-09-29 06:43:58 +00:00
moodler 76389cec17 Fixed the upgrade from 1.6.x. The role->shortname field was not being created. 2006-09-29 06:43:42 +00:00
bobopinna 5a40140ec4 New icon to support toc bug fix 2006-09-29 06:43:36 +00:00
moodler aae37b638c Added progress bar to role assignments during upgrade 2006-09-29 06:41:10 +00:00
bobopinna cfc74f324c Changes no datadir error message from bad manifest to bad package 2006-09-29 06:29:10 +00:00
bobopinna 3c6c4eaf66 Fixed completed status for launched Asset 2006-09-29 06:27:47 +00:00
bobopinna 172ec29fcc Added _ to version data element 2006-09-29 06:26:36 +00:00
bobopinna 530a61d5d3 Fixed a bug in toc display 2006-09-29 06:25:56 +00:00
bobopinna 98baddf710 Added some strings 2006-09-29 06:20:53 +00:00
moodler 72da504606 Added a progress bar for the role assignments 2006-09-29 06:19:47 +00:00
moodler dcc6b7c483 Add MS-SQL to installer :-) 2006-09-29 06:11:47 +00:00
toyomoyo ae8402fe38 fixing a redundant order by clause 2006-09-29 05:46:02 +00:00
toyomoyo a0db31e7e5 commentary text renamed to general feedback 2006-09-29 05:45:24 +00:00
moodler ea35ab87d9 Header and footer should include $CFG->header and $CFG->footer, just in
case the chosen theme doesn't exist any more
2006-09-29 05:43:48 +00:00
moodler 459c1ff12a Just tidying up code while reading it 2006-09-29 05:35:37 +00:00
toyomoyo 39ecfc7453 added a new temp config variable to help track maint mode before and after migration MDL-6182, not fixing in stable yet due to the lack of support of unset_config function. 2006-09-29 03:10:38 +00:00
moodler 721146820c Slight change to Copyright notice to link to our License page, not Gnu site 2006-09-29 02:39:39 +00:00
toyomoyo ed59cd6ea4 fix for MDL-5670 2006-09-29 02:19:27 +00:00
stronk7 72fa544947 Moving some tests up and down and introducing some more
tests about changing column types. Not working yet unded mssql
2006-09-28 23:16:29 +00:00
stronk7 f020b35705 Moving some change_field_XXX() functions and introducing
change_field_type(). Seems to work everywere but under
mssql (due to some problems with default constraints).
Will see it tomorrow.
2006-09-28 23:14:52 +00:00
stronk7 599caff8c5 prevent nulls to become nulls (oracle error)
and defaults null to become defaults null
when temporary columns are used
2006-09-28 23:06:04 +00:00
stronk7 531bf26489 Adding two more tests (create and drop foreign keys) 2006-09-28 22:11:06 +00:00
stronk7 5adc951c4f Don't rely on index names to decide if we have to drop one key 2006-09-28 22:05:11 +00:00
stronk7 d54f85efa6 minor adjust. keytype to drop keys is not needed anymore. now it's
defined in mysql generator (the only one needing it)
2006-09-28 21:47:36 +00:00
koenr 2c79612205 one more 2006-09-28 21:32:20 +00:00
koenr 2c0d423d8c few typos. Thanks a lot for spotting Mits! 2006-09-28 21:31:34 +00:00
koenr 8f36981c51 fixed MDL-3484 2006-09-28 20:58:55 +00:00
stronk7 ac5ff0e787 fixed one wrong constant 2006-09-28 20:12:00 +00:00
stronk7 9c46a7e6f9 changed mysql drop index syntax. Nothing relevant. 2006-09-28 20:11:30 +00:00
stronk7 71ea93e023 Argh! More than 3 hours searching for this error! I was calling one
constructor with wrong number of parameters and PHP said nothing at
all (with DEVELOPER level of debugging). Horrible OOP !
2006-09-28 20:06:08 +00:00
stronk7 53d3b80798 prevent some warnings on tables without indexes 2006-09-28 19:43:17 +00:00
stronk7 4690f076ca Now keys and indexes are PERFECT (argh, Oracle, once more was causing problems) 2006-09-28 18:56:21 +00:00
stronk7 4df8b6cdfc some more settings go to XMLDBGenerator (as they are default) 2006-09-28 18:39:33 +00:00
stronk7 1a275daaaf some more settings go to XMLDBGenerator (as they are default) 2006-09-28 18:31:28 +00:00
skodak 30fce5000a removed one more unneeded file from adodb library 2006-09-28 18:29:54 +00:00
mits 15cfddc323 Fixed addmin setting colors. 2006-09-28 17:48:12 +00:00
stronk7 a8b7de48fe Adding some more tests about adding and dropping keys 2006-09-28 17:35:52 +00:00
stronk7 55c4b9435d add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:30:14 +00:00
stronk7 fac17f427f add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:25:00 +00:00
stronk7 0852990f9b Deleting some parameters that aren't needed anymore. Code will
decide if creating underlying indexes for keys automatically now.

Also, add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:20:21 +00:00
stronk7 662244cb77 Deleting some parameters that aren't needed anymore. Code will
decide if creating underlying indexes for keys automatically now.
2006-09-28 17:02:49 +00:00
stronk7 b399c397bf Added PHP 5.0.x restriction to Moodle 1.7. MDL-5653 2006-09-28 16:46:52 +00:00
skodak 8ba4cbd2a3 reverting last commit, expect new fixes soon 2006-09-28 15:34:54 +00:00
moodler b7b0afb87f Fixed a capability name: MDL-6727 2006-09-28 15:06:07 +00:00
moodler 5e6893720e Guest should not see My Courses MDL-6736 2006-09-28 14:48:29 +00:00
gbateson f7f630bce7 added PARAM types to calls using "required_param" and "optional_param" functions 2006-09-28 13:24:36 +00:00
jamiesensei 909ec807cb moved styles in theme\standard\styles_form.css to theme\standard\styles_layout.css and removed theme\standard\styles_form.css and all references to it. In line with discussion here : http://moodle.org/mod/forum/discuss.php?d=54907 2006-09-28 10:32:23 +00:00
toyomoyo 89a66e5405 changes in backup/restore for roles. fixed bug related to wrong context in backuplib.php added code to handle addition of new roles in restorelib.php, added code to do role overrides in restore.php new functionalities requires proper handling 2006-09-28 09:15:14 +00:00
moodler 8d73640e7f Unenrol fixed to support other users too and better workflow 2006-09-28 08:55:04 +00:00
moodler 41763b02da One more debugging removed 2006-09-28 08:38:27 +00:00
moodler 130672189c Removed excess debugging that is no longer very useful 2006-09-28 08:37:19 +00:00
vyshane 9ed7d7e162 Merged fix for MDL-6681 2006-09-28 08:29:17 +00:00
vyshane cef1ce6abf Fixes for MDL-3975
Changes to discuss.php and post.php so that the single discussion type forums are handled more consistently.
2006-09-28 07:29:50 +00:00
moodler eae2bad46f Updated tags 2006-09-28 07:22:36 +00:00
moodler 2d14e8a8fe Removed duplicate capability moodle/course:managequestions MDL-6610 2006-09-28 07:17:39 +00:00
moodler 9e27d59600 Documentation and strings for Default Role 2006-09-28 07:07:54 +00:00
moodler 605522f315 FIxed heading on assign roles in course context 2006-09-28 07:00:28 +00:00
moodler 70ce923e0a Fixed a typo 2006-09-28 06:48:50 +00:00
moodler 77c645df28 Started out fixing MDL-6624 and it turned into a fairly major cleanup
of the participant listing.  I think it's a lot better now.

Bulk messaging fixed too, and is controlled by a new capability

      moodle/course:bulkmessaging
2006-09-28 06:41:07 +00:00
moodler 3e21903846 Cleaning up user index a bit 2006-09-28 06:04:39 +00:00
vinkmar 3b904bc94f calendar admin page cleaned up 2006-09-28 04:46:09 +00:00
moodler b90e2f199f First cut at an overview page for the user listing (when you first arrive) 2006-09-28 04:45:39 +00:00
moodler bac2f88ae8 Added count_role_users() as a more efficient thing to do than get_role_users() 2006-09-28 04:42:49 +00:00
jamiesensei 15fdf6199e wrapping group element in a fieldset tag 2006-09-28 04:19:56 +00:00
jamiesensei ec929cd596 now wrapping a group element in a fieldset tag, brought id tag on checkboxes and radio boxes in line with moodle universal form structure 2006-09-28 04:18:35 +00:00
martinlanghoff f5896f0fb6 enrol/db/enrol.php ignore delt'd usrs when enroling
Previously the import process would throw a non-fatal error when it found a
non-one number of users with the remote key.  This meant that
when there was a deleted user with the same remote key as an existing user, it
would throw an error, and report that there were no users for that remote key.
Fixed it so that it now ignores deleted users, and provides more accurate
and more precise error messages in the event that there are further
problems.

Author: Peter Bulmer
2006-09-28 01:20:42 +00:00
martinlanghoff 13e8d6e46f auth/db/lib (bugfix) only update mdl fields during login if 'onlogin' set
Previous operation was update all moodle fields from the external database
during each login & sync ignoring this setting. Now if this setting is
'oncreation' then the field is only copied once (on creation of user).
2006-09-28 01:05:10 +00:00
martinlanghoff 897e0712e8 Comments. 2006-09-28 00:13:07 +00:00
martinlanghoff c0adb54de4 Allow Chinese/Japanese UTF-8 strings to be truncated at character
boundaries instead of word boundaries. (fix MDL-5378)
2006-09-28 00:10:23 +00:00
martinlanghoff 6402cd4679 Fix for breadcrumb problem (MDL-6271). 2006-09-28 00:08:50 +00:00
skodak 250934b8e0 fixed logic of moodle_install_roles() - it now calls update_capabilities() after creation of default roles, but before first role_assign(). The problem was that role_assign calls code from forum lib which already uses capabilities, this might cause even bigger problems later. 2006-09-27 22:59:37 +00:00
jgraham909 6fc73d59b8 Merging in changes from Doug Dixon and Mike Lee to update the codebase 2006-09-27 22:57:33 +00:00
skodak 6727c1753f added default settings for admin_setting_special_backupdays() 2006-09-27 22:25:15 +00:00
skodak 5d0df39db4 fixed array_shift($roles) warning during upgrade from 1.6 2006-09-27 22:16:23 +00:00
skodak 1cd3eba948 fixed validation of course category for site course MDL-6715 2006-09-27 20:43:04 +00:00
jamiesensei 49c5368707 changes to html structure for rendering of forms in line with http://moodle.org/mod/forum/discuss.php?d=54907#250816 2006-09-27 19:12:52 +00:00
jamiesensei 57a763a733 changes to style sheet in line with http://moodle.org/mod/forum/discuss.php?d=54907#250816 2006-09-27 19:10:31 +00:00
stronk7 97bd35b284 Fixed bug in PHP generation of indexes. 2006-09-27 18:47:24 +00:00
skodak 7bfa3101df add checks for stale contextid in role_assignments and overrides into load_user_capability() MDL-6708 2006-09-27 18:11:36 +00:00
skodak a36a3a3f98 added strict context level checks to get_context_instance() MDL-6709 , the reason is to find typos and buggy code that would be otherwise unnoticed 2006-09-27 17:58:17 +00:00
skodak 3ca2dea51d sanitise request in create_context() and show debug info when appropriate MDL-6715 2006-09-27 17:50:53 +00:00
stronk7 13e9de1c67 Fixed Bug MDL-6647 - PG version not being fetched properly.
(http://tracker.moodle.org/browse/MDL-6647)
2006-09-27 17:48:45 +00:00
moodler 05e8f81eeb A notice about versions 2006-09-27 16:45:40 +00:00
jamiesensei f0e2d0ac80 upgraded tableless pear quickform packages 2006-09-27 16:31:11 +00:00
jamiesensei 04ad8eee82 added empty setHelpButton method to moodleform_hidden 2006-09-27 16:09:15 +00:00
jamiesensei e249661fbb fixed small typo 2006-09-27 16:07:37 +00:00
jamiesensei ef625b6bac added comments to show how to add nested fieldset container for groups of items 2006-09-27 16:06:56 +00:00
jamiesensei 42f248e659 new security features added acceptGet, optional_param, required_param, clean_param, methods added to form class 2006-09-27 16:00:19 +00:00
jamiesensei 5f2256f3ee modifications made to demo new security features 2006-09-27 15:58:45 +00:00
jamiesensei 7b9cdb60cf demos new security features optional_param, acceptGet 2006-09-27 15:57:21 +00:00
moodler 924ccd683a Fixed up some wrong entries in the log_display table MDL-6516
NOTE:  The dates are a month in advance for $version here!  We need
to increment very slowly until it catches up, and make sure that we
manage the versions in HEAD very carefully after we branch for 1.7
2006-09-27 14:08:17 +00:00
moodler bd10f85d94 Add eu to allowed domains 2006-09-27 12:57:33 +00:00
sam_marshall 4db1861a8d Wiki: Improve page locking to make it more robust and support non-javascript users (not very friendlily, though...) 2006-09-27 11:22:57 +00:00
sam_marshall 5c135dd4fd Wiki: correct behaviour in Postgres with pages that have ' in name 2006-09-27 11:21:59 +00:00
sam_marshall 13ef403f3b Wiki: correct column type on Postgres update (fixes Search and Links tabs, matches what's in install.xml anyhow) 2006-09-27 11:21:01 +00:00
sam_marshall 228501678b Wiki: Fix wiki-linking to not be case-sensitive. 2006-09-27 11:20:16 +00:00
sam_marshall 86ec052fa5 Changed wiki help to clarify that the wiki markup only works when not using the WYSIWYG editor. (This was seriously confusing our users!) 2006-09-27 11:18:40 +00:00
skodak 90eca94be8 fixed incorrectly quoted $LIKE in forum recent activity sql 2006-09-27 10:44:25 +00:00
skodak 421f60f9c9 fixed default proxyport value 2006-09-27 10:30:54 +00:00
skodak 3c8ecb0cbb fixed incorrect user id when updating in uploaduser.php 2006-09-27 09:50:48 +00:00
moodler 4e03aa7a00 FIxed up log headers etc MDL-6714 2006-09-27 09:22:29 +00:00
toyomoyo a2a020ea6b adding support for roles in backups 2006-09-27 08:59:27 +00:00
moodler bea0bd7725 CHecking Enrique Castro's fix for MDL-6366, to help wiki pagenames not get reset 2006-09-27 08:49:42 +00:00
moodler 0cfafdc769 Fixed MDL-6334 by removing the group-setting popup 2006-09-27 08:29:24 +00:00
moodler 1bbcb7c01a Some more debugging in course/rest.php (to error log) 2006-09-27 08:02:26 +00:00
moodler bccdf22764 Fixed a possible notice 2006-09-27 08:01:22 +00:00
moodler 15a169222b Some extra changes from the duplicate work I did on upgradesettings.php
main change is that adminsettings is now an ID on the form
2006-09-27 07:49:34 +00:00
moodler 2b2d182aa7 Fixes for empty logs array MDL-6145 2006-09-27 07:41:38 +00:00
vyshane acad3401f1 Reverting first until we have a fix for converting the wrong context levels 2006-09-27 07:18:25 +00:00
vyshane 4b69085833 CONTEXT_MODULE should really be CONTEXT_BLOCK 2006-09-27 07:11:06 +00:00
bobopinna e54a9c39cf Added skipview field backup and restore 2006-09-27 06:58:28 +00:00
stronk7 d335bebc06 Added support for add_index() and drop_index() 2006-09-26 23:17:24 +00:00
stronk7 42d1fc2f3f XMLDBTable wrappers to create and drop indexes 2006-09-26 23:16:09 +00:00
stronk7 618a982eed Now all the generators support creating and dropping indexes 2006-09-26 23:15:20 +00:00
stronk7 0c31ba2813 Adding test for create index and drop index. 2006-09-26 23:08:44 +00:00
stronk7 b0d8444349 Fix one place where index->type was being used instead of index->unique 2006-09-26 22:46:05 +00:00
skodak 6859360cd4 coverted /admin/ to proper /$CFG->admin/ in paths 2006-09-26 21:10:14 +00:00
skodak eee90c06b8 upgradesettings.php now using the same CSS as settings.php , part II. 2006-09-26 20:54:05 +00:00
skodak d8c5baee04 upgradesettings.php now using the same CSS as settings.php 2006-09-26 20:51:28 +00:00
urs_hunkler 86f5774d0b 'changed width of label from 40% to 30% to make the textarea fit' 2006-09-26 19:30:57 +00:00
urs_hunkler f2e101239b 'added width and height to qfrow to make it render correcly in FF, changed qfelement to display:block' 2006-09-26 19:23:28 +00:00
skodak fbc88f3886 fixed legacy comment upgrade code in assignment and journal 2006-09-26 19:18:21 +00:00
stronk7 ceac2552ef Added support for PHP generation on create/drop/rename indexes and keys 2006-09-26 19:05:55 +00:00
stronk7 48eac31328 Replaced XMLDB own implementation of the concat function to use
the new, ultra-cool, ADOdb based, concat_sql(). Thanks, Martin Langhoff!
2006-09-26 18:34:48 +00:00
stronk7 66841aed29 One wrong use of onespace2empty() - an strange function - :-/
in the DIRTY HACK was causing not info to be returned under Oracle
by the get_field_sql() function, so sequence numbers were broken.
2006-09-26 18:27:44 +00:00
stronk7 1d5071a57e Don't CREATE OR REPLACE TRIGGER but just CREATE it
(so we'll be able to detect duplicate name with an
error instead of getting false success)
2006-09-26 18:10:27 +00:00
mits e88ecd1b08 Brushed up theme oceanblue. 2006-09-26 18:00:27 +00:00
stronk7 2efd67bf5f Increasing log_display->field because sql_concat() (one
wrapper over ADOdb Concat() generates really long
expressions for MSSQL.
2006-09-26 17:43:37 +00:00
stronk7 7bd1b4f5ba Ops, scorm->skipview default must be 1 2006-09-26 16:58:49 +00:00
jamiesensei 5ae7038594 modified api to create an htmleditor element 2006-09-26 16:40:35 +00:00
stronk7 59e3e96277 copy/paste typo 2006-09-26 16:27:39 +00:00
stronk7 d5a28fdae9 Adding scorm->skipview to PostgreSQL 2006-09-26 15:56:18 +00:00
stronk7 d107d19057 Adding scorm->skipview to XMLDB file! 2006-09-26 15:25:29 +00:00
bobopinna 8e45ba4522 Added the new features MDL-4482 and MDL-6534 (Course structure view.php skip) 2006-09-26 14:40:00 +00:00
bobopinna 57d52eebfa Fixed a bug in mode selection 2006-09-26 14:37:13 +00:00
bobopinna 32cfa4dbf8 Added skip view page feature 2006-09-26 14:25:59 +00:00
jamiesensei f8857b4925 adding static element class to registry of Moodleform elements 2006-09-26 13:55:51 +00:00
urs_hunkler d345a18967 'added space before styles_form to correct CSS loading' 2006-09-26 13:48:00 +00:00
jamiesensei eb476e4adb file describing a static form element for moodle with setHelpButton method 2006-09-26 13:32:15 +00:00
moodler f1dcf0000a Checked in Nick's patch from MDL-6699 to aid installation when there
are a LOT of students (it was running out of memory)
2006-09-26 13:31:57 +00:00
moodler d22130f36d Added a PEAR extension that was missing, and permission from
Mark Wiesemann for his renderers.   Yay!
2006-09-26 12:07:48 +00:00
jamiesensei 2462a50af3 changed some assignments to assignment by reference when instantiating objects. 2006-09-26 11:13:51 +00:00
bobopinna a9d22c84b6 Fixed a problem with Firefox 2006-09-26 10:26:03 +00:00
bobopinna c9a2f27e80 Downgraded a new feature to fix the module 2006-09-26 10:23:37 +00:00
jamiesensei 80f962df90 * added error message for setHelpButton method not existing
* modified htmleditor class so that differences in formatting for this element are defined by css but use the same html
* added type name of element classes to css wrapper class names
2006-09-26 09:42:42 +00:00
mits 51d59bbb08 Brushed up theme oceanblue. 2006-09-26 09:39:10 +00:00
skodak 62f62bf984 admin bookmark cleanup 2006-09-26 09:25:37 +00:00
moodler a3d23679e6 We have permission for HTML_Quickform and HTML_Common
...


Bertrand Mansion
http://www.mamasam.com      - creative internet solutions
http://golgote.freeflux.net - blog
2006-09-26 09:12:21 +00:00
toyomoyo 1ad590e153 more changes, restoring of role assignments now work in course, mods and blocks instances (less user instance), restoring local overrides do not work 2006-09-26 09:05:44 +00:00
skodak 6de2a7b6c8 fixed another missing global $CFG 2006-09-26 08:49:47 +00:00
vyshane 83da3d286c Fix for MDL-3975. Also added function in rsslib.php to delete cached RSS feeds for the source and destination forums when moving a discussion between 2 forums. 2006-09-26 08:37:56 +00:00
bobopinna d292466ca6 Moved in datamodels directory 2006-09-26 08:21:46 +00:00
bobopinna 9096a47876 Not used for now 2006-09-26 08:20:23 +00:00
skodak 9e24fbd14d basic validation fix for text admin settings 2006-09-26 08:16:17 +00:00
bobopinna dc383b6f23 Splitted all the scorm/aicc library in type separeted files 2006-09-26 08:00:16 +00:00
bobopinna d380567f82 Fixed a problem with reporting and multiattempts 2006-09-26 07:57:33 +00:00
bobopinna a30b6819fc Fixed some problems with reporting and multiattempts 2006-09-26 07:56:07 +00:00
skodak 8e00b731e1 fixed defaults 2006-09-26 07:39:04 +00:00
moodler f67f8e8cb5 Updated README for MDL-6693 2006-09-26 07:17:54 +00:00
skodak 9a76d7b9ea fixed autologinguests warning 2006-09-26 06:34:29 +00:00
skodak 05f8f7e76b fixed missing global $CFG 2006-09-26 06:31:18 +00:00
skodak 2c1f712c16 file delete and rename warnings polished 2006-09-26 06:29:04 +00:00
toyomoyo 912c1fd5a2 correct xml parsing for mod level assignment and override 2006-09-26 06:02:10 +00:00
martinlanghoff c4121640be user: remove deprecated sql_paging_limit(), use offset, limit parameters 2006-09-26 05:11:50 +00:00
martinlanghoff ea9a729f80 mod/lesson, mod/quiz: remove deprecated sql_paging_limit(), use offset, limit parameters 2006-09-26 05:11:29 +00:00
martinlanghoff 1ad5c6380f mod/quiz: remove deprecated sql_paging_limit(), use offset, limit parameters 2006-09-26 05:11:05 +00:00
martinlanghoff 1e7368e782 dmlib: set_field() now has the Oracle DIRTY HACK too! 2006-09-26 05:10:39 +00:00
martinlanghoff 5a55af6097 dmlib: Add Oracle dirty hack cleanup to recordset_to_menu() get_field_sql() and get_fieldset_sql()
This covers most (all?) the gaps in data retrieval except get_recordset_sql().

To tackle get_recordset_sql,  where the actual data retrieval is done within
AdoDB, we would have to to wrap around AdoDB with a subclass, but that would
be dirty, dirty, dirtier.
2006-09-26 05:10:18 +00:00
martinlanghoff 44f9885044 sql_concat(): fixed param order thinko -- and now it works too! 2006-09-26 05:09:48 +00:00
martinlanghoff b4dd303a97 search: removed dbtype-specific select - MySQL can now handle grownup syntax 2006-09-26 05:09:26 +00:00
martinlanghoff 47dc28e53c search: fixed mysql-isms - tablenames without prefix and with backticks 2006-09-26 05:09:01 +00:00
martinlanghoff 7e034f29a0 searchlib can use sql_ilike too! 2006-09-26 05:08:39 +00:00
martinlanghoff a8f4522dfa data, forum, glossary: use sql_ilike() for a portable LIKE operator 2006-09-26 05:08:18 +00:00
martinlanghoff 95008f81c6 sql_ilike() -- added notes on Oracle support or lack thereof 2006-09-26 05:07:28 +00:00
martinlanghoff 6eb7722f93 message/lib.php: use sql_ilike() 2006-09-26 05:07:05 +00:00
martinlanghoff d2715c70b6 mod/glossary, mod/hotpot: use sql_concat() and sql_concat_join()
Cleaned up several dbtype conditionals too.
2006-09-26 05:06:44 +00:00
martinlanghoff 38e02f4c32 Introducing sql_concat_join($sep, $array) helper
returns the SQL to do the equivalente of a join() or implode()
on the DB server. Watch the RDBMS work! ;-)
2006-09-26 05:05:54 +00:00
martinlanghoff 92a2d92a82 message_history_link() - replace use sql_concat() and sql_like() 2006-09-26 05:05:32 +00:00
martinlanghoff 27176468fe mod/quiz: replace $db->Concat() with sql_concat() 2006-09-26 05:05:10 +00:00
martinlanghoff ea59864f45 course/lib.php: remove unused global 2006-09-26 05:04:40 +00:00
martinlanghoff 4068bedb83 Use sql_concat() in course/lib.php 2006-09-26 05:03:46 +00:00
martinlanghoff 0ce96669c9 Introducing sql_concat() - and use it in sql_fullname()
sql_concat() is just a passthrough to $db->Concat() -- it doesn't
add any value, and I think the dispatching is somewhat expensive.

Just using $db->Concat() should be good enough, were it not for
consistency in our DM API.
2006-09-26 05:02:59 +00:00
mjollnir_ 6e58026b29 recredited the sql_primary_role_subselect function to correct author (much as I would like to claim it) 2006-09-26 04:41:45 +00:00
moodler 74b345880d Changing error to notify so that it's not fatal (and doesn't leak server data) 2006-09-26 04:38:00 +00:00
moodler 867f5adb73 Moved Penny's funky sql function into dmllib.php 2006-09-26 04:33:59 +00:00
toyomoyo 637644fbd1 fixing a get_record bug (multiple instances) 2006-09-26 04:10:33 +00:00
moodler 329f40b003 Changed CONTEXT_SITE to CONTEXT_SYSTEM MDL-6506 2006-09-26 03:57:05 +00:00
mits 9c7f2782c6 Brushed up theme oceanblue. 2006-09-26 03:20:40 +00:00
moodler 3c9188cad2 Automatic installer.php lang files by installer_builder (20060926) 2006-09-26 02:47:16 +00:00
vyshane ee8e000823 Fixed bug in forum_make_mail_post() 2006-09-26 02:02:27 +00:00
toyomoyo 71dd89ff09 fixing missing $ 2006-09-26 01:50:17 +00:00
toyomoyo 4c81f5511e adding roles support for restore 2006-09-26 01:43:07 +00:00
mits 720353b2c9 Fixed visibility. 2006-09-26 01:38:17 +00:00
mjollnir_ 87c75906ed update enrol/ldap to work with roles.
Credit: Alastair Pharo <alastair@catalyst.net.nz>

1) Some config settings have changed (ones that related specifically to
teachers and students).  There is a check in place however to migrate
old configurations to new ones.

2) Perviously two syncs happened - one for students, one for teachers.
Now sync gets called the same number of times as there are roles.
Those roles that have config settings associated with them then run
through all the records.  This means syncing takes longer the more
roles you configure (which is expected anyway I suppose).
2006-09-26 01:31:33 +00:00
mjollnir_ 7ccf89f50a update enrol/database to use roles.
Credit: Alastair Pharo <alastair@catalyst.net.nz>

Database
--------

1) This plugin previously only worked for students.  I have made it so
that you can _optionally_ specify a third column in your external
database that contains some kind of role information (similar to the
other two fields, you can choose any column in the mdl_role table
to map to).  If you do this, then the code loops over for each different
kind of role and queries the external database.

2) There is a *slight* problem to be aware of, if a moodle
configuration was upgraded to use the new role columns, then downgraded
again, some roles might get left behind in the database when the
large-scale sync thing goes through (that is, record pruning doesn't
scale back quite properly). These would be cleaned away by
setup_enrolments at login time, however, and the scenario was unlikely
enough for me to decide to leave it for now.

3) If you don't have role columns there is a 'default role' setting
that you can set (made by Martin D).  This will only be obeyed when no
role columns are specified.  If this is set to 'default', then the
course default role is used, on a per-course basis (which usually
means student apparently).

4) From (3), my understanding is that if no config settings are
changed, and the default role for all upgraded courses is student, that
a smooth upgrade to 1.7 will occur for users of the database enrolment
plugin.
2006-09-26 01:30:32 +00:00
mjollnir_ 7d49253f40 Here's a little patch for auth/ldap/lib.php... just stops some
errors from popping up.
Credit: Alastair Pharo <alastair@catalyst.net.nz>
2006-09-26 01:26:27 +00:00
mjollnir_ 75673b93f8 fixing the participants report to work with roles 2006-09-26 01:23:57 +00:00
moodler cfd6b5053f Fix for typo MDL-6537 2006-09-26 01:11:53 +00:00
stronk7 ef47a3eb5b Fixed display of files 2006-09-25 23:09:16 +00:00
stronk7 8e81509277 Added one woody style for all the admin fieldsets 2006-09-25 22:57:20 +00:00
stronk7 313b5a3550 Minor changes to improve behaviour of selections. 2006-09-25 22:53:39 +00:00
stronk7 b017120ce0 Ops! I forgot to commit this 2 days ago! Now a lot of
data fields will be null!
2006-09-25 22:48:43 +00:00
stronk7 0db2d6bb98 Prevent NOT NULL fields to have one DEFAULT NULL clause 2006-09-25 21:44:21 +00:00
stronk7 a653016d94 Some notes:
- Foreign keys are really cool (at the XMLDB Editor). Define them as necessary
  as they allow as one "formal" structure of the DB. They won't cause problems
  on generation, mainly because only the underlying index will be created.
- Please, put comments inside each table/field/key/index field, mainly because
  XML comments will be deleted if the file is edited by
- The XMLDB Editor. Please use it ;-)
- Also, one unique index was wrong in the XML file, fixed now.
2006-09-25 21:37:29 +00:00
mjollnir_ 4834fe627b fixing a string that referred to students and teachers in the config settings for stats 2006-09-25 20:59:00 +00:00
skodak c9a49ceab4 major cleanup of unsupported and legacy external pages in admin/; created new hidden unsupported category; some other minor fixes and changes 2006-09-25 20:22:55 +00:00
stronk7 6caa705dad Some more strings added...related with the View PHP utility 2006-09-25 19:26:16 +00:00
skodak 7d1df3a49d moodle specific developer debug messages disabled in admin/dbperformance.php page, because they might interfere with frames 2006-09-25 19:05:04 +00:00
skodak fa323030fa XMLDB editor now has admin-tree block 2006-09-25 18:29:50 +00:00
stronk7 812e363a39 Now generators support to add/drop column defaults 2006-09-25 18:22:06 +00:00
skodak c0a1aae3e2 admin/upgradesettings.php is now proper hidden external page with correct breadcrums ;-) 2006-09-25 18:21:59 +00:00
stronk7 aa134ecf17 Now the tests are performed with real data (2 records). Added 4
more tests to check compatibility of set/drop defaults...
2006-09-25 18:20:08 +00:00
sam_marshall 98a7359506 change from UNIQUE KEY to UNIQUE INDEX 2006-09-25 17:49:33 +00:00
sam_marshall 5cee80e183 (prev. wiki fix) Fixed broken constant defines 2006-09-25 17:47:35 +00:00
skodak d249e478d4 fixed hidden misc sectionin admin tree block, sorry 2006-09-25 17:44:43 +00:00
sam_marshall 22e846cde2 Wiki enhancement: edit locking (uses AJAX) 2006-09-25 17:42:32 +00:00
danstowell f775a510d6 Updated IMS Enterprise enrolment to Moodle 1.7 role infrastructure - MDL-6656 2006-09-25 17:21:07 +00:00
danstowell 26ba09125b Updated IMS Enterprise enrolment to Moodle 1.7 role infrastructure 2006-09-25 16:58:06 +00:00
sam_marshall 4488daf7ad File had a UTF-8 BOM at the start, was causing problems, now removed 2006-09-25 14:59:21 +00:00
jamiesensei 1629424dbb added styles_form to $DEFAULT_SHEET_LIST part of the code necessary so that every theme loads styles_form 2006-09-25 14:56:45 +00:00
moodler a06c8c2cd1 Fixed some width="*" in layout tables 2006-09-25 14:40:26 +00:00
sam_marshall 479eea4149 Removed trailing blank line at end of file (was breaking things) 2006-09-25 14:35:41 +00:00
moodler 1beed35f71 Added some form-groups on the htmleditor page 2006-09-25 14:34:33 +00:00
moodler fc52aa6e14 Cleaning up the id and class for each setting 2006-09-25 14:18:16 +00:00
skodak 499c621417 fixed quoting error 2006-09-25 14:15:55 +00:00
skodak a69be0d861 improved handling of resource file/directory references when renaming and deleting files in file manager. It is now fully configurable too. MDL-6132 2006-09-25 14:12:46 +00:00
vyshane 7c900d5d62 Changed to require_capability where possible 2006-09-25 13:14:50 +00:00
moodler 86328d5821 Added strings for Trusted Content 2006-09-25 13:14:40 +00:00
vyshane 7fa8296f01 Bug fixes 2006-09-25 13:05:18 +00:00
moodler 2e0c11dda3 Fixed display of times in admin settings using form-group 2006-09-25 12:48:07 +00:00
urs_hunkler 74bd2abd78 'added CSS for admin pages' 2006-09-25 11:59:00 +00:00
urs_hunkler 26620ae2d0 'separated CSS properties to color/fonts/layout/' 2006-09-25 11:56:45 +00:00
sam_marshall 20e1b1e5c0 Quick fix to the me() fix to the redirect function (for relative redirects). 2006-09-25 11:23:15 +00:00
urs_hunkler 30b14256e6 'added general settings for items within .form-groups to display:inline and float:none' 2006-09-25 11:22:36 +00:00
jamiesensei 864cc1de64 moved code turning on pear error printing if in debug mode to the top of formslib.php 2006-09-25 11:08:44 +00:00
urs_hunkler 1bd306206d 'added styling for textarea in adminsetting pages' 2006-09-25 10:59:18 +00:00
nfreear 542022f2eb Fixes bug MDL-6685 (Breadcrumb separator, only certain fonts support &#x25BA;). 2006-09-25 10:35:41 +00:00
urs_hunkler 7c47564df2 'added CSS for statsruntimestarthour to place hour and minute beside each other' 2006-09-25 09:44:31 +00:00
moodler a1d526438c FIxed some XHTML notices 2006-09-25 09:32:25 +00:00
urs_hunkler 91362d003f 'added float-left for form-group' 2006-09-25 09:13:04 +00:00
toyomoyo 3f1c7233c7 restore is NOT WORKING!!! role assignment and capability overrides are not in 2006-09-25 09:10:19 +00:00
moodler 0a7e84c341 Added form-group 2006-09-25 09:06:51 +00:00
moodler 841d5d4b94 Added some CSS to contain the html editor 2006-09-25 08:54:16 +00:00
skodak 0cd482e54d fix for MDL-6599 - problem with hiding of resource when $CFG->preventaccesstohiddenfiles enabled 2006-09-25 08:53:10 +00:00
vyshane dcd8e5890e Abstracted query in a new function forum_discussions_user_has_posted_in() 2006-09-25 08:50:00 +00:00
moodler 14f358562d Fixed div around submit button 2006-09-25 08:44:22 +00:00
vyshane cac40c2716 Added $forums[$i]->type == 'qanda' check to make things more explicit 2006-09-25 08:41:31 +00:00
moodler 3c6f7a7828 Remove size=X from admin settings (do it in CSS) 2006-09-25 08:33:10 +00:00
vyshane d50704bf19 Fix for MDL-6212. Forum searches now respect the qanda forums. In these forums, the user should not be able to see posts from discussions where the user has not yet posted, unless a post is the first post in the discussion (the question), or unless the user has the capabilitiy mod/forum:viewqandawithoutposting. 2006-09-25 08:25:58 +00:00
moodler 87a801e2ec Removed a typo 2006-09-25 08:22:05 +00:00
moodler afee986420 Updates for better CSS hooks 2006-09-25 08:20:14 +00:00
moodler 0462b3589e Temporary fix 2006-09-25 08:01:05 +00:00
moodler fa040029f0 Fix the editor and the surrounding table for settings 2006-09-25 07:55:10 +00:00
toyomoyo c76e095f70 some fixes for the main load_user_capablitiies() function, need pair c1, c2 to impose uniqueness. should use c2.id instead for override. no restriction on c2 for assignments 2006-09-25 07:50:03 +00:00
moodler edb6cba4b2 Fixed missing div properly this time :-) 2006-09-25 07:45:02 +00:00
moodler 23586acab5 Fixed miossing divs 2006-09-25 07:40:50 +00:00
moodler 6153cf5800 Moving all the admin settings to a tableless design MDL-6678
Thanks Urs for the CSS help!
2006-09-25 07:35:43 +00:00
moodler f94ced1010 Fix sort on get_teacher to get the most senior teacher 2006-09-25 06:15:31 +00:00
moodler 0a3e970319 FIxed some problems when getting teacher lists for print_course 2006-09-25 06:09:06 +00:00
moodler 73b998684b FIxes related to strange default languages 2006-09-25 06:04:02 +00:00
vyshane 77dc6d0b26 Discussions from a forum of type 'single' should not be splittable. Merge from 1.6 branch. 2006-09-25 05:12:01 +00:00
vyshane 66035aafd9 Merged fix for MDL-6521 2006-09-25 05:00:36 +00:00
mjollnir_ af5d9f6a06 bugsquish! stats aggregates and weird missing dates bug 2006-09-25 04:50:17 +00:00
vyshane 10b6398401 Fixed - wrong constant name 2006-09-25 04:11:41 +00:00
vyshane 87c7fce004 Merged fix for MDL-6363 2006-09-25 04:03:18 +00:00
moodler 1d546bb125 Fix for get_users_by_capability() so the caller can choose whether
they want users with doanything included or not
2006-09-25 03:00:50 +00:00
vyshane 1b54fb36ba Error printing for cron should be done with mtrace() 2006-09-25 02:44:54 +00:00
vyshane 2a692058d0 Fix in forum_make_mail_post() 2006-09-25 02:34:52 +00:00
vyshane 4be6bced7f Fixed sql query in assignment_get_unmailed_submissions() - we can't rely on user_students anymore. 2006-09-25 02:04:11 +00:00
moodler 01c65218a2 Restoring table_column which was mistakenly deleted I think 2006-09-25 01:55:06 +00:00
moodler 218eb65122 Changed the flag to be on a given user basis (just in case it gets called
for a lot of users)
2006-09-25 01:42:41 +00:00
vyshane 0ee186d9ca Typo in capability name. 2006-09-25 01:35:49 +00:00
moodler e4ec4e4149 Added a checking flag to check_enrolment_plugins() to make sure that it
never repeats more than once in an invocation.  Otherwise it's sometimes
possible for role_assign() during the enrolment process to cause loops.
2006-09-25 01:34:21 +00:00
stronk7 e920529bf8 Quick Fix. It should be 24! 2006-09-24 22:15:57 +00:00
stronk7 26b82be252 Drop all the unique keys inside PostgreSQL DB and convert them to
their equivalest unique indexes. We aren't going to allow unique
keys from 1.7 and upwards (until we decide to enforce referential
intregrity and until ADOdb support it)
2006-09-24 22:14:23 +00:00
mjollnir_ 32da8f410f fixed the dropdown menus in the detailed (user) reports (WHICH WORK!) 2006-09-24 22:13:31 +00:00
skodak a8a66c96ab it is now possible to hide parts of admin tree - not used yet, but it will be soon used for those hidden unsupported scripts in admin/ directory 2006-09-24 20:23:40 +00:00
stronk7 7253d30810 Added one new function find_key_name() to retrieve the
name og any key in the DB. This hasn't too much sense
for now (until we start to use referencial integrity) and
it is far from perfect, because it doesn't seach for the
key really in DB (due to the lack of support for this of ADOdb).
2006-09-24 19:39:53 +00:00
skodak 9fd9df205d fixed scheduled backup time setting 2006-09-24 19:37:34 +00:00
skodak aade3a4b6a fix for MDL-6680 redirect function is broken when running php as CGI, me() now used instead of SCRIPT_NAME + minor coding style changes 2006-09-24 19:10:13 +00:00
skodak 1cc309df9d fixes for recent incorrect index updates 2006-09-24 19:04:32 +00:00
stronk7 11b75afe8b Now Oracle generator is able to change the precision and decimals of
one column by using one temp column. This prevents ORA-1440 errors.
2006-09-24 17:39:20 +00:00
jamiesensei 01963b9552 This is a demo of the experimental formslib. It is used here to print and process the course settings form. 2006-09-24 17:14:44 +00:00
jamiesensei da6f876395 This is a first cut of a new formslib.php a library of classes for creating and securely processing forms in Moodle, based on PEAR QuickForms. Only uses XHTML and CSS and no table tags.
This is NOT YET PART OF THE MOODLE API it is here for experimental purposes.
2006-09-24 17:04:51 +00:00
moodler e836a7ddd8 When getting users by capability then exclude those with doanything at site level 2006-09-24 16:14:39 +00:00
stronk7 cc3779694a MSSQL alter field is exactly the standard one but with alter_column_skip_default enabled 2006-09-24 15:54:46 +00:00
stronk7 c1761c4292 XMLDB generators can return empty arrays if there is nothing to do. 2006-09-24 15:34:18 +00:00
stronk7 c02a561f97 Minor change to test to exclusively test the change of nullability 2006-09-24 15:28:32 +00:00
vyshane b343df8690 Merged fix for MDL-6615. 2006-09-24 15:28:16 +00:00
stronk7 d3b93bd26a Add skip parameters to one getFieldSQL call requiring them 2006-09-24 15:26:49 +00:00
stronk7 ff936e2c2d Finally PostgreSQL seems to be working now.... I've tried to do
it as clever as possible detecting when column specs change in
order to reduce the number of temp-update-drop-rename operations
2006-09-24 15:25:49 +00:00
vyshane 3f8a38343b Removed isteacher from function print_recent_activity_note() 2006-09-24 14:35:48 +00:00
moodler 9e38e94047 More tidy-ups 2006-09-24 14:35:45 +00:00
moodler 8173517648 Giving the capabilities a bit more room on smaller screens 2006-09-24 14:26:50 +00:00
moodler bc28fcd8fc Remaining capability strings 2006-09-24 14:20:44 +00:00
moodler 7fe6ddbab5 Add header classes to headers 2006-09-24 14:15:57 +00:00
vyshane 1172e5db68 Updated comment 2006-09-24 14:03:34 +00:00
vyshane 583b57b42d Changed <module>_print_recent_activity() functions so that they don't use $isteacher. However, I've left the $isteacher parameter in the functions, for backward compatibility so as not to break thrid party modules. Should we remove the parameter now? 2006-09-24 14:01:50 +00:00
vyshane 57244db359 Removed the following module configurations (converted to use roles):
participants, assesspublic and ratings. Changed assessed field to only use 1 (ratings on) or 0 (off).
2006-09-24 13:58:54 +00:00
moodler 847a041fb7 Better use of mod/quiz:view to hide quiz information (they already have the
name from the course page etc)
2006-09-24 13:54:22 +00:00
moodler 3e28f9bc07 Various new strings, mostly capability names 2006-09-24 13:51:06 +00:00
skodak d4121c5605 one more sanity check for role overrides 2006-09-24 13:34:52 +00:00
moodler b144aaa4dc Add some more checking of input and permissions 2006-09-24 13:30:43 +00:00
moodler 11ac79ff0e Extend the require_login in require_capability a bit 2006-09-24 13:15:13 +00:00
skodak 6df3c7df7a user upload cap renamed to moodle/site:uploadusers 2006-09-24 12:54:53 +00:00
skodak cc891abe88 uploading of users has new capability 'moodle/user:upload' now also with admin block integrated 2006-09-24 12:31:49 +00:00
moodler 0c19750c72 Fixed a notice 2006-09-24 12:13:58 +00:00
moodler df206ef87f Corrected accidental language-changing because of lang in POST 2006-09-24 12:07:44 +00:00
moodler bf7288a2c0 Simplified a bit and removed a notice 2006-09-24 12:02:00 +00:00
skodak 856f7cb7e6 do not display guest when browsing users 2006-09-24 11:58:28 +00:00
skodak 38d2d43b01 roles fixed in user browsing page; admin section now accepts array of capabilities for external and settings pages 2006-09-24 11:55:11 +00:00
moodler f365252121 Handle site-level block names in capability settings too 2006-09-24 11:32:11 +00:00
moodler 2c8766dff2 Function stub, as suggestion towards MDL-6678 2006-09-24 11:11:40 +00:00
moodler 9ac93e31f1 Added some strings describing risks 2006-09-24 10:47:27 +00:00
stronk7 f46e2c8cbc Changed one LIMIT to a cross-db WHERE clause 2006-09-24 09:59:25 +00:00
moodler ff439b30af Added styles to the role editing/viewing list, as well as some links and tooltips 2006-09-24 09:44:51 +00:00
stronk7 b0ec41af8a Prevent Unique Keys generation. Instead use unique indexes at DB level.
With this, all we'll have are PRIMARY KEYS + INDEXES, that are pretty
well supported by ADODB MetaXXX functions.
Both Unique and Foreign Keys will be used once ADODB support them and
the relational mode was enforced.
2006-09-24 09:38:56 +00:00
moodler d13c1aed4a When not editing, then let's disable the radio buttons 2006-09-24 09:02:30 +00:00
stronk7 70a8ac6666 Given one xmldb_field, finds its name in DB 2006-09-24 08:26:24 +00:00
skodak 189bb4a628 fixed warning in hotpot lib when running cron from commandline 2006-09-24 07:38:15 +00:00
skodak 25d8040ec5 added trustbitmask column to user table 2006-09-24 07:32:49 +00:00
mjollnir_ 931ab7be83 fixes to activity stats processing for dailies 2006-09-24 07:15:22 +00:00
mjollnir_ 96edb010da more work on stats reports ... 2006-09-24 07:13:33 +00:00
moodler be91f51dab Make sure buttons don't wrap 2006-09-24 06:54:52 +00:00
moodler 975211bb0a Removed the "then" string, no need for it 2006-09-24 06:47:53 +00:00
moodler c7731ab5e2 Fixed notice() so that you can pass a course if you want 2006-09-24 06:21:15 +00:00
moodler 978abb4291 Removed some possible notices 2006-09-24 06:06:24 +00:00
moodler 13e21433a4 Better errors 2006-09-24 05:53:45 +00:00
moodler b6e7b09c7b Tidied up error reporting in course overview 2006-09-24 04:29:12 +00:00
mjollnir_ 11887b6d5e more fixing on reports 2006-09-24 03:15:52 +00:00
stronk7 dcf9c14c2b Typo 2006-09-24 00:13:22 +00:00
stronk7 3fb145e061 Change slighty the tests... 2006-09-24 00:11:53 +00:00
stronk7 19c8321e07 Now Oracle supports the first part of alter table alter column statements 2006-09-24 00:02:34 +00:00
stronk7 27bb1be29d Inserted two more test 2006-09-24 00:01:02 +00:00
mjollnir_ 32baf47939 accidently left in debugging stuff in stats reports 2006-09-23 21:43:11 +00:00
stronk7 05002031d5 adding some more tests 2006-09-23 21:30:36 +00:00
stronk7 1934b52236 adding support for some more options 2006-09-23 21:29:31 +00:00
stronk7 8e895ae5c7 mark rename table as not implemented 2006-09-23 21:28:16 +00:00
stronk7 0e9e0b3bb3 adding support for alter columns
(not finished yet)
2006-09-23 21:24:51 +00:00
stronk7 f8c485b071 mysql alter table alter column is "modify column" 2006-09-23 21:23:05 +00:00
stronk7 c282203d84 mssql doesn't support default clause in alter table alter column 2006-09-23 21:22:02 +00:00
mark-nielsen 31b50f6442 Fix for MDL-6628: the lesson object was not being cloned correctly. 2006-09-23 19:57:35 +00:00
mark-nielsen 6707a280a9 Moved endofbranch redirect up to avoid double printing of messages. 2006-09-23 19:32:25 +00:00
mark-nielsen c7c404b964 Fixed alignment issue in IE 2006-09-23 18:51:49 +00:00
mark-nielsen 563106f0a8 Fixed branch table buttons to work with JavaScript turned off. This fix lead to some minor changes to the button output, but hopefully simplified things.
Also, removed .hidden-label class because it was no longer in use due to label fixes earlier.
2006-09-23 18:45:59 +00:00
moodler 3e1e2b6968 Putting the files back to plain JS files 2006-09-23 15:11:37 +00:00
moodler 3febabd888 Use AJAX for weekly formats too. HOWEVER, there are some remaining
bugs with it so for now it only works in DEBUG_DEVELOPER mode
2006-09-23 14:38:01 +00:00
moodler 354e11303e Just tidying up the code 2006-09-23 14:34:59 +00:00
moodler 9bb7417805 Further centralising of course AJAX and cleanup of code formatting, names etc 2006-09-23 14:03:48 +00:00
moodler 75dc25855c Now using the generic course/rest.php instead of the local commands.php 2006-09-23 13:24:10 +00:00
moodler b205403813 Moved the REST interface for course modification from
course/format/topics/commands.php to a more generic place
2006-09-23 13:23:18 +00:00
moodler 748390cd30 be a bit more forgiving of lang parameter 2006-09-23 13:14:25 +00:00
moodler 350b5fb6c8 Strip all tags from role names before use 2006-09-23 12:57:48 +00:00
skodak ece4945bd2 role sortorder column now has unique index; new function get_all_roles() that returns all roles with correct sort 2006-09-23 12:51:00 +00:00
moodler 65b0c132ed When getting lists of roles, put role names through format_string
(ie for multilang filter)
2006-09-23 12:46:53 +00:00
mjollnir_ 67f3be726e fixes to the stats processing. Credit: Geoff Cant <geoff@catalyst.net.nz> (sql ninja) 2006-09-23 12:42:35 +00:00
mjollnir_ afc97d5349 fixing reports 2006-09-23 12:10:42 +00:00
mjollnir_ 0dd5bf422b more work on stats - reports this time 2006-09-23 12:08:46 +00:00
skodak 8420bee94e towards unique role sortorder - fixes for create_role() and new delete_role() 2006-09-23 10:43:24 +00:00
mjollnir_ 09cf1c9b55 follow correct naming convention when fetching legacy teacher role 2006-09-23 09:47:11 +00:00
skodak 7eb0b60a1f debugging and error reporting level fixes and improvements MDL-6671 2006-09-23 09:38:39 +00:00
stronk7 b8547480b7 Moving a bunch of database module fields to NULLable
(http://docs.moodle.org/en/XMLDB_Problems#NOT_NULL_fields_using_a_DEFAULT_.27.27_clause)
2006-09-23 09:37:53 +00:00
mjollnir_ 88d7e6218e fixing typo in stats upgrade I just made 2006-09-23 09:02:37 +00:00
mjollnir_ 0f259f63d9 lots of fixes to stats, more to come 2006-09-23 08:52:12 +00:00
moodler c1ddecab49 Rewrote much of this to add
- more validation of incoming data
   - error logging in the PHP log

I've tested every function and it works for me without errors.
2006-09-23 07:52:09 +00:00
moodler 9991d157ea Further fixes for MDL-6601 ... that should be complete now. 2006-09-23 06:10:48 +00:00
moodler ea9fda2f88 Automatic installer.php lang files by installer_builder (20060923) 2006-09-23 02:43:18 +00:00
mark-nielsen 9b5274b96d Fixed a label 2006-09-23 01:01:14 +00:00
skodak 16e2e2f394 fixed error in fetch_context_capabilities() when no local capabilities defined in context 2006-09-22 21:31:19 +00:00
skodak adbffcb9fe role ui minor cleanup 2006-09-22 21:17:43 +00:00
skodak 305ef971fc role assign and override code fixes + other minor changes 2006-09-22 20:09:47 +00:00
stronk7 2a2905fb6f Now using ADOdb standard transactions. Some day, we should switch to
Smart Transactions (http://phplens.com/adodb/tutorial.smart.transactions.html)
as they autodetect errors and are nestable and easier to write
2006-09-22 20:05:44 +00:00
skodak a17c57b5e3 Partially reversed patch for http://tracker.moodle.org/browse/MDL-5136, caching of filtered uploaded html files is disabled now MDL-5136 , Eloy is changing the column type in cache_text back to TEXT. 2006-09-22 18:08:53 +00:00
moodler eaa79489a8 First pass at a fix for MDL-6601 (delete contexts when deleting course) 2006-09-22 17:49:45 +00:00
moodler 78850d9e7d Fixing MDL-6636, reference to file that is now gone (site.html) 2006-09-22 17:27:19 +00:00
stronk7 0700134df5 Detect Oracle Database Encoding in order to set CFG->unicodedb properly 2006-09-22 17:23:09 +00:00
moodler 721b750ff4 Replacing some old strings I should not have deleted MDL-6645 2006-09-22 17:12:09 +00:00
ethem 37f9ca4e8f Some cleanup for cron. 2006-09-22 16:19:53 +00:00
moodler bc492d185c Fixes to user new Roles 2006-09-22 16:19:24 +00:00
stronk7 4feeadeb59 Minor fix to be able to drop tables without prefix properly (adodb_log) 2006-09-22 16:16:48 +00:00
moodler 22003adac5 SOme changes for Roles 2006-09-22 16:11:52 +00:00
moodler 96fc0072b4 Removed some old debugging 2006-09-22 15:54:03 +00:00
stronk7 37a7859855 mini-bump 2006-09-22 15:46:40 +00:00
stronk7 0e1412cea5 Now cache_text->formattedtext is a longtext again.
(both PG and the UTF8 migration script were
working with it as text, so impact should be minimal)
2006-09-22 15:43:42 +00:00
ethem f0f8e34c5d isguest() to has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false) 2006-09-22 15:31:04 +00:00
urs_hunkler 65e2d1f0df 'merged from 1.6 - reduced the distance above the footer from 100px to 40px' 2006-09-22 15:19:38 +00:00
nfreear fd2339cfd6 Fixes bug MDL-6548 "blog_menu block should use lists"
- also blocks: rss_client, admin_bookmark.
 - also fixed &/&amp; validation error in rss_client footer.
2006-09-22 15:15:48 +00:00
ethem 778326bef8 Some cleanup. 2006-09-22 14:04:11 +00:00
ethem 33f9bffe90 Last commit for enrol_student().
enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')
to
role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, 'manual'))
2006-09-22 13:50:10 +00:00
ethem fddf3cfb56 + Changed deprecated enrol_student() function to enrol_into_course().
+ No need extra check: if (!empty($CFG->enrol_mailstudents)):  enrol_into_course calls email_welcome_message_to_user() internally.
2006-09-22 13:33:37 +00:00
moodler d7e8ffebbf Merged fixes from 1.6 2006-09-22 13:27:56 +00:00
moodler e2183037b3 Fixed a typo for enrol_into_course(), thanks Ethem 2006-09-22 13:16:32 +00:00
ethem b001dec454 No need get_student_courses() and get_teacher_courses() anymore. 2006-09-22 13:11:49 +00:00
ethem 16dbf42695 Changed deprecated enrol_student() function to enrol_into_course(). 2006-09-22 12:18:58 +00:00
mjollnir_ 0e3404aabd fixing stats_get_course_users. my brain hurts 2006-09-22 11:34:25 +00:00
dwoolhead 12490fc2b3 Prevent 'Warning: Invalid argument supplied for foreach() in ...' for get_courses_page function when there are no courses in the required category. 2006-09-22 11:15:10 +00:00
mjollnir_ b4713311d4 set config statsupgraded during install so we don't try upgrade later 2006-09-22 11:09:15 +00:00
sam_marshall ecfdc901fc Ooops. The following-HTTP-standard absolute-path redirect thing didn't work with URLs that begin / (i.e. it couldn't redirect to /moodle/whatever although it was fine redirecting to http://thing/moodle or to plain old whatever/something.) Fixed. 2006-09-22 10:48:37 +00:00
mjollnir_ f5aa20162c added missing indexes in stats upgrade, fixed discrepency between stattype enrolment or enrolments 2006-09-22 10:43:04 +00:00
mjollnir_ 1282edc826 fixing up the stats table enums 2006-09-22 10:18:33 +00:00
stronk7 d4b86c90dc Fixed bug about all chars being created with length 255. Penny found this! 2006-09-22 10:15:51 +00:00
mjollnir_ bd2b8ddecd moved call to upgrade stats until after all the roles stuff has been set up 2006-09-22 10:00:34 +00:00
moodler 6e208cd2fe FIxed up longtimenosee processing in cron 2006-09-22 09:54:43 +00:00
stronk7 373dc4406b Killing some not needed references 2006-09-22 09:54:02 +00:00
moodler cc7c0592e4 Fixes for get_users_longtimenosee 2006-09-22 09:49:26 +00:00
vyshane 938c039e52 Suggested changes from MDL-6654 2006-09-22 09:23:50 +00:00
vyshane 66b0b1042b Added comment regarding $isteacher being deprecated in print_recent_activity() 2006-09-22 09:11:46 +00:00
mjollnir_ 504e6fd41f proper install.xml schema for new stats tables 2006-09-22 08:58:40 +00:00
toyomoyo 65c6fd8b2d backup changes for roles 2006-09-22 08:56:25 +00:00
urs_hunkler 9d147a038f 'added 16px height to the commands to correct the wrapping issue in the sideblock header' 2006-09-22 07:51:23 +00:00
vyshane 242a445fdf Fix for MDL-6654 2006-09-22 07:08:43 +00:00
vyshane 1febf1a77a Replaced isteacher & co. Fixed some issues. 2006-09-22 06:29:40 +00:00
moodler a19beac32e new tags for new functions 2006-09-22 06:27:51 +00:00
moodler 9f73cdabf7 renamed field in context table 2006-09-22 06:21:48 +00:00
moodler aad2ba95d1 Upgrading table to rename the context->aggregatelevel field which was
really bugging me.   Code should be a little bit more readable now.

Apologies to those with non-core code already using this field.
2006-09-22 06:19:32 +00:00
moodler b988fe5f94 DOn't terminate upgrade if stats didn't work 2006-09-22 06:10:42 +00:00
mjollnir_ 20c59467a5 schema files for stats changes (install.xml still to come). Credit: Nigel McNie <nigel@catalyst.net.nz> 2006-09-22 06:05:07 +00:00
moodler 82396e5b1f Improved error messages for role_assign to be more helpful 2006-09-22 05:23:59 +00:00
moodler 9d829c681d Removing some notices 2006-09-22 05:17:57 +00:00
moodler 6ed4afb351 Merged support for personal dictionaries in spellchecker 2006-09-22 04:38:32 +00:00
moodler e84ea106f9 function_names() might not like the egg 2006-09-22 03:49:49 +00:00
moodler 1a030f5112 Fix for MDL-6319, to fix opposite-state links for unread tracking settings 2006-09-22 03:36:31 +00:00
vyshane 7ce56c1282 Removed mod/workshop:view 2006-09-22 03:28:56 +00:00
mjollnir_ 29bbc6e730 As well as a credit to Nigel for the stats schema upgrade and data migration, the previous commit here should have had a HUGE credit to Geoff Cant <geoff@catalyst.net.nz> for NINJA SQL 2006-09-22 03:15:52 +00:00
vyshane 73ebd5e23a Removed mod/wiki:view 2006-09-22 03:14:08 +00:00
vyshane af94faf492 Removed mod/scorm:view 2006-09-22 03:07:29 +00:00
vyshane b1e06f5fa0 Removed mod/resource:view 2006-09-22 03:05:46 +00:00
vyshane 94bcea7983 Removed mod/lesson:view 2006-09-22 02:58:39 +00:00
mjollnir_ e5d83d6fc1 stats rework: 1. upgrade schema and move data to new schema. (credit: Nigel McNie <nigel@catalyst.net.nz>). 2. Stats processing uses new schema. THIS NEEDS TESTING ON MYSQL. Still to do: schema files (install.xml,*.sql still to be committed), reports to use new schema. 2006-09-22 02:54:21 +00:00
vyshane 7949f21b5f Removed 'mod/glossary:view' capability 2006-09-22 02:52:48 +00:00
moodler 2eb662d261 A real easter egg ;-) 2006-09-22 02:28:13 +00:00
toyomoyo ef61c5f964 fixed a bug, override in user should not record userid as a capability 2006-09-22 02:17:59 +00:00
moodler 35cf8b7938 Some easter eggs :-) 2006-09-22 02:11:00 +00:00
toyomoyo c58adde069 fixing bogus function calls 2006-09-22 01:49:23 +00:00
toyomoyo 5b5781f4f5 some new functions to help backuo 2006-09-22 01:46:45 +00:00
toyomoyo ab1e2556ba code to support roles (roleassignments and roleoverrides) for backup in all 4 roles course, mod, block, userid contexts. not working yet 2006-09-22 01:35:35 +00:00
moodler ac4c51bef5 Make it easier to get out of a switched role in case viewing is not allowed 2006-09-22 01:29:11 +00:00
mits e8928a65fd Changed breadcrumb and blog tag color. 2006-09-22 01:23:49 +00:00
moodler 988ad08450 Use role sortorder when getting role lists 2006-09-22 01:21:01 +00:00
skodak 0c88b9acf7 improved coding style 2006-09-21 23:15:45 +00:00
skodak f3245d0952 improved coding style 2006-09-21 23:08:58 +00:00
skodak fa1fbbdc40 minor allignment change in role list 2006-09-21 23:00:48 +00:00
stronk7 cac97946d6 adjusting breadcrumb separator... 2006-09-21 23:00:45 +00:00
skodak b5959f3071 partial rewrite of role manage script, improved notice_yesno(), other minor fixes and changes; I will work on assign and overide tomorrow ;-) 2006-09-21 22:34:45 +00:00
cap2501 e78a3505c5 MDL-6544
resolved issue by passing strings into new main.portal.strings for delocalization.
2006-09-21 18:38:54 +00:00
stronk7 94e65cc36c Now all the insert_record() and update_record() calls under
Oracle DB use the oracle_dirty_hack() function to transform
empty strings into something different ' ' in order to avoid
the problems with the empty=NULL stupid norm of Oracle.

With this change, Oracle installation works completely.

Now we need to implement everywhere the opposite hack: transforming
all those ' ' (1 whitespace) back to the '' (empty string). Working
on it now.
2006-09-21 18:30:50 +00:00
stronk7 85f101fa26 SQL ANDs mus be, always, "AND" :-P 2006-09-21 17:18:56 +00:00
moodler 669d3ecd7c Some fixes to move Javascript files to PHP script, so that we can
tweak the contents better.

This was supposed to fix MDL-6544 but it didn't work.  Checking it in
because it will help a fix later.
2006-09-21 17:17:00 +00:00
stronk7 d7d05cf2f3 SQL ORs must be, always, "OR" 2006-09-21 17:09:28 +00:00
stronk7 7f5f956cf5 Allow to specify NULL clauses for some generators, mainly because
some mssql drivers use to create everything as NOT NULL by default.
2006-09-21 17:04:28 +00:00
moodler f098f122ca New string , used in registering 2006-09-21 16:49:15 +00:00
moodler f8b0d22a5e Fixes to make registering work ;-) 2006-09-21 16:48:46 +00:00
moodler 67171ec800 Fixed typo in capability name 2006-09-21 16:46:10 +00:00
skodak f59208a745 fixed typos in capabiltiy names 2006-09-21 16:27:37 +00:00
moodler 8cb5bc2b26 People under switched roles should not be able to unenrol 2006-09-21 16:11:31 +00:00
moodler 861fdcaa28 Changing defaults for role assigning (teachers, coursecreators allowed) 2006-09-21 16:02:39 +00:00
moodler 2d07587b4c Improvements to switchroles
1) You can have separate switchroles active in every course

2) Admins get a better view (doanything is supressed when switchroles active)
2006-09-21 15:58:59 +00:00
sam_marshall fd2fff1e24 Changed the redirect() version with no message (that sends a redirect header) so that it sends an absolute URL as per HTTP spec, even if the argument to the function is a relative URL. 2006-09-21 15:13:27 +00:00
moodler 91ea292e65 Changed the login info string when a user is using 'switch roles' 2006-09-21 14:42:45 +00:00
moodler 09edb3794b Fixed a capability name typo 2006-09-21 14:07:27 +00:00
moodler b32c8ddadd Fixed typos in capability names 2006-09-21 14:05:58 +00:00
moodler 0cef8a37fa Changed logic slightly in switchrole_form 2006-09-21 14:04:32 +00:00
moodler 0c05b71f58 Fix typo 2006-09-21 13:11:05 +00:00
sam_marshall a82e9bc3bb Added feature to blocks (and restorelib) so that blocks get a method call (default does nothing) after they are restored. This allows blocks to change their settings if necessary in respect of the new course roll-forward 'restore and change start date' feature that Al implemented recently. The core blocks happen not to store dates anyway so don't need this, but contributed blocks may well do. 2006-09-21 12:07:15 +00:00
stronk7 db33348f53 When journal to assignment migration is performed, journal
upgrade hasn't been upgraded yet so the journal_entries->comment
field is still called "comment"
2006-09-21 10:04:49 +00:00
stronk7 0bc94c9990 Last reserved word is out now!
journal_entries->comment to entrycomment

Only 2 tables have reserved names but they aren't
a problem if we force $CFG->prefix always
2006-09-21 09:54:00 +00:00
stronk7 ea6432fede Moved assignment_submission->comment to submissioncomment
(because comment is DB reserved word)
2006-09-21 09:35:20 +00:00
moodler 1888245ee6 More strings 2006-09-21 09:16:56 +00:00
moodler 3a52e764e4 New "Switch Role" functionality to replace the old "Student view".
It's not well-tested yet and probably doesn't quite work.  I will keep debugging this tonight from home.
2006-09-21 09:16:41 +00:00
toyomoyo 01e52ac70a changes to backups (where the roles info are stored) 2006-09-21 09:09:16 +00:00
vyshane 9222e72167 Removed capability mod/forum:viewforum. We will use moodle/course:viewhiddenactivities and hide/unhide forums instead. 2006-09-21 08:32:05 +00:00
vyshane 986dc51c00 Removed string for mod/forum:viewforum 2006-09-21 08:30:59 +00:00
skodak fd98800ea2 another admin ui cleanup 2006-09-21 08:28:25 +00:00
skodak 2ce38b70d8 capability related changes in new admin tree 2006-09-21 08:18:14 +00:00
skodak db51ddc52e old admin configuration cleanup - MDL-6595 MDL-6449 MDL-6447 2006-09-21 08:05:50 +00:00
stronk7 0ce61c841f Force ANSI NULLs under mssql. It's not critical to work
but it avoids some problems when changing nullability
of fields in the future.
2006-09-21 07:44:56 +00:00
moodler 20dd4cf5a1 Added new capability to switch roles (replaces old student view) 2006-09-21 07:44:53 +00:00
vyshane 2b15a08dc9 Added some notes for future reference 2006-09-21 07:40:24 +00:00
moodler 1c1e7af4e2 FIxed defaults for frontpage format 2006-09-21 07:38:13 +00:00
toyomoyo 4929302769 adding roles support for backups 2006-09-21 06:57:14 +00:00
skodak 2464c592e3 removed moodle specific debug messages from file.php 2006-09-21 06:38:27 +00:00
vyshane 49a0ba9438 Cleanups in view.php. Also moved logging of a forum view so that the event is not logged if the user does not have permission to view discussions in a forum (user never sees the discussions, so not counted as a view).
Tidy up of error display in discuss.php for when a user does not have permission to view the discussion.
2006-09-21 05:42:35 +00:00
vyshane c095178c84 Added message string for when a user does not have permissions to view forum discussions in a forum. 2006-09-21 05:39:17 +00:00
vyshane 9ae965d379 Removed column ratings from data table 2006-09-21 04:10:36 +00:00
toyomoyo e38f38c326 fix for MDL-6571, added get_roles_on_exact_context() for backup 2006-09-21 03:21:33 +00:00
moodler 2aab9d4000 Automatic installer.php lang files by installer_builder (20060921) 2006-09-21 02:44:10 +00:00
toyomoyo e959a34b48 fixing syntex errors 2006-09-21 02:03:39 +00:00
toyomoyo a4a877d890 trying to add some role support, not sure things are at the right place yet. 2006-09-21 01:56:59 +00:00
mjollnir_ a3081bfdba Flatfile enrolment plugin upgraded to new use roles. Credit: Alastair Pharo, new Catalyst ninja ;) <alastair@catalyst.net.nz> 2006-09-21 00:04:43 +00:00
stronk7 db8bd7a66f Now XMLDB installation is enabled! Old mysql.php and postgres7.php can
continue being used as previously until we finish all the required
DDL functions.

Also, this implies that *.sql files aren't needed anymore. Now all we have to do
is to maintain the install.xml files from the editor.
2006-09-20 22:36:21 +00:00
stronk7 8e6a09bd2b Updated comment... :-/ 2006-09-20 22:03:45 +00:00
stronk7 1b25502133 Forcing ADODB_FETCH_ASSOC explicity now for any DB. 2006-09-20 22:00:49 +00:00
skodak f50c2b4ee0 fix for old email confirmation - spotted by Dirk Grunwald; merged from MOODLE_16_STABLE 2006-09-20 21:48:33 +00:00
skodak d43d749a1b forum throttling capability meaning reversed 2006-09-20 21:25:51 +00:00
skodak eef868d17d major whitespace cleanup - fixed trailng whitespace in new files and admin area 2006-09-20 21:00:45 +00:00
skodak 6124048972 major whitespace cleanup - fixed tabs 2006-09-20 20:31:09 +00:00
skodak c78f13f8dc major whitespace cleanup - fixed \r line-ending 2006-09-20 20:16:10 +00:00
skodak 03f5a0f87c major whitespace cleanup - fixed \r\n line-ending 2006-09-20 19:46:52 +00:00
skodak 6c450d9f7e test commit for lineending cleanup 2006-09-20 19:20:34 +00:00
koenr 6e0d4e854a Adding Slovak Koruna MDL-6604 2006-09-20 19:06:57 +00:00
skodak daa588aa52 merged changes in moodlelib.php from MOODLE_16_STABLE 2006-09-20 18:40:22 +00:00
vyshane 36acdd6df9 Updated to reflect changes to data table 2006-09-20 18:08:30 +00:00
skodak ba4e0b059d fixed warning caused by missing fields in $course; tweaked mime info for firefox when forcing download - it should use default system mime associations which should be safe in case of firefox. 2006-09-20 17:51:59 +00:00
vyshane 741c4d0b04 Upgrade to roles code for data module. 2006-09-20 17:46:20 +00:00
tjhunt e7d57d9e6c MDL-6380 - added required include to make blocks work on the quiz pages. 2006-09-20 17:22:38 +00:00
tjhunt 15995c4ab6 Fix typos in string concatenation. 2006-09-20 17:01:19 +00:00
vyshane 7f2586640e Upgrade to roles code, as well as restoring from 1.6 on a 1.7 install code. 2006-09-20 16:57:01 +00:00
vyshane 2a1b4af377 Added course module groupmodes in convertion to roles logic 2006-09-20 16:54:50 +00:00
tjhunt df44078448 Another typo.
A pity, I would love to know what a delect_records function did ;-)
2006-09-20 16:36:40 +00:00
stronk7 a6e0172869 renaming question_dataset_items->number to itemnumber (reserved word) and
question->commentarytext to question->generalfeedback
2006-09-20 16:22:19 +00:00
tjhunt 9fd73f0c26 Fixed typo CONTEXT_COUSE -> CONTEXT_COURSE 2006-09-20 16:19:57 +00:00
tjhunt 40cc892b6a Fix bug with getting the capability. 2006-09-20 16:17:27 +00:00
sam_marshall 027d048574 Update to static JS - 'hitem' hidden fields now optional for lockoptions. 2006-09-20 15:04:57 +00:00
skodak 43a8ceeaf1 fixed missing ; 2006-09-20 15:04:01 +00:00
ikawhero d096e0d8b5 Bump for new tables. See MDL-474 2006-09-20 14:18:37 +00:00
ikawhero adecf1c475 Adding tables for customisable user profile fields. See MDL-474 2006-09-20 14:17:21 +00:00
martinlanghoff d7e901c669 dmlib: changed array access to keyed instead of ordinal.
This supports the move to ADODB_FETCH_ASSOC instead of ADODB_FETCH_BOTH.
see:
http://docs.moodle.org/en/XMLDB_Problems#ADOdb_fetch_mode_.28ASSOC.2C_NUM_and_BOTH.29

Author: Luke Hudson <luke@catalyst.net.nz>
2006-09-20 11:26:47 +00:00
koenr 0647422475 updated Guinea MDL-3909 2006-09-20 09:33:11 +00:00
toyomoyo dc5586907d replacing deprecated calls and references to capability calls 2006-09-20 09:00:04 +00:00
vyshane 759ac72de1 Added new function function fetch_context_independent_capabilities(). Modified fetch_context_capabilities() to use the former.
Fixed get_roles_used_in_context() sql query. r.sortorder must be selected if it is to be used in an ORDER BY clause.
2006-09-20 08:30:49 +00:00
tjhunt 1da5a36294 More capability name typos. 2006-09-20 08:01:59 +00:00
urs_hunkler c954040189 'updated CSS for the breadcrumb and calendar arrows' 2006-09-20 07:40:55 +00:00
skodak 1d126f4fe4 mostly removed old isadmin() calls 2006-09-20 06:59:32 +00:00
moodler 54a7469271 Removed some obsolete stuff 2006-09-20 06:52:54 +00:00
skodak 8521d83aff role_context_capabilities should handle current context too and role override simply use parent context 2006-09-20 06:24:55 +00:00
vinkmar bcaa8d9322 admin page cleanup -- added missing strings 2006-09-20 04:48:39 +00:00
vinkmar 43ba7a1388 admin page cleanup - added most missing strings 2006-09-20 04:47:57 +00:00
vyshane 6adc1e975d Added more overrides during restore process for forums from 1.6. Plus some bug fixes. 2006-09-20 02:59:43 +00:00
moodler a914213a45 Automatic installer.php lang files by installer_builder (20060920) 2006-09-20 02:59:20 +00:00
vyshane 689b19297f Fixed notice 2006-09-20 02:47:57 +00:00
moodler c4381ef5d2 FIxed a bug where $context had not been defined in enrol_into_course 2006-09-20 02:19:08 +00:00
moodler b0270f84eb Added unset_config as a companion to set_config 2006-09-20 02:17:27 +00:00
moodler 7f7cacdf4e Made the debugging message a bit less passive 2006-09-20 01:52:49 +00:00
tjhunt f3fb11f378 And another typo in capability name. 2006-09-19 22:58:12 +00:00
tjhunt df5e4d3106 Another typo in capability name. 2006-09-19 22:57:38 +00:00
tjhunt a8a7300acc In debug mode, warn people if they are asking for an unknown capability. 2006-09-19 22:57:17 +00:00
tjhunt 8cd402f900 Typo in capability name. 2006-09-19 22:35:40 +00:00
tjhunt 6fceebea95 Always print the question list, so you can add questions to a quiz, even if you are not allowed to edit them. 2006-09-19 22:35:02 +00:00
tjhunt 3fccd7fa8d Typo in capability names. You do not want to know how long I had to stare at the code to spot that! 2006-09-19 22:31:13 +00:00
koenr f2137ac2a5 fixed MDL-6551 2006-09-19 22:14:57 +00:00
tjhunt f866df1c4f allowassign.php was submitting to allowoverride.php 2006-09-19 21:53:37 +00:00
tjhunt 15677ae4a5 Fix JavaScript problem reported in this thread: http://moodle.org/mod/forum/discuss.php?d=54432. Merged from MOODLE_16_STABLE. 2006-09-19 21:48:16 +00:00
koenr 28efcc8b63 fix for mdl-3909
cleaned up the file completely
2006-09-19 21:45:13 +00:00
skodak a14049f107 metacourse role assignment fixes 2006-09-19 20:39:55 +00:00
skodak 681729b16e various minor Role UI fixes 2006-09-19 17:34:29 +00:00
moodler 946cbe7029 Added some docs 2006-09-19 16:38:53 +00:00
moodler 6051c68d4b Deleted the old students-based function and created the
new-style setup_enrolments() function that uses roles
to do the tasks required when a user logs in.

Other enrolment plugins should use this as an example/guide

The sync parts of this plugin are not yet fixed.
2006-09-19 16:29:43 +00:00
moodler 33f857405b Slight extensions to get_my_courses() API to make it more useful in general 2006-09-19 14:23:43 +00:00
toyomoyo 9ce384ba1e relacing deprecated functions with capability checks 2006-09-19 14:16:40 +00:00
moodler 0dde27bb52 More efficient get_my_courses() 2006-09-19 14:14:32 +00:00
tjhunt a4514d91de Renamed new commentary feature to 'general feedback'. 2006-09-19 13:35:42 +00:00
nfreear 57100a9098 Fixes bug MDL-6360 "Resizable image in breadcrumb trail..."
- files block_search_forums.php, calendar/lib.php, lang/en_utf8/access.php, weblib.php, theme/standard/config.php, styles_color.css
2006-09-19 11:36:21 +00:00
tjhunt 717cfb0a7b Rename column question_dataset_items->number to itemnumber, to avoid reserved word. 2006-09-19 10:56:00 +00:00
skodak b22c03ce99 RISK_ADMIN replaced with RISK_CONFIG, part 2. 2006-09-19 10:26:35 +00:00
toyomoyo 9c37662f22 replacing deprecated funciton calls with capability calls 2006-09-19 09:16:24 +00:00
vyshane 285f94f506 Few small fixes 2006-09-19 08:16:26 +00:00
vyshane f2269f311d Typos 2006-09-19 08:10:46 +00:00
skodak 45b9781ed4 fixed missing shortname pg upgrade code, sorry 2006-09-19 07:35:48 +00:00
skodak a6b02b652b RISK_ADMIN replaced with RISK_CONFIG 2006-09-19 07:33:22 +00:00
vyshane 0fd332a811 More typos... 2006-09-19 07:16:04 +00:00
vyshane 5ddc81b973 Fixed typo 2006-09-19 07:13:57 +00:00
moodler 3f5edbdfa3 If the search and replace affected course->modinfo then courses may not work,
so clear the cache
2006-09-19 07:08:19 +00:00
skodak 92ab23875a fixed missing dot 2006-09-19 06:38:17 +00:00
toyomoyo 9fe3be1b01 fixed a bug where wrong parameters is passed 2006-09-19 06:36:54 +00:00
skodak b79da3ac68 moodle/course:managemetacourse is now singular 2006-09-19 06:35:52 +00:00
mark-nielsen 096a664c01 Attempted to improve the display of the table in collapsed view 2006-09-19 05:57:57 +00:00
mark-nielsen 7c03355aab Fix for the instance mentioned in MDL-3058 2006-09-19 05:11:57 +00:00
mark-nielsen ef37bd6851 Corrected a lang entry for better translation 2006-09-19 05:10:24 +00:00
moodler b725019e3f Merged fix related to MDL-6020 2006-09-19 04:53:56 +00:00
mark-nielsen 4bea0828a2 Got ahead of myself, fixed by bug fix 2006-09-19 04:49:45 +00:00
mark-nielsen 51c870d253 Notice fix in report for numerical question types 2006-09-19 04:48:13 +00:00
mark-nielsen 9ae4e9f5de Fix in addpage.php when one deletes all pages in a lesson then adds a new one
Fix numerical questions were not displaying the student's answer in the feedback
2006-09-19 04:45:18 +00:00
toyomoyo 5f10f77505 took out a comment, for proper debugging use the new debugging() function 2006-09-19 04:31:36 +00:00
mark-nielsen b14123498f Saw several problems with lesson_choose_from_menu, so finally replaced its use with choose_from_menu in lib/weblib.php 2006-09-19 04:06:32 +00:00
mark-nielsen f08769317f Removed hard-coded strings and fixed labels 2006-09-19 03:47:49 +00:00
mark-nielsen 63d4c906c7 Removed a hard-coded string and added PHPdoc comments for the page 2006-09-19 02:54:57 +00:00
mark-nielsen 7adb975062 removed some unecessary comments 2006-09-19 02:48:29 +00:00
toyomoyo 2d9965e1dc function should be looking up parent contexts too 2006-09-19 02:47:55 +00:00
mark-nielsen 2817bc1aed Fixed a bug when detecting a user as eligible for posting their name for high scores 2006-09-19 02:41:10 +00:00
mark-nielsen 8271e5cec8 Fixed alignment problem with the buttons for password protected lessons 2006-09-19 02:29:42 +00:00
toyomoyo d76a5a7fed replacing references to user_* tables 2006-09-19 01:44:33 +00:00
tomflannaghan f33beb0b3d Preset added. This is a basic javascript based preset. 2006-09-19 01:21:13 +00:00
skodak 21b6db6eff added capabilty risks into access.php and GUI for define role and override; minor fixes for capability types in forum 2006-09-18 21:32:49 +00:00
skodak 31f267963a MDL-6568 shortname added to roles 2006-09-18 17:40:22 +00:00
ethem 7dbc351e11 unenrol_student() -> role_unassign() 2006-09-18 17:32:43 +00:00
vyshane 20821a1266 Added new capabilities, renamed mod/data:readentry to mod/data:viewentry to make capability name more consistent with the rest of moodle. 2006-09-18 13:46:09 +00:00
moodler a229726a11 Fixing debugging 2006-09-18 13:36:17 +00:00
moodler 779ef7fc0b Fixed up some more debug statements 2006-09-18 13:26:58 +00:00
moodler 0e1cc9070b Fixed a some debugging statements 2006-09-18 13:24:45 +00:00
vyshane e51e3fcb34 Fixed notice 2006-09-18 12:48:00 +00:00
toyomoyo 38079c83eb removing get_creators(), no more reference to the function 2006-09-18 12:04:16 +00:00
urs_hunkler aaf281d1eb 'merged from 1.6 - MDL-6020 - CSS changes to align text beside images' 2006-09-18 12:01:16 +00:00
toyomoyo 492e507f7b no more refernece to remove_creator() function 2006-09-18 11:55:04 +00:00
tomflannaghan b8fb348277 Adds Javascript Support for the presets. 2006-09-18 11:45:12 +00:00
tomflannaghan d6ef0526f3 <?php // $Id: preset.php,v 1.5 2006/08/30 09:17:40 skodak Exp $
/* Preset Menu
 *
 * This is the page that is the menu item in the config database
 * pages.
 */

require_once('../../config.php');
require_once('lib.php');
require_once($CFG->libdir.'/uploadlib.php');
require_once($CFG->libdir.'/xmlize.php');


$id      = optional_param('id', 0, PARAM_INT);    // course module id
$d       = optional_param('d', 0, PARAM_INT);     // database activity id
$action  = optional_param('action', 'base', PARAM_RAW); // current action
$file    = optional_param('file', false, PARAM_PATH); // path of file to upload

if ($id) {
    if (! $cm = get_record('course_modules', 'id', $id)) {
        error('Course Module ID Incorrect');
    }
    if (! $course = get_record('course', 'id', $cm->course)) {
        error('Course is misconfigured');
    }
    if (! $data = get_record('data', 'id', $cm->instance)) {
        error('Module Incorrect');
    }
} else if ($d) {
    if (! $data = get_record('data', 'id', $d)) {
        error('Database ID Incorrect');
    }
    if (! $course = get_record('course', 'id', $data->course)) {
        error('Course is misconfigured');
    }
    if (! $cm = get_coursemodule_from_instance('data', $data->id, $course->id)) {
        error('Course Module ID was incorrect');
    }
} else {
    error('Parameter missing');
}

require_login($course->id);

require_capability('mod/data:managetemplates', get_context_instance(CONTEXT_MODULE, $cm->id));

/* get the list of standard presets found in /mod/data/preset */
$presets = array();


if ($presetdir = opendir($CFG->dirroot.'/mod/data/preset')) {

    while ($userdir = readdir($presetdir)) {

        $fulluserdir = '/mod/data/preset/'.$userdir;

        if ($userdir == '.' || $userdir == '..') {
            continue;
        }

        /* Global Standard Presets */
        if (is_directory_a_preset($CFG->dirroot.$fulluserdir)) {
            $preset = new StdClass;
            $preset->path = $fulluserdir;
            $preset->name = $userdir;
            if (file_exists($fulluserdir.'/screenshot.jpg')) {
                $preset->screenshot = $CFG->wwwroot.'/mod/data/preset/'.$userdir.'/screenshot.jpg';
            }
            $presets[] = $preset;
            unset($preset);
        }

        /* User made presets stored in user folders */
        else if (get_record('user', 'id', $userdir)) {
            $userdirh = opendir($CFG->dirroot.$fulluserdir);
            while ($userpresetdir = readdir($userdirh)) {
                $fulluserpresetdir = $fulluserdir.'/'.$userpresetdir;
                if ($userpresetdir != '.' && $userpresetdir != '..' && is_directory_a_preset($CFG->dirroot.$fulluserpresetdir)) {
                    $preset = new StdClass;
                    $preset->path = $fulluserpresetdir;
                    $preset->name = $userpresetdir;
                    $preset->user = $userdir;
                    if (file_exists($fulluserpresetdir.'/screenshot.jpg')) {
                        $preset->screenshot = $CFG->wwwroot.'/mod/data/preset/'.$userdir.'/'.$userpresetdir.'/screenshot.jpg';
                    }
                    $presets[] = $preset;
                    unset($preset);
                }
            }
        }
    }
    closedir($presetdir);
}

/* Need sesskey security check here for import instruction */
$sesskey = sesskey();

/********************************************************************/
/* Output */
data_presets_print_header($course, $cm, $data);

echo "<center>";
switch ($action) {
    /* Main selection menu - default mode also. */
 default:
 case 'base':
     $strimport = get_string('import');
     $strfromfile = get_string('fromfile', 'data');
     $strchooseorupload = get_string('chooseorupload', 'data');
     $strok = get_string('ok');
     $strusestandard = get_string('usestandard', 'data');
     $strchoose = get_string('choose');
     $strexport = get_string('export', 'data');
     $strexportaszip = get_string('exportaszip', 'data');
     $strsaveaspreset = get_string('saveaspreset', 'data');
     $strdelete = get_string('delete');

     echo "<table cellpadding=7>";
     echo "<tr><td><h3>$strimport</h3></td>";
     echo "<td><form name='form' method='POST' action='?d=$data->id&action=importzip&sesskey=$sesskey' enctype='multipart/form-data'>";
     helpbutton('importfromfile', '', 'data');
     echo " $strfromfile:</td><td><input name=\"file\" size=\"20\" value=\"\" alt=\"file\" type=\"text\"><input name=\"coursefiles\" title=\"Choose or upload a file\" value=\"$strchooseorupload\" onclick=\"return openpopup('/files/index.php?id=2&choose=form.file', 'coursefiles', 'menubar=0,location=0,scrollbars,resizable,width=750,height=500', 0);\" type=\"button\">";
     echo "<input type=\"submit\" value=\"$strok\"/>";
     echo "</form></td></tr>";

     echo "<tr valign=top><td></td><td>";
     helpbutton('usepreset', '', 'data');
     echo " $strusestandard: </td><td>";
     echo "<table width=100%>";
     foreach ($presets as $id => $preset) {
	 echo "<tr><form action='' method='POST'>";
	 echo "<input type='hidden' name='file' value=\"$preset->path\">";
	 echo "<input type='hidden' name='action' value='importpreset'>";
	 echo "<input type='hidden' name='d' value='$data->id'>";
	 echo "<input type='hidden' name='sesskey' value='$sesskey'>";
	 echo "<td>";
	 if ($preset->screenshot) {
	     echo "<img src='$preset->screenshot' alt='$preset->screenshot' />";
	 }
	 echo "</td><td>$preset->name";
	 if ($preset->user) {
	     $user = get_record('user', 'id', $preset->user);
	     echo " by $user->firstname $user->lastname";
	 }
	 echo "</td><td><input type='submit' value='$strchoose'></td></form>";
	 echo "<td>";
	 if ($preset->user == $USER->id || isadmin()) {
	     echo "<form action='' method='POST'>";
	     echo "<input type='hidden' name='d' value='$data->id' />";
	     echo "<input type='hidden' name='action' value='confirmdelete' />";
	     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
	     echo "<input type='hidden' name='deleteid' value='$id' />";
	     echo "<input type='hidden' name='deletename' value=\"$preset->name\" />";
	     echo "<input type='submit' value='$strdelete' /></form>";
	 }
	 echo "</td></tr>";
     }
     echo "</table></td></tr>";

     echo "<tr><td valign=top><h3>$strexport</h3></td>";
     echo "<td><form action='' method='POST'>";
     helpbutton('exportzip', '', 'data');
     echo " <input type='hidden' name='action' value='export' />";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='submit' value='$strexportaszip' />";
     echo "</form>";

     echo "<form action='' method='POST'>";
     helpbutton('savepreset', '', 'data');
     echo " <input type='hidden' name='action' value='save1' />";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
     echo "<input type='submit' value='$strsaveaspreset' />";
     echo "</form>";

     echo "</table>";
     break;



     /***************** Deleting *****************/
 case 'confirmdelete' :
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $deletename = required_param('deletename', PARAM_RAW);
     $deleteid = required_param('deleteid', PARAM_INT);

     $strwarning = get_string('deletewarning', 'data');
     $strdelete = get_string('delete');
     notify($strwarning);
     echo "<form action='' method='POST'>";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='hidden' name='action' value='delete' />";
     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
     echo "<input type='hidden' name='deleteid' value='$deleteid' />";
     echo "<input type='hidden' name='deletename' value=\"$deletename\" />";
     echo "<input type='submit' value='$strdelete' /></form>";
     break;

 case 'delete' :
     if (!confirm_sesskey()) {
	 error('Sesskey Invalid');
     }

     $deletename = required_param('deletename', PARAM_RAW);
     $deleteid = required_param('deleteid', PARAM_INT);

     if (!empty($presets[$deleteid])) {
	 if ($presets[$deleteid]->name == $deletename) {
	     if (!clean_preset($CFG->dirroot.$presets[$deleteid]->path)) error("Error deleting");
	 }
	 rmdir($CFG->dirroot.$presets[$deleteid]->path);
     }
     else {
	 error('Invalid delete');
     }

     $strdelete = get_string('deleted', 'data');
     notify("$deletename $strdeleted");

     break;



     /***************** Importing *****************/
 case 'importpreset' :
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $pimporter = new PresetImporter($course, $cm, $data, $CFG->dirroot.$file);
     $pimporter->import_options();
     break;

     /* Imports a zip file. */
 case 'importzip' :
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     if (!make_upload_directory('temp/data/'.$USER->id)) {
	 error("Can't Create Directory");
     }

     $presetfile = $CFG->dataroot."/temp/data/".$USER->id;
     clean_preset($presetfile);

     if (!unzip_file($CFG->dataroot."/$course->id/$file",
		     $presetfile, false))
	 error("Can't unzip file");

     $pimporter = new PresetImporter($course, $cm, $data, $presetfile);
     $pimporter->import_options();
     break;

 case 'finishimport':
     if (!confirm_sesskey()) {
	 error('Sesskey Invalid');
     }

     $pimporter = new PresetImporter($course, $cm, $data, $file);
     $pimporter->import();

     $strimportsuccess = get_string('importsuccess', 'data');
     $straddentries = get_string('addentries', 'data');
     $strtodatabase = get_string('todatabase', 'data');
     if (!get_records('data_records', 'dataid', $data->id)) {
	 notify("$strimportsuccess <a href='edit.php?d=$data->id'>$straddentries</a> $strtodatabase", 'notifysuccess');
     }
     else {
	 notify("$strimportsuccess", 'notifysuccess');
     }
     break;

     /* Exports as a zip file ready for download. */
 case 'export':
     $file = data_presets_export($course, $cm, $data);
     echo get_string('exportedtozip', 'data')."<br>";
     $perminantfile = $CFG->dataroot."/$course->id/moddata/data/$data->id/preset.zip";
     @unlink($perminantfile);
     /* is this created elsewhere? sometimes its not present... */
     make_upload_directory("$course->id/moddata/data/$data->id");

     /* now just move the zip into this folder to allow a nice download */
     if (!rename($file, $perminantfile)) error("Can't move zip");
     echo "<a href='$CFG->wwwroot/file.php/$course->id/moddata/data/$data->id/preset.zip'>".get_string('download', 'data')."</a>";
     break;



     /***************** Exporting *****************/
 case 'save1':
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $strcontinue = get_string('continue');
     $strwarning = get_string('presetwarning', 'data');

     echo "<div align=center>";
     echo "<p>$strwarning</p>";
     echo "<form action='' method='POST'>";
     echo "Name: <input type='textbox' name='name' value=\"$data->name\" />";
     echo "<input type='hidden' name='action' value='save2' />";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
     echo "<input type='submit' value='$strcontinue' /></form></div>";
     break;

 case 'save2':
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $strcontinue = get_string('continue');
     $stroverwrite = get_string('overwrite');

     $name = optional_param('name', $data->name, PARAM_FILE);

     if (is_directory_a_preset("$CFG->dirroot/mod/data/preset/$USER->id/$name")) {
	 notify("Preset already exists: Pick another name or overwrite");

	 echo "<div align=center>";
	 echo "<form action='' method='POST'>";
	 echo "New name: <input type='textbox' name='name' value=\"$name\" />";
	 echo "<input type='hidden' name='action' value='save2' />";
	 echo "<input type='hidden' name='d' value='$data->id' />";
	 echo "<input type='hidden' name='sesskey' value='$sesskey' />";
	 echo "<input type='submit' value='$strcontinue' /></form>";

	 echo "<form action='' method='POST'>";
	 echo "<input type='hidden' name='name' value=\"$name\" />";
	 echo "<input type='hidden' name='action' value='save3' />";
	 echo "<input type='hidden' name='d' value='$data->id' />";
	 echo "<input type='hidden' name='sesskey' value='$sesskey' />";
	 echo "<input type='submit' value='$stroverwrite' /></form>";
	 echo "</div>";
	 break;
     }

 case 'save3':
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $name = optional_param('name', $data->name, PARAM_FILE);
     $presetdirectory = "$CFG->dirroot/mod/data/preset/$USER->id/$name";

     if (!is_dir($presetdirectory)) {
	 @mkdir("$CFG->dirroot/mod/data/preset/$USER->id");
	 mkdir($presetdirectory);
     }
     else {
	 clean_preset($presetdirectory);
     }

     $file = data_presets_export($course, $cm, $data);
     if (!unzip_file($file, $presetdirectory, false)) error("Can't unzip to the preset directory");
     notify(get_string('savesuccess', 'data'), 'notifysuccess');
     break;

}
echo "</center>";
print_footer($course);


function is_directory_a_preset($directory) {
    $directory = rtrim($directory, '/\\') . '/';
    if (file_exists($directory.'singletemplate.html') &&
	file_exists($directory.'listtemplate.html') &&
	file_exists($directory.'listtemplateheader.html') &&
	file_exists($directory.'listtemplatefooter.html') &&
	file_exists($directory.'addtemplate.html') &&
	file_exists($directory.'rsstemplate.html') &&
	file_exists($directory.'rsstitletemplate.html') &&
	file_exists($directory.'csstemplate.css') &&
	file_exists($directory.'jstemplate.js') &&
	file_exists($directory.'preset.xml')) return true;
    else return false;
}

function data_presets_print_header($course, $cm, $data, $showtabs=true) {

    global $CFG, $displaynoticegood, $displaynoticebad;

    $strdata = get_string('modulenameplural','data');

    print_header_simple($data->name, '', "<a href='index.php?id=$course->id'>$strdata</a> -> $data->name",
			'', '', true, '', navmenu($course, $cm));

    print_heading(format_string($data->name));

    /// Print the tabs

    if ($showtabs) {
        $currenttab = 'presets';
        include_once('tabs.php');
    }

    /// Print any notices

    if (!empty($displaynoticegood)) {
        notify($displaynoticegood, 'notifysuccess');    // good (usually green)
    } else if (!empty($displaynoticebad)) {
        notify($displaynoticebad);                     // bad (usuually red)
    }
}


function clean_preset($folder) {
    if (unlink($folder.'/singletemplate.html') &&
	unlink($folder.'/listtemplate.html') &&
	unlink($folder.'/listtemplateheader.html') &&
	unlink($folder.'/listtemplatefooter.html') &&
	unlink($folder.'/addtemplate.html') &&
	unlink($folder.'/rsstemplate.html') &&
	unlink($folder.'/rsstitletemplate.html') &&
	unlink($folder.'/csstemplate.css') &&
	unlink($folder.'/jstemplate.js') &&
	unlink($folder.'/preset.xml')) return true;
    else return false;
}


function data_presets_export($course, $cm, $data) {
    global $CFG;
    /* Info Collected. Now need to make files in moodledata/temp */
    $tempfolder = $CFG->dataroot.'/temp';
    $singletemplate     = fopen($tempfolder.'/singletemplate.html', 'w');
    $listtemplate       = fopen($tempfolder.'/listtemplate.html', 'w');
    $listtemplateheader = fopen($tempfolder.'/listtemplateheader.html', 'w');
    $listtemplatefooter = fopen($tempfolder.'/listtemplatefooter.html', 'w');
    $addtemplate        = fopen($tempfolder.'/addtemplate.html', 'w');
    $rsstemplate        = fopen($tempfolder.'/rsstemplate.html', 'w');
    $rsstitletemplate   = fopen($tempfolder.'/rsstitletemplate.html', 'w');
    $csstemplate        = fopen($tempfolder.'/csstemplate.css', 'w');
    $jstemplate         = fopen($tempfolder.'/jstemplate.js', 'w');

    fwrite($singletemplate, $data->singletemplate);
    fwrite($listtemplate, $data->listtemplate);
    fwrite($listtemplateheader, $data->listtemplateheader);
    fwrite($listtemplatefooter, $data->listtemplatefooter);
    fwrite($addtemplate, $data->addtemplate);
    fwrite($rsstemplate, $data->rsstemplate);
    fwrite($rsstitletemplate, $data->rsstitletemplate);
    fwrite($csstemplate, $data->csstemplate);
    fwrite($jstemplate, $data->jstemplate);

    fclose($singletemplate);
    fclose($listtemplate);
    fclose($listtemplateheader);
    fclose($listtemplatefooter);
    fclose($addtemplate);
    fclose($rsstemplate);
    fclose($rsstitletemplate);
    fclose($csstemplate);
    fclose($jstemplate);

    /* All the display data is now done. Now assemble preset.xml */
    $fields = get_records('data_fields', 'dataid', $data->id);
    $presetfile = fopen($tempfolder.'/preset.xml', 'w');
    $presetxml = "<preset>\n\n";

    /* Database settings first. Name not included? */
    $settingssaved = array('intro', 'comments', 'ratings', 'participants',
			   'requiredentries', 'requiredentriestoview', 'maxentries',
			   'rssarticles', 'approval', 'scale', 'assessed', 'assessedpublic',
			   'defaultsort', 'defaultsortdir', 'editany');

    $presetxml .= "<settings>\n";
    foreach ($settingssaved as $setting) {
	$presetxml .= "<$setting>{$data->$setting}</$setting>\n";
    }
    $presetxml .= "</settings>\n\n";

    /* Now for the fields. Grabs all settings that are non-empty */
    if (!empty($fields)) {
	foreach ($fields as $field) {
	    $presetxml .= "<field>\n";
	    foreach ($field as $key => $value) {
		if ($value != '' && $key != 'id' && $key != 'dataid') {
		    $presetxml .= "<$key>$value</$key>\n";
		}
	    }
	    $presetxml .= "</field>\n\n";
	}
    }

    $presetxml .= "</preset>";
    fwrite($presetfile, $presetxml);
    fclose($presetfile);

    /* Check all is well */
    if (!is_directory_a_preset($tempfolder)) {
        error("Not all files generated!");
    }

    $filelist = array(
                      "singletemplate.html",
                      "listtemplate.html",
                      "listtemplateheader.html",
                      "listtemplatefooter.html",
                      "addtemplate.html",
                      "rsstemplate.html",
                      "rsstitletemplate.html",
                      "csstemplate.css",
		      "jstemplate.js",
                      "preset.xml");

    foreach ($filelist as $key => $file) {
        $filelist[$key] = $tempfolder.'/'.$filelist[$key];
    }

    @unlink($tempfolder.'/export.zip');
    $status = zip_files($filelist, $tempfolder.'/export.zip');

    /* made the zip... now return the filename for storage.*/
    return $tempfolder.'/export.zip';
}



class PresetImporter {
    function PresetImporter($course, $cm, $data, $folder) {
        global $CFG;
        $this->course = $course;
        $this->cm = $cm;
        $this->data = $data;
        $this->folder = $folder;
        $this->postfolder = $folder;
    }


    function get_settings() {
        global $CFG;

        if (!is_directory_a_preset($this->folder)) {
            error("$this->folder Not a preset");
        }

        /* Grab XML */
        $presetxml = file_get_contents($this->folder.'/preset.xml');
        $parsedxml = xmlize($presetxml);

        /* First, do settings. Put in user friendly array. */
        $settingsarray = $parsedxml['preset']['#']['settings'][0]['#'];
        $settings = new StdClass();

        foreach ($settingsarray as $setting => $value) {
            $settings->$setting = $value[0]['#'];
        }

        /* Now work out fields to user friendly array */
        $fieldsarray = $parsedxml['preset']['#']['field'];
        $fields = array();
        foreach ($fieldsarray as $field) {
            $f = new StdClass();
            foreach ($field['#'] as $param => $value) {
                $f->$param = $value[0]['#'];
            }
            $f->dataid = $this->data->id;
            $fields[] = $f;
        }

        /* Now add the HTML templates to the settings array so we can update d */
        $settings->singletemplate     = file_get_contents($this->folder."/singletemplate.html");
        $settings->listtemplate       = file_get_contents($this->folder."/listtemplate.html");
        $settings->listtemplateheader = file_get_contents($this->folder."/listtemplateheader.html");
        $settings->listtemplatefooter = file_get_contents($this->folder."/listtemplatefooter.html");
        $settings->addtemplate        = file_get_contents($this->folder."/addtemplate.html");
        $settings->rsstemplate        = file_get_contents($this->folder."/rsstemplate.html");
        $settings->rsstitletemplate   = file_get_contents($this->folder."/rsstitletemplate.html");
        $settings->csstemplate        = file_get_contents($this->folder."/csstemplate.css");
        $settings->jstemplate         = file_get_contents($this->folder."/jstemplate.js");

        $settings->instance = $this->data->id;

        /* Now we look at the current structure (if any) to work out whether we need to clear db
           or save the data */
        $currentfields = array();
        $currentfields = get_records('data_fields', 'dataid', $this->data->id);

        return array($settings, $fields, $currentfields);
    }

    function import_options() {
        if (!confirm_sesskey()) {
            error("Sesskey Invalid");
        }

        $strblank = get_string('blank', 'data');
        $strnofields = get_string('nofields', 'data');
        $strcontinue = get_string("continue");
        $sesskey = sesskey();
        $strwarning = get_string('mappingwarning', 'data');
        $strfieldmappings = get_string('fieldmappings', 'data');
        $strnew = get_string("new");
        $strold = get_string("old");

        list($settings, $newfields,  $currentfields) = $this->get_settings();

        echo "<div align='center'><form action='' method='POST'>";
        echo "<input type='hidden' name='sesskey' value='$sesskey' />";
        echo "<input type='hidden' name='d' value='{$this->data->id}' />";
        echo "<input type='hidden' name='action' value='finishimport' />";
        echo "<input type='hidden' name='file' value=\"$this->postfolder\" />";

        if ($currentfields != array() && $newfields != array()) {
            echo "<h3>$strfieldmappings ";
            echo helpbutton('fieldmappings', '', 'data');
            echo "</h3><table>";

            foreach ($newfields as $nid => $newfield) {
                echo "<tr><td>$newfield->name </td>";
                echo "<td><select name='field_$nid'>";

                foreach ($currentfields as $cid => $currentfield) {
                    if ($currentfield->type == $newfield->type) {
                        if ($currentfield->name == $newfield->name) {
                            echo "<option value='$cid' selected='true'>$currentfield->name</option>";
                            $selected=true;
                        }
                        else {
			    echo "<option value='$cid'>$currentfield->name</option>";
			}
		    }
                }

                if ($selected)
                    echo "<option value='-1'>-</option>";
                else
                    echo "<option value='-1' selected='true'>-</option>";
                echo "</select></td></tr>";
            }
            echo "</table>";
            echo "<p>$strwarning</p>";
        }
        else if ($newfields == array()) {
            error("New preset has no defined fields!");
        }
        echo "<input type='submit' value='$strcontinue' /></form></div>";

    }

    function import() {
        global $CFG;

        list($settings, $newfields, $currentfields) = $this->get_settings();
        $preservedfields = array();

        /* Maps fields and makes new ones */
        if ($newfields != array()) {
            /* We require an injective mapping, and need to know what to protect */
            foreach ($newfields as $nid => $newfield) {
                $cid = optional_param("field_$nid", -1, PARAM_INT);
                if ($cid == -1) continue;

                if (array_key_exists($cid, $preservedfields)) error("Not an injective map");
                else $preservedfields[$cid] = true;

            }

            foreach ($newfields as $nid => $newfield) {
                $cid = optional_param("field_$nid", -1, PARAM_INT);

                /* A mapping. Just need to change field params. Data kept. */
                if ($cid != -1) {
                    $fieldobject = data_get_field_from_id($currentfields[$cid]->id, $this->data);
                    foreach ($newfield as $param => $value) {
                        if ($param != "id") {
                            $fieldobject->field->$param = $value;
                        }
                    }
                    unset($fieldobject->field->similarfield);
                    $fieldobject->update_field();
                    unset($fieldobject);
                }
                /* Make a new field */
                else {
                    include_once("field/$newfield->type/field.class.php");

                    $classname = 'data_field_'.$newfield->type;
                    $fieldclass = new $classname($newfield, $this->data);
                    $fieldclass->insert_field();
                    unset($fieldclass);
                }
            }
        }

        /* Get rid of all old unused data */
        if ($preservedfields != array()) {
            foreach ($currentfields as $cid => $currentfield) {
                if (!array_key_exists($cid, $preservedfields)) {
                    /* Data not used anymore so wipe! */
                    print "Deleting field $currentfield->name<br>";
                    $id = $currentfield->id;

                    if ($content = get_records('data_content', 'fieldid', $id)) {
                        foreach ($content as $item) {
                            delete_records('data_ratings', 'recordid', $item->recordid);
                            delete_records('data_comments', 'recordid', $item->recordid);
                            delete_records('data_records', 'id', $item->recordid);
                        }
                    }
                    delete_records('data_content', 'fieldid', $id);
                    delete_records('data_fields', 'id', $id);

                }
            }
        }

        data_update_instance(addslashes_object($settings));

        if (strstr($this->folder, "/temp/")) clean_preset($this->folder); /* Removes the temporary files */
        return true;
    }
}

?>
2006-09-18 11:42:28 +00:00
skodak dca1937c02 removed references to /requested(teachers?|students?)name/ and 'showsiteparticipantslist' - we are now using only default names stored in langpacks for backwards compatibility 2006-09-18 11:21:24 +00:00
toyomoyo 102d890c14 remove_admin() no longer referenced 2006-09-18 10:47:09 +00:00
vyshane 7aeedc0cfb Removed configshowparticipantslist 2006-09-18 10:26:11 +00:00
toyomoyo 6eccd8f099 add_creator no longer in use 2006-09-18 10:18:26 +00:00
skodak a7a54c3ba1 new metacourse fixes for admin block 2006-09-18 09:58:22 +00:00
skodak 339dc4e28f metacourse fixes for course editting 2006-09-18 09:37:51 +00:00
toyomoyo 24671bd8b4 validation should not watch out for teacher and students string anymore 2006-09-18 09:16:49 +00:00
moodler fdb1cf2cc1 FIxed to use the new debugging function 2006-09-18 09:13:04 +00:00
toyomoyo 65becbc3ef if the user has no capability, after creating a course we add him to the first role with legacy:edittingteacher, to make him a legacy editting teacher 2006-09-18 09:10:03 +00:00
vyshane 16b09a43ca Added moodle/site:viewparticipants 2006-09-18 09:09:25 +00:00
tjhunt 89d878671d Remove duplicate call to print_header 2006-09-18 09:02:30 +00:00
vyshane 840c1c31fa Added moodle/site:viewparticipants 2006-09-18 09:02:12 +00:00
moodler 0bb391b7a0 Fixed some debugging statements 2006-09-18 08:57:23 +00:00
vyshane 218ec889d2 Replaced managesharedfeeds by manageanyfeeds 2006-09-18 08:37:29 +00:00
skodak f5002f10bf metacourses gui fixes, part I. 2006-09-18 08:20:01 +00:00
vyshane f98fe0efad Removed isadmin() 2006-09-18 08:10:20 +00:00
vyshane 6ee81cb55b Got rid of isadmin() calls, added capability checks. 2006-09-18 07:19:38 +00:00
moodler a4e108450f Some trivial tidying of source 2006-09-18 05:50:02 +00:00
vyshane bd574b2a06 Removed isteacher() 2006-09-18 05:29:42 +00:00
vyshane 0019725320 Removed references to showsiteparticipantslist. Replaced by capability. 2006-09-18 05:28:06 +00:00
vyshane 8b8db38e6e Removed showsiteparticipantslist strings. 2006-09-18 05:27:28 +00:00
vyshane dd8d5345ce Removed showsiteparticipantslist, replaced with capability 2006-09-18 05:26:16 +00:00
vyshane b008da9551 Removed showsiteparticipantslist. Replaced with capability. 2006-09-18 05:25:43 +00:00
toyomoyo 353a7269a2 removing word for teachers and students, please use proper role names instead 2006-09-18 04:57:34 +00:00
moodler 09a89b01d0 Nuked nuke. 2006-09-18 03:28:02 +00:00
moodler ad48842401 Automatic installer.php lang files by installer_builder (20060918) 2006-09-18 03:04:28 +00:00
vinkmar cc73de7147 Fixes for MDL-6440 and MDL-6577 2006-09-18 02:41:14 +00:00
vyshane 24bf6cc196 Replaced isteacher() in fullname() call. 2006-09-18 02:28:57 +00:00
mark-nielsen 62bb11d837 Added display default feedback in lesson settings
Led to reducing some redundant code in action/continue.php
Also, a bug fix in locallib.php for function lesson_print_submit_link (needed to add slashes or else js would break)
2006-09-18 01:31:35 +00:00
mark-nielsen 1032b61d3f Added lang entry for display default feedback 2006-09-18 01:29:03 +00:00
mark-nielsen 52f13a25df Help file for displaying default feedback 2006-09-18 01:28:12 +00:00
skodak 1aad431080 metacourse sync now uses roles, I will continue with fixing of GUIs tomorrow 2006-09-17 22:21:37 +00:00
skodak 4b7aaf4025 added new capability 'moodle/course:managemetacourses' 2006-09-17 21:03:35 +00:00
skodak 6e283151b0 fixed some more warnings in uploaduser.php script 2006-09-17 21:02:31 +00:00
skodak a25200709b fixed warning 2006-09-17 20:51:54 +00:00
cap2501 1752e584de Added dialog to confirm deletion of activity. 2006-09-17 18:20:43 +00:00
skodak 09575480bb fixed several warnings in get_course() 2006-09-17 18:07:35 +00:00
skodak 8743f4f3ec removed foter login link during initial phase of installation 2006-09-17 17:53:20 +00:00
cap2501 8a66975e84 cleaned up some formatting 2006-09-17 17:48:27 +00:00
gustav_delius 0839ef65d5 Removed a PHP notice 2006-09-17 17:43:30 +00:00
skodak d847bb32fd fixed non-working edit button on course page for teachers, added explanation comments 2006-09-17 17:32:45 +00:00
moodler 21ef1a8b27 New string 2006-09-17 16:39:12 +00:00
moodler 1cd85caf3f Fixed a typo 2006-09-17 16:10:00 +00:00
moodler 9d05e659cc Rewritten manual enrolment module using new core functions.
(except for the last part of cron function, which is still ugly)
2006-09-17 16:08:34 +00:00
moodler b963384f41 Added new convenience funtions:
get_default_course_role()  - gets default role for enrolment

   enrol_into_course() - enrols a person using the default role
2006-09-17 16:06:25 +00:00
moodler 9c641bd871 Added email_welcome_message_to_user() to send course welcome emails 2006-09-17 16:04:15 +00:00
moodler 41f6ed56ce Don't rely on the legacy capabilities to identify admins, use doanything 2006-09-17 16:00:16 +00:00
skodak c8218a42fa Partial fix for missing deafult values in upgradesettings.php script - MDL-6577 2006-09-17 12:11:23 +00:00
moodler 88af238ccb $CFG->defaultcourseroleid defines a site default for the role given to
people who enrol in the course.

$course->defaultrole defines the value for each course for what role
should be used in the same case.   Naturally it defaults to the site config
(when it is zero).

This role is retained even when the person editing the course settings
doesn't actually have that role in their list of assignable rights (however
they are prevented from actually switching to any such role themselves).

Note that enrol plugins are free to ignore these values and use whatever
roles they like.  Generally, though, they should respect these settings.
2006-09-17 09:22:33 +00:00
moodler b29ab53d31 Removed the setting of default values. The default is now just zero. 2006-09-17 09:08:47 +00:00
skodak 86e2c51da8 infinite loop prevention when unassigning recursively 2006-09-17 08:53:57 +00:00
skodak 4e5f3064bf role assignment and unassignment now propagates to metacourses 2006-09-17 08:42:42 +00:00
moodler ff64aaeaec Just tidying a couple of functions 2006-09-17 07:00:47 +00:00
skodak 7f5bc80b78 backupdata folder is no longer displayed in list of directories when setting up Directory Resource - partially related to MDL-6280 ; and some other typo fixes; get_directory_list() no accepts also array of exluded files 2006-09-17 06:49:26 +00:00
moodler 746a04c500 Adding defaultrole to course table 2006-09-17 06:37:59 +00:00
vinkmar 90cfbd0ab4 Changes required for MDL-6439 made to admin_sitesettext object 2006-09-17 06:08:10 +00:00
moodler 1434a286dd Fixing up script tag for compliance 2006-09-17 03:40:22 +00:00
moodler ce607dd457 Tidying up coursebox teacher listing (no bullets) 2006-09-17 03:38:04 +00:00
moodler ec6eb11097 Sort get_user_roles from most local to most general 2006-09-17 03:33:22 +00:00
moodler 08abf1dc0e Updated tags file 2006-09-17 03:29:56 +00:00
martinlanghoff 5a39def902 re-merge of "Merged fix from 1.6 for Bug #5131 - RSS Feeds and Moving Discussions."
Originally by vyshane - got dropped accidentally in one of the biiiiig roles
commits.
2006-09-17 02:27:13 +00:00
skodak 0d5a9a94c1 fixed recursive backing up of backup folder when resource diretory reference is course files root - MDL-6280 ; merged from MOODLE_16_STABLE 2006-09-16 18:15:40 +00:00
skodak 5434bacabe backupdata folder is not visible in directory resource any more, the backup files were not downloadable, but they might be stored in browser cache when teacher and student were logged from the same browser and computer account - MDL-6280 ; merged from MOODLE_16_STABLE 2006-09-16 17:15:18 +00:00
skodak de9a33f3c9 backupdata folder is not visible in directory resource any more, the backup files were not downloadable, but they might be stored in browser cache when teacher and student were logged from the same browser and computer account - MDL-6280 ; merged from MOODLE_16_STABLE 2006-09-16 17:15:18 +00:00
moodler 88768091a4 Upgrading print_course to use roles properly
Added list for the teacher names for better XHTML
2006-09-16 15:23:41 +00:00
moodler 5b6306677b extending get_user_roles with more options and more returned info 2006-09-16 15:22:55 +00:00
moodler 5fe3980628 Fixed hard-codes string 2006-09-16 14:26:13 +00:00
moodler 38a5e3d34a Just some cleanups and removed notices 2006-09-16 14:22:59 +00:00
moodler 27e1437616 Removing unneeded functions, still needs some modernising 2006-09-16 14:02:51 +00:00
moodler 5c98bf9e3a Enrolments working better now. The core part is done, just the plugins to go.
The enrolment plugins are now checked from load_user_capability()
2006-09-16 13:59:38 +00:00
moodler 99f9cb51e0 Added new capability
moodle/role:viewhiddenassigns  - for people to see hidden assignments
2006-09-16 13:56:24 +00:00
moodler 888fb649a8 Converted deprecated get_teacher() to use new tables 2006-09-16 13:55:30 +00:00
moodler 64026e8c1e Tidy up get_users_with_capability 2006-09-16 13:54:57 +00:00
moodler 5ed3bf228a Fixed a notice 2006-09-16 12:58:50 +00:00
moodler f4af29c5a4 Fixed up some bugs and notices when assigning roles in a user context 2006-09-16 12:41:47 +00:00
skodak 8f8ead90c7 fixed unenrol_student() - now uses roles instead of user_students table 2006-09-16 12:05:31 +00:00
skodak 80f435af43 fixed error message 2006-09-16 12:02:02 +00:00
skodak 14e7869268 fixed uploaduser.php to work with role assignments and groups, new csv columns role1...role5 accepting role ids + updated help file 2006-09-16 12:01:08 +00:00
skodak 7b6a42f5b8 coverted deprecated get_group_students() to use legacy capability instead of user_students table 2006-09-16 06:22:32 +00:00
skodak a05708ad61 fixed $groupidsql in get_users_by_capability() 2006-09-16 05:56:51 +00:00
moodler 4cc028d523 Automatic installer.php lang files by installer_builder (20060916) 2006-09-16 02:50:27 +00:00
moodler d3e47e0d66 Deleting deprecated methods of assigning people to courses 2006-09-15 16:03:49 +00:00
moodler 68a4b5d673 We don't need these any more (obsolete because of role assignment) 2006-09-15 15:56:05 +00:00
moodler 57e73347b3 Fixed up a typo 2006-09-15 15:07:43 +00:00
moodler 4801fe93a2 Various logic and capability fixes 2006-09-15 15:04:38 +00:00
moodler 11c40e2f4e Fixed a bad bug in get_user_roles :-) 2006-09-15 14:56:32 +00:00
moodler e58eca7222 New capability: moodle/user:viewhiddendetails 2006-09-15 14:39:16 +00:00
tjhunt 36075e092d MDL-6041 - Proper fix that eliminates the magic number 99999 when getting lists of studnets. Now, there is no arbitrary upper limit in the datalib functions, and sensible upper limits on pages that display lists of users. However, if you try to get all the site students, then get_students prints a warning in debug mode, telling you that you need to rethink your code.
Also a few more ISNULL()s eliminated.

And a typo role_assignment -> role_assignments.
2006-09-15 14:32:35 +00:00
moodler 4b10f08b88 Rename CONTEXT_USERID --> CONTEXT_USER for consistency 2006-09-15 14:09:16 +00:00
tjhunt f00b7f8d8e The ISNULL() function is a nasty mysql-ism. The standard SQL syntax is "xxx IS NULL". Even mysql supports this, whereas noone else supports the mysql syntax. 2006-09-15 14:00:30 +00:00
moodler 5081e7868d Some SQL fixes 2006-09-15 13:51:42 +00:00
moodler 2939bfe444 Fixed some notices 2006-09-15 13:46:11 +00:00
moodler 405f64c7fd Fixed some SQL error 2006-09-15 13:42:40 +00:00
moodler 2f089dd5f9 Guest account could be getting the default role 2006-09-15 13:28:18 +00:00
moodler 5bd66aa964 Some random quote fixing 2006-09-15 13:26:39 +00:00
tjhunt 4e5a0168f8 Fix typo. 2006-09-15 13:18:28 +00:00
moodler 2febd88e67 Just tidying 2006-09-15 12:53:23 +00:00
ethem 0fbf82ea78 Tidy up 2006-09-15 12:35:08 +00:00
ethem dbe35d21bc Tidy up 2006-09-15 12:05:27 +00:00
ethem a2610c215d Tidy up 2006-09-15 11:40:37 +00:00
ethem 068cf579bd New string for capability: Manage payments 2006-09-15 10:13:06 +00:00
ethem 58b450e92b New string for capability: Manage Payments 2006-09-15 10:11:19 +00:00
ethem 4044e868eb Goodbye old config 2006-09-15 09:57:10 +00:00
vyshane 15dabc3074 Merge from 1.6 stable. Small fixes to make xhtml validate. 2006-09-15 09:38:46 +00:00
moodler c26a8f2ffa FIxed navigation 2006-09-15 09:23:58 +00:00
toyomoyo 71dea306b4 changing lib functions to work with roles, some functions might not work as expected now 2006-09-15 09:08:48 +00:00
moodler b5839add55 Passing cleanup 2006-09-15 09:04:23 +00:00
moodler 6a12bc4836 Bringing phpinfo into the fold 2006-09-15 08:59:02 +00:00
moodler 3bac4f9fce FIxed docs 2006-09-15 08:23:40 +00:00
moodler 3cc8b355c2 Fixed a notice when course->modinfo is empty 2006-09-15 06:16:35 +00:00
moodler b977b0a365 Fixed some subscription typos 2006-09-15 06:15:01 +00:00
moodler e49e61bfe9 Updates for visual stuff 2006-09-15 06:07:29 +00:00
vyshane 67875aa108 Fixed bug in forum_search_posts(). More testing needed still. 2006-09-15 06:04:23 +00:00
moodler 4934c49719 Cleaning up assign and override interfaces 2006-09-15 06:04:10 +00:00
vyshane 3d5fb99f00 Fixed bug in get_records_sql(). This call:
$rs = get_recordset_sql($sql, $limitfrom='', $limitnum='');

should really be:

$rs = get_recordset_sql($sql, $limitfrom, $limitnum);
2006-09-15 06:03:32 +00:00
vyshane e521770c84 Small SQL fix. Removed unneeded WHERE clause 2006-09-15 03:18:59 +00:00
gbateson e69c04db5a do not add $restore->course_startdateoffset to ANY empty dates 2006-09-14 21:50:37 +00:00
moodler 7513cd6936 Tidying 2006-09-14 15:20:44 +00:00
moodler 9584965f9c Tidied up the role assignment pages 2006-09-14 14:49:45 +00:00
moodler 02862df518 Allow columns to be zero 2006-09-14 14:12:51 +00:00
thepurpleblob 6d9b8e5678 Merged from STABLE
Provides fix for bug MDL-5893
2006-09-14 13:59:08 +00:00
moodler 698337128b Reorganise settings a bit 2006-09-14 13:56:27 +00:00
moodler 10e17638da Some fixes to user policies (removed some which are no longer relevant) 2006-09-14 13:54:21 +00:00
gbateson de2ded1a43 moved restorelog code to "hotpot_restore_mods", so it is only executed when backing up a HotPot record. Also, modified restorelog code so that "course_startdateoffset" is not added to TIMEOPEN or TIMECLOSE if those fields are currently empty (empty has a special meaning for those fields) 2006-09-14 11:10:54 +00:00
moodler ca23ffdb74 Don't overwrite capabilities when loading default role 2006-09-14 09:41:09 +00:00
moodler 8f8ed475f7 Added a new setting called $CFG->defaultuserroleid which defines
the role that ALL users get by default when they log in.
2006-09-14 09:39:23 +00:00
toyomoyo ea8158c118 changing sql calls from user_students table to role_assignments table 2006-09-14 09:08:07 +00:00
vyshane b1342e1869 Minor formatting tidyup 2006-09-14 08:57:41 +00:00
vyshane 42fb3c858f Converted forum searches so that they take into account the new Roles system. Search results will only include what the searcher should be able to see based on his/her capabilities. 2006-09-14 08:44:45 +00:00
bobopinna 9b3496f265 Removed two style definitions (bug MDL-6209) 2006-09-14 08:28:26 +00:00
moodler 438c5b8098 Removed a PHP4 notice 2006-09-14 07:35:53 +00:00
gbateson 29f4a60ffe add get_coursemodule_from_id/instance functions for compatability with Moodles <1.7 2006-09-14 07:29:22 +00:00
gbateson 2a532aa68c reduce length of worksheet name to 31 chars if running under Moodle 1.5 2006-09-14 07:17:53 +00:00
gbateson 3c4f45c2d9 remove &nbsp; from blank cells when generating Excel sheet 2006-09-14 07:16:14 +00:00
moodler 966620586e Better handling of forum id/object 2006-09-14 07:13:08 +00:00
moodler 503eecab20 Strip tags from block skip link names 2006-09-14 07:00:43 +00:00
moodler 71832a910b Fixed some typos 2006-09-14 06:54:54 +00:00
moodler d78596d804 Fixed a notice 2006-09-14 06:48:58 +00:00
toyomoyo c5a3467aa0 fixing missing bracket 2006-09-14 06:43:01 +00:00
moodler 89d57596bd Fixed a typo 2006-09-14 06:30:02 +00:00
moodler c64633f6f6 Merged fix from http://moodle.org/mod/forum/discuss.php?d=38860 (Brian Jones) 2006-09-14 05:46:49 +00:00
moodler 09ad59dcb8 Revert to standardwhite if theme is missing MDL-6257 2006-09-14 05:15:06 +00:00
moodler 2fca6e0b26 Fixing up comments on debugging() 2006-09-14 04:31:05 +00:00
moodler fa989c3882 Moved debugging() to weblib.php since it's really about output 2006-09-14 04:25:17 +00:00
toyomoyo 9dcc11eb97 taking out user_student table reference in SQL, replaced with role_assignment 2006-09-14 03:54:37 +00:00
moodler b88b740a80 Remove obsolete themes link MDL-6518 2006-09-14 03:35:19 +00:00
toyomoyo 61b03dc7a6 replacing legacy calls 2006-09-14 03:18:55 +00:00
vyshane 8d9a0ae64b Fix for MDL-6517. Patch by David Mudrak. 2006-09-14 03:18:37 +00:00
gbateson e9be584810 fix for overly advanced version numbers in HotPot module in Moodle 1.5 (see bug MDL-6538) 2006-09-13 23:59:38 +00:00
urs_hunkler 18a6481ffa 'merged from 1.6' 2006-09-13 17:31:35 +00:00
tjhunt aa4f6af41a MDL-6542 - Don't run the unit tests until the user is ready. 2006-09-13 16:19:56 +00:00
tjhunt 45f501a54b Put the unit test styles in the standard theme, rather than using the previous nasty hack that had been broken by the admin page changes. 2006-09-13 16:16:39 +00:00
urs_hunkler 80f7ef6fe9 Merged from 1.6. See bug MDL-6028 2006-09-13 15:23:50 +00:00
tjhunt 404518eb85 Fix ordering problem with question number column headings. 2006-09-13 15:00:58 +00:00
tjhunt aedf2f0b85 Removing Eclipse .project file that Al committed by mistake. 2006-09-13 14:54:51 +00:00
tjhunt 2ec9591c4b Fix typo. 2006-09-13 13:25:11 +00:00
tjhunt 43e3febb23 Delete what I assume is a bogus line. 2006-09-13 13:25:00 +00:00
thompson697 163ff97e84 Complete work on Roll Forwards - Restore from previous semester (MDL-5532)
* Add fields to restore form to enable changes to Short Name, Full Name and Start Date
* Start Date offset added to Restore process
* Created Restorelog file in Course files area
* Activity Modules use offset to change dates
* Activity Modules write changes to Restorelog
2006-09-13 13:19:39 +00:00
moodler ea82d6b638 CHanged a lot of CFG->debug stuff to use the new debuggin() function 2006-09-13 09:45:07 +00:00
thompson697 c3b307b777 Initial work on Roll Forwards - Restore from previous semester (ongoing MDL-5532)
* Add fields to restore form to enable changes to Short Name, Full Name and Start Date
* Start Date offset added to Restore process
* Created Restorelog file in Course files area
2006-09-13 09:40:55 +00:00
moodler ee437bbc2a The debug variable is now much more flexible 2006-09-13 09:22:16 +00:00
toyomoyo 17d6a25e5c adding capabilitiies 2006-09-13 09:08:14 +00:00
moodler bd963c1c7e Fixed up debugging() function so it's more useful. 2006-09-13 08:53:19 +00:00
moodler 4b743adbc3 Deleted the moodle_error_handler after reading the docs more.
it's not really as useful as I thought it might be
2006-09-13 08:41:12 +00:00
moodler e6c5492368 Added a simple moodle_error_hendler function I'm playing with 2006-09-13 08:23:30 +00:00
moodler d6cc763f73 Added forum_role_assign and forum_role_unassign 2006-09-13 08:11:34 +00:00
moodler 3d1885af1e Added some checking that should not be necessary but I had notices in one extreme situation 2006-09-13 08:09:18 +00:00
moodler 0f161e1fee role_assign() and role_unassign() now call these hooks in each module:
xxx_role_assign()

    xxx_role_unassign()

so that modules can do stuff they might need to do (eg subscriptions etc)
2006-09-13 08:07:14 +00:00
moodler e82dc9bb41 Tidy-ups for user profile page 2006-09-13 06:56:25 +00:00
moodler 761a15574c Fixed up this script so that self-unenrolment works as expected 2006-09-13 06:41:58 +00:00
moodler 8d630fda5a Expanded forum_add_user_default_subscriptions() for more contexts
Added    forum_remove_user_subscriptions()
2006-09-13 06:40:30 +00:00
moodler d74067e8e7 1) Fixed API of require_capability() so it matches has_capability()
2) Extended role_unassign to clean up forum subscriptions etc as well
2006-09-13 06:35:25 +00:00
toyomoyo be2e1b6698 removing debug statement 2006-09-13 06:13:53 +00:00
toyomoyo cbf0446d8a use user_lastaccess table to find inactive time instead of user_students table 2006-09-13 06:13:07 +00:00
moodler 94fb6d1d62 fixing a problem where a user hasn't got any entries on the user_lastaccess table, temp solution as this could break other db 2006-09-13 05:55:57 +00:00
moodler 050c78c41d Missed some $COURSE conversion 2006-09-13 05:33:09 +00:00
moodler cb80265b21 Tidying add_to_log slghtly 2006-09-13 05:31:12 +00:00
toyomoyo 8ca1053a45 changed to outer join as user_lastaccess table could contain null 2006-09-13 05:29:26 +00:00
moodler 7da0af9feb Fixed some obvious typos 2006-09-13 05:05:17 +00:00
moodler 040e8fd8b8 Removed duplicate defines 2006-09-13 04:13:50 +00:00
moodler 9103fd10f8 Use $COURSE and not the $course hack 2006-09-13 04:11:36 +00:00
vyshane 29ac3cc28d Capability tweaks for rss_client block 2006-09-13 04:10:41 +00:00
vyshane 73b73d2101 More capabilities tweaks 2006-09-13 04:09:31 +00:00
vyshane 48f6bcddd2 Fix for blocks capability updates. Somehow missed this commit last night. 2006-09-13 04:08:58 +00:00
mark-nielsen fa9234e0e0 New strings (added a missing one); made the essay email string much more sane 2006-09-13 04:03:45 +00:00
vyshane 0c4d9f492e moodle/site:manageblocks tweak 2006-09-13 03:56:38 +00:00
mark-nielsen 260a56b114 Added some more stats to reports, added more actions to collapsed view and increased speed of lesson by using lesson_set_message() and redirects with 0 second delays. 2006-09-13 03:42:16 +00:00
vyshane 1975d8bd3e Added $USER->id in rss_display_feeds() call 2006-09-13 03:02:57 +00:00
vyshane 7d02b43640 Fixed typo 2006-09-13 02:59:20 +00:00
stronk7 f0b50bbe89 Now the "AFTER" clause is supported by add_field() 2006-09-12 22:58:04 +00:00
stronk7 48c2be79be Now we support to use the previous attribute in fields declaration 2006-09-12 22:56:52 +00:00
stronk7 f521d32b71 Two new functions added: add_field() and drop_field() 2006-09-12 22:23:00 +00:00
stronk7 12bda5832f Two more tests added: add_field() and drop_field() 2006-09-12 22:21:51 +00:00
stronk7 0bd921db9e Added support for add_field and drop_field 2006-09-12 22:20:50 +00:00
stronk7 0dd87cfa7a Delete one trailing comma 2006-09-12 22:15:44 +00:00
stronk7 3ab2610037 Added functions to retrieve the proper add and drop field SQL. 2006-09-12 22:15:00 +00:00
stronk7 d256743c5b When dropping columns, look for check constraints and drop them too. 2006-09-12 22:13:45 +00:00
stronk7 ec68af222e Ops, forgot to delete some debug... :-/ 2006-09-12 21:30:13 +00:00
stronk7 2a02841762 MSSQL needs to drop the default constraint before being able to drop the column 2006-09-12 21:24:03 +00:00
skodak c15f680424 partially fixed group management in workshop 2006-09-12 21:09:43 +00:00
skodak 33e7885ee0 fixed group management in wiki 2006-09-12 21:07:54 +00:00
skodak 3fde1a3d2f groups assignment now works with assigned roles instead of user_students and user_teachers 2006-09-12 20:55:58 +00:00
skodak bc202f4390 fixed harcoded string "Select a Role" 2006-09-12 20:54:21 +00:00
skodak be382aafb3 get_component_string() now works for all enrollment plugins MDL-6522 2006-09-12 20:03:08 +00:00
skodak 69eb59f28a Changed sort order in Role definition page MDL-6522 2006-09-12 19:54:33 +00:00
stronk7 3be91b01b6 Added support for add_field, drop_field and rename_field PHP code generation. 2006-09-12 17:45:25 +00:00
stronk7 cb78437d64 Changed some PHP comments. 2006-09-12 17:41:22 +00:00
stronk7 88bf021308 Fixed buggy condition. Now defaults are properly calculated by getPHP() 2006-09-12 16:45:46 +00:00
stronk7 9a96282f2c Added rss_client->shared 2006-09-12 15:24:41 +00:00
stronk7 8b9b510961 adding the user_lastaccess table 2006-09-12 15:19:10 +00:00
tjhunt 3542314884 Update help file to match the changes in the code and on Moodle docs I made some time ago. 2006-09-12 14:33:38 +00:00
moodler 32b9a98349 Fixed a bug that must have been there for a while, so that guest icons work again 2006-09-12 14:02:15 +00:00
moodler 1845f8b80e Revamped require_login() function to handle roles better. 2006-09-12 09:31:23 +00:00
moodler e4d81c60a9 Tidying up a bit 2006-09-12 09:30:05 +00:00
moodler b1ce7811ad Fixed MDL-6479 by adding two block columns on admin pages.
Also we now hide the blocks and headers completely until $SITE is properly
defined.
2006-09-12 09:22:27 +00:00
toyomoyo ae9e4c064e replacing iscreator() calls with capabilty 2006-09-12 08:56:10 +00:00
moodler ecf22ff31c DOn't show "Add" links if you can't use them 2006-09-12 08:28:36 +00:00
vyshane f7cf2f8efd Fixed bug preventing capability upgrades for blocks. Typo :( 2006-09-12 08:25:03 +00:00
moodler 0f9602085b Small bump for guest role fix 2006-09-12 08:22:14 +00:00
moodler 0ad8c7850d Reload default guest 2006-09-12 08:17:33 +00:00
moodler b0f5523038 Missed one capability for guests 2006-09-12 08:15:07 +00:00
toyomoyo dfe603583e changed code to use the user_lastaccess table instead of the user table 2006-09-12 07:39:25 +00:00
toyomoyo 174526f4f1 changed code to use the new user_lastaccess table instead of the log table 2006-09-12 07:38:46 +00:00
toyomoyo 87e5a0cd9e changed code to use get_role_users function 2006-09-12 07:38:07 +00:00
toyomoyo ab5c904411 added function get_role_users - returns all users assigned this role in this context (or higher) not very useful for participants list because of the count and paging. Could possibly expand it 2006-09-12 07:37:23 +00:00
moodler 8d158ed44f Reload the guest role using new defaults 2006-09-12 07:10:49 +00:00
moodler 2e85fffeb1 FIxed some typos and other logic related to assign_capabilities 2006-09-12 07:07:30 +00:00
vyshane 93b7e8d3a7 Fake constructor for PHP5 2006-09-12 06:58:42 +00:00
vyshane 23973f1856 Modified to support Roles. 2006-09-12 06:57:05 +00:00
vyshane 6c052a02f9 Added lang string 2006-09-12 06:55:40 +00:00
moodler e7876c1e34 Added new load_guest_role() for guest access, and made assign_capability()
smarter about pre-existing capabilities (new param allows overwriting or not)
2006-09-12 06:15:33 +00:00
toyomoyo b277dd0a53 adding new table for keeping track of user's last access time for any course page 2006-09-12 06:08:57 +00:00
moodler 00adf177ad Changed some default permissions for the guest role 2006-09-12 05:58:42 +00:00
moodler 22ef89f1d7 Automatic installer.php lang files by installer_builder (20060912) 2006-09-12 02:46:13 +00:00
stronk7 05483f7367 And one more string... 2006-09-11 22:08:26 +00:00
stronk7 eafc2b70e8 Some more improvements. Not finished yet. 2006-09-11 22:06:35 +00:00
koenr 550015cdac updating index files MDL-3484
More work to be done. Checked upto cost.html
2006-09-11 21:52:57 +00:00
skodak 244368e643 fixed default values and types of requested teacher and student strings 2006-09-11 21:24:57 +00:00
skodak 8dcc447689 fixed funny continue button during installation 2006-09-11 21:20:47 +00:00
koenr 30cef24b15 updating index files MDL-3484 2006-09-11 21:14:12 +00:00
skodak 6ec7ca0f07 fixed handling of selected language in installer; fixed selection of session language 2006-09-11 20:41:49 +00:00
koenr 4cf65d091c updating index files MDL-3484 2006-09-11 20:21:54 +00:00
skodak 2b156ffbf3 old admin block not added into frontpage during installation anymore, it is not removed during upgrade. 2006-09-11 20:05:31 +00:00
skodak 4da8ff666b wiki now using new groups parameter in get_users_by_capability() 2006-09-11 20:01:17 +00:00
skodak 5f02cb4b44 lams conversion to new roles framework 2006-09-11 19:54:11 +00:00
skodak 55f3a4db69 removed useless "changes saved" messages from redirects in administration and user management 2006-09-11 18:56:41 +00:00
stronk7 5f7053955a Some new strings to display PHP code. 2006-09-11 15:51:13 +00:00
stronk7 a05452e942 teachergraded belongs to workshop_assessments, not to workshop. ;-) 2006-09-11 15:38:51 +00:00
stronk7 c8e4134bc9 teachergraded belongs to workshop_assessments,
not to workshop_submissions ;-)
2006-09-11 15:33:51 +00:00
stronk7 c5a6ae177a Initial verion. Not working yep but I needed to send it now. 2006-09-11 13:15:36 +00:00
nfreear 8ea144bf77 Fixes MDL-6516, "Error on logs page because of mess in mdl_log_display table" 2006-09-11 11:40:43 +00:00
toyomoyo 1c45e42e3c adding capabilities 2006-09-11 08:56:23 +00:00
moodler 25b0fd8ec8 New tags 2006-09-11 08:42:55 +00:00
moodler 9e7f597e49 Updated some docs 2006-09-11 08:25:49 +00:00
moodler 8350325842 Some missing strings I forgot to check in 2006-09-11 08:24:40 +00:00
moodler bcf0138ded Automatic installer.php lang files by installer_builder (20060911) 2006-09-11 08:09:58 +00:00
toyomoyo 39b3e7dedf adding capaility, fixing indenting and logic (could have broken things) 2006-09-11 07:17:10 +00:00
moodler 4ae6d4115f New hook for Moodle 1.7 enrolment plugins 2006-09-11 07:09:41 +00:00
skodak 3435f39bab validate local redirection actions in jumpto.php SC#310 2006-09-11 06:47:38 +00:00
vinkmar c235598d6a Added feature from MDL-6439. A validate method is now supported for admin_configtext objects, and paramtype can now be a regex to validate against. 2006-09-11 05:06:38 +00:00
vyshane 6e89ca5527 Fix for MDL-6405 2006-09-11 03:13:52 +00:00
mark-nielsen 831f6613a8 Very minor changes 2006-09-10 22:50:43 +00:00
mark-nielsen 68a1e8fbba Started to rework the overall page editing interface for teachers. 2006-09-10 22:47:57 +00:00
mark-nielsen 82c57929b0 Added lang entries for Collapsed editing 2006-09-10 22:40:41 +00:00
skodak 451d82c840 move newly created admin_tree block to the left column during upgrade from 1.6 2006-09-10 22:11:46 +00:00
skodak d541baa141 fixed courseid typo 2006-09-10 22:01:39 +00:00
koenr 30b73673ba typo 2006-09-10 21:11:57 +00:00
koenr a79bc11152 updating index files MDL-3484 2006-09-10 21:11:43 +00:00
skodak aa893d6b76 fixed several bogus errors and warnings during installation and upgrades, forced logout when upgrading from 1.6 2006-09-10 21:10:48 +00:00
stronk7 2ebd596764 Avoid one minor error when tables hasn't comments to be defined. 2006-09-10 21:05:55 +00:00
skodak e46c09873a fixed warning during initial install when creating admin roles 2006-09-10 20:29:44 +00:00
skodak ee3cc9951c basic conversion of old wiki to new roles framework 2006-09-10 19:44:28 +00:00
mark-nielsen 07642aef3e Minor changes 2006-09-10 19:09:25 +00:00
stronk7 a84634a1d4 improved display of errors... 2006-09-10 18:53:47 +00:00
mark-nielsen 8f2f1d4761 Fixed display bug for branch tables and moved message setting to the bottom of continue.php to prevent double message setting when a redirect is called. 2006-09-10 18:50:59 +00:00
stronk7 7ac75a8f61 tests are tests 2006-09-10 18:43:51 +00:00
stronk7 091789788f Linking to the tests from the main page. 2006-09-10 18:42:23 +00:00
mark-nielsen c94d37997d Removed action set to navigation because view.php no longer uses action 2006-09-10 18:41:38 +00:00
stronk7 f4bb0ad8f7 Adding support for tests of DDL statements within the XMLDBEditor 2006-09-10 18:41:34 +00:00
stronk7 83a78d9d17 PHPDoc update. 2006-09-10 18:37:57 +00:00
stronk7 b8359f7965 Adding options for continue and feedback to all the DDL functions. 2006-09-10 18:36:50 +00:00
mark-nielsen 5631925a26 Started to separate out logic and presentation in view.php. Decided to wrap the question printing with HTML templates (viewstart.html and viewend.html)
Still needs a lot of work
2006-09-10 18:19:29 +00:00
skodak fefea008bc fixed errors when switching dbsessions from amin gui 2006-09-10 11:15:31 +00:00
skodak b6508d6344 fixed proper redirection url in login - missing trailing slash for directory 2006-09-10 11:04:17 +00:00
moodler 613bbd7c2b Moving deprecated functions out of datalib.php
Many of these still need updating to remove all dependence on user_xxx tables
2006-09-10 07:07:52 +00:00
gbateson c73eb55dcc correct formatting of "Show Legend" -> "No" and added missing <p> in "Encoding" explanation 2006-09-10 05:34:02 +00:00
gbateson ce33e12da1 remove reportselector.html as it was unused and has been replaced by reportcontent.html and reportformat.html 2006-09-10 05:29:24 +00:00
mark-nielsen a4452c8a14 Added better lang strings for output in view.php 2006-09-10 04:35:12 +00:00
mark-nielsen fb992d716a Started to reorganize view.php 2006-09-10 02:38:09 +00:00
mark-nielsen 15f3d44ae7 Moved teacherview (lesson editing) out of view.php into edit.php
No code improvements in edit.php as of now.  Just works ;)
2006-09-10 02:09:14 +00:00
mark-nielsen 9695a91e2f Fixed sesskey problem 2006-09-10 01:43:24 +00:00
mark-nielsen 8d1b4ee7b5 Added proper page comments and inform user when attempts have been deleted 2006-09-10 01:40:38 +00:00
mark-nielsen d2d7f39064 Added page comment and lang entry for reports.php 2006-09-10 01:37:50 +00:00
mark-nielsen 35b179fa73 Updated to use new handy library functions 2006-09-10 01:30:57 +00:00
mark-nielsen d1b025d013 Moved high scores logic out of view.php into highscores.php
Changed: now need to enter password on password protected lessons before being able to view high scores
Added logs to high scores and reworked logic
2006-09-10 01:20:00 +00:00
mark-nielsen 8def4a4ea2 Changed some lang entries for high scores feature 2006-09-10 01:17:30 +00:00
mark-nielsen 09e3b9d7eb Fixed some formatting when clock is not displayed
Messages are now printed out on continue.php
2006-09-09 22:33:34 +00:00
mark-nielsen 2163c22634 Forgot the lesson_ prefix 2006-09-09 22:23:50 +00:00
mark-nielsen 2cb24b647c Improved clock output and works when javascript is disabled 2006-09-09 22:20:51 +00:00
mark-nielsen 259990d2c6 Lesson buttons should now work with javascript disabled
Also improved the layout of action/continue.html
2006-09-09 21:39:11 +00:00
stronk7 d6745c7087 Now we are using the new sql_order_by_text() function
when we need to be able to order by TEXT columns in a
cross-db behaviour. More info:
http://docs.moodle.org/en/XMLDB_Problems#ORDER_BY_text_columns
2006-09-09 13:53:52 +00:00
stronk7 5f45d2ae80 New function sql_order_by_text() to automatically build
custom expresions to being used in ORDER BY clauses with
TEXT columns.
2006-09-09 13:51:40 +00:00
mark-nielsen 3466ae4f14 Cleaned up output to user. Still needs a lot of work. 2006-09-09 02:10:40 +00:00
mark-nielsen f15eb92c2c Removed essay grading code from view.php into essay.php. 2006-09-09 01:58:48 +00:00
mark-nielsen e6bfc97018 Added a few lang entries and modified one or two 2006-09-09 01:55:57 +00:00
mark-nielsen 6e1ff5c8fb MDL-6477: Added roles support.
Also added lesson_set_message() and lesson_print_message() to locallib.php
Also fixed problem in continue.html with not printing nextpageid
2006-09-08 23:17:18 +00:00
stronk7 ccfc5ecca1 Only send contexts to cache if the aren't empty. At initial installations
some empty contexts were being cached and used later, causing insertion
of null values to every DB but MySQL.
2006-09-08 19:28:03 +00:00
skodak a13d2157f4 fixed wrong placement of comma 2006-09-08 15:53:24 +00:00
skodak cbba1191ed fixed typo - trailing backslash 2006-09-08 15:51:11 +00:00
thepurpleblob 04d677f2e9 Merged from STABLE 2006-09-08 10:27:48 +00:00
toyomoyo 51792df056 adding capabilities 2006-09-08 08:46:26 +00:00
vyshane 46943f7b78 Seems that the unassign_capability function signature was changed without updating the call to that function in capabilities_cleanup(). Fixed. 2006-09-08 02:33:02 +00:00
mchampan 0d46c846da Fixed couple bugs in query, and improved logic of querylib. 2006-09-08 01:18:48 +00:00
stronk7 3a27bb0575 Modify a bunch of INSERTs to avoid using empty fields
to allow Oracle to avoid the NULLs = empty problem.
2006-09-07 23:50:47 +00:00
stronk7 e20d180c11 DIRTY HACK to convert back all the ' ' (1 space) field contents
back to '' (empty string) in order to allow Oracle to work, more
or less until all the not real NOT NULL DEFAULT '' fields were out!

TODO: Apply the same hack to some more functions...
2006-09-07 23:48:48 +00:00
stronk7 42ac3ecffc Solving one string concatenation typo (please, test it's ok) and
stripping the AS keyword from table aliases. You cand find more at:
http://docs.moodle.org/en/XMLDB_Problems#Table_and_column_aliases_-_the_AS_keyword
2006-09-07 20:17:46 +00:00
skodak 42d6be31d1 double redirect prevention - if both 'meta http-equiv' and javascript redirects are used, javascript delay is 3 seconds longer to prevent accidental double redirects. The target page can still be loaded twice in case user clicks the link before the target page gets fully loaded. 2006-09-07 19:40:57 +00:00
skodak 5d3e0e837a removed redirect message, because it was sometimes breaking upgrades due to double redirects 2006-09-07 19:18:48 +00:00
stronk7 3a8c55c3fb Typos + drop table fully supported. 2006-09-07 18:39:43 +00:00
stronk7 8830218f53 Initial support for DROP TABLE adedd. 2006-09-07 17:28:46 +00:00
stronk7 8bb7147620 If one course, hasn't teaches, both under roles and no-roles
installations, default to admin language.
2006-09-07 17:25:06 +00:00
vinkmar 0f4a73b0dd Fixed bug (sectionname mismatch) similar to MDL-6475 2006-09-07 16:15:35 +00:00
moodler 26f9c81507 Fixed a typo (thanks Eclipse) 2006-09-07 15:46:48 +00:00
vinkmar 502871b479 Fixed MDL-6475. 2006-09-07 14:53:07 +00:00
nfreear 22a3b7ccef Fixes bug MDL-6478 "Unit tests (not) working.." 2006-09-07 09:11:55 +00:00
toyomoyo ec7a8b7999 adding capabilities 2006-09-07 08:57:56 +00:00
moodler f43ce1ad1d Added moodle/role:unassignself which replaces $CFG->allowunenroll 2006-09-07 08:35:30 +00:00
stronk7 05a43ba36c Initial RenameTable caller to generators. Not ended by I needed it in CVS now. 2006-09-06 23:05:12 +00:00
stronk7 d05babe913 Initial, unfinished, not working, simple version of rename_table generator.
More coming soon, but I needed it in CVS now!
2006-09-06 23:04:13 +00:00
stronk7 386c23c9da PHP code for dropping and renaming tables added. Note that the DDL
functions doesn't exist yet. ;-)
2006-09-06 22:34:09 +00:00
stronk7 3ab430fbc5 The XMLDBEditor is generating automatic PHP code for create_table 2006-09-06 19:49:13 +00:00
stronk7 aed4e52713 Now indexes are able to return their PHP specs. 2006-09-06 19:47:50 +00:00
stronk7 989a41af6f Now keys are able to return their PHP specs. 2006-09-06 19:43:38 +00:00
stronk7 7b31a94e08 Now fields are able to return their PHP specs. 2006-09-06 19:31:03 +00:00
ethem 6cf30eae96 all static functions in enrolment_plugin_authorize moved to localfuncs.php. So, no need enrol.php. 2006-09-06 15:39:32 +00:00
stronk7 428aa337b8 Disable regexp searches for MSSQL and Oracle 2006-09-06 15:30:11 +00:00
stronk7 8289a52ff0 Now forum searches are working both under MSSQL and Oracle
(in a case-sensitive behaviour for Oracle, see code comments and
http://docs.moodle.org/en/XMLDB_Problems#Case-insensitive_searches)
2006-09-06 15:29:26 +00:00
skodak 43149d3a9f fixed description of configprotectusernames 2006-09-06 11:36:00 +00:00
skodak e91f3c2d6b fixed missing if (! 2006-09-06 10:15:05 +00:00
skodak 6a5a62b096 allow less verbose operation of forget_password.php SC#282 2006-09-06 10:11:24 +00:00
toyomoyo d02eededf7 adding capabilities 2006-09-06 08:55:23 +00:00
vyshane 180f410694 Merged fix for bug MDL-5866. 2006-09-06 08:54:56 +00:00
skodak 6b9a1fec8f initial conversion of workshop to new roles and capabilities framework; groups are not functional yet (did they ever work properly ?) 2006-09-06 08:41:47 +00:00
moodler b649a19e20 Some tidying up of admin blocks 2006-09-06 05:24:35 +00:00
mark-nielsen c5a2e12f08 Added $Id$ to files
Header is not printed for all actions.  Related to MDL-5403
Some redundant code removed
First attempt at separating logic and presentation in action continue (continue.html)
2006-09-06 04:04:42 +00:00
mark-nielsen 9fcf51d9bf Added function for printing a standard header for lesson
Added function for fetching course module, course and lesson based on course module id or lesson id
2006-09-06 04:02:02 +00:00
vinkmar 7683a0377d removed pause during redirect when there are no new settings 2006-09-06 02:36:38 +00:00
vinkmar 8f89a26c21 * removed hard-coded language strings (MDL-6448)
* replaced some remaining tabs with spaces
2006-09-06 02:23:23 +00:00
vinkmar 7f35bd73b4 removed hard-coded language strings (MDL-6448) 2006-09-06 02:20:16 +00:00
vinkmar dad4a3ff0b added strings for MDL-6448 2006-09-06 02:18:51 +00:00
moodler 6d0bd10c0a A temporary icon for roles (needs work!) 2006-09-06 02:16:48 +00:00
toyomoyo 26663a2386 replacing isteacher with viewfullname capability 2006-09-06 02:14:20 +00:00
moodler d4649c76cc Removed some tabs 2006-09-06 01:43:54 +00:00
skodak c3768dfc70 testing forced conversion to proper numeric type in _adodb_column_sql() SC#259 2006-09-05 23:59:25 +00:00
stronk7 9eabd190c1 Now forum_get_discussions() is using $limitfrom and $limitnum 2006-09-05 22:37:56 +00:00
skodak c5836b7814 fixed typo 2006-09-05 22:34:25 +00:00
stronk7 b66458257d Adding support for MSSQL and Oracle in this select. Not really sure why we need one OUTER
join there, if every discussion has one usermodified but.....not time now.
2006-09-05 22:31:13 +00:00
stronk7 3c4f35e645 Mark as deprecated the sql_paging_limit_function() 2006-09-05 21:42:20 +00:00
stronk7 93a89227fd One less use of old LIMIT clause. Now logs are working properly. 2006-09-05 21:40:17 +00:00
skodak dbe7e58274 I spent 2 hours looking for this typo :-D 2006-09-05 20:45:57 +00:00
stronk7 5de6e614d4 No need to specify DISTINCT because u.* guarantees unique ids.
Also, DISTINCT clauses cannot be used with TEXT/BINARY columns
on MSSQL and Oracle.
2006-09-05 19:04:33 +00:00
stronk7 405bc45cf6 No need to specify DISTINCT because u.* guaranties distinct by id. 2006-09-05 19:01:41 +00:00
stronk7 270643ca72 Modified get_users_by_capability() call to use the new limit
parameters and cleanup a bit of code.
2006-09-05 18:57:37 +00:00
stronk7 0441764040 Changed the get_users_by_capability() function to work with
1.7 DB compatible limit sentences.
2006-09-05 18:55:16 +00:00
stronk7 3c242a66f5 Now get_records_sql() supports limitfrom and limitnum.
Required to kill all those hardcoded LIMIT x,y clauses.
2006-09-05 18:53:08 +00:00
stronk7 e4697bf7dc Both Oracle and MSSQL don't like double quotes for literals. 2006-09-05 18:06:53 +00:00
stronk7 bc942ab58a Added support to retrofit tables without prefix 2006-09-05 17:55:59 +00:00
stronk7 415280bfc3 Added the adodb_logsql table to the XMLDB schema. It's a bit
exceptional because it hasn't prefix and originaly it hasn't
any PK, although we have added it here to be more Moodle-like.
Tested and seems to work properly with the new field.
2006-09-05 17:20:24 +00:00
stronk7 2e2a396ca3 Added to the generators the ability of prevent adding prefix for some tables.
(needed by adodb_logsql)
2006-09-05 17:17:49 +00:00
stronk7 88ab6ab46b Deleted duplicate table label2 from XMLDB schema 2006-09-05 16:09:15 +00:00
stronk7 ea7f147ef5 Now the sessions2 table is UTF8 migrated ok. 2006-09-05 16:04:50 +00:00
moodler 957861f785 Better robustness and basic checking for get_parent_contexts 2006-09-05 09:30:40 +00:00
moodler 43c5b272af New string for blocks 2006-09-05 09:16:19 +00:00
moodler dbed4286da Cleaned up headers when editing roles for blocks 2006-09-05 09:15:52 +00:00
toyomoyo 3924b9884b adding capabilities 2006-09-05 08:50:23 +00:00
skodak e778a40617 minor include cleanup 2006-09-05 08:27:14 +00:00
moodler 91be52d78e Get the block name correctly 2006-09-05 06:30:12 +00:00
moodler ccbdfdc720 Just changed the order around a bit 2006-09-05 06:13:53 +00:00
moodler 2244c22d72 Use the new config variable as a default for paging 2006-09-05 06:11:48 +00:00
moodler 42093cca5c Added coursesperpage so paging can be controlled 2006-09-05 03:28:25 +00:00
moodler 61647ccb92 Use the defaultsetting if the variable isn't set yet 2006-09-05 03:27:08 +00:00
moodler 75e8eaebe7 Merged MDL-6431 into HEAD 2006-09-05 03:15:09 +00:00
vyshane 4729012f4c Fixed warning 2006-09-05 03:07:56 +00:00
cap2501 c572cc4dc6 updates to accommodate changes to commands.php 2006-09-05 00:50:08 +00:00
cap2501 5be392bd10 Updated so nothing in the database is being manipulated directly except for the block position. look into moving this functionality into the blocks_execute_action. 2006-09-05 00:47:47 +00:00
stronk7 ccda38e521 Don't use db_lowercase() anymore. 2006-09-04 22:45:12 +00:00
stronk7 6b4b356f82 Using the standard sql_as() function, although it could be not used. 2006-09-04 22:42:56 +00:00
stronk7 95f610334e Mark two functions as deprecated because that's standard now. 2006-09-04 22:40:42 +00:00
stronk7 fda5418401 $CFG required. 2006-09-04 22:30:56 +00:00
stronk7 010f2a3977 Typo! :-( 2006-09-04 22:17:28 +00:00
stronk7 bf05229983 MSSQL only runs under UTF8 (with the correct ODBTP driver, of course) 2006-09-04 22:16:30 +00:00
stronk7 94ef00f3bb MSSQL and Oracle don't want DISTINCT clauses over TEXT/BINARY fields.
In this case, we simply delete it because SELECT g.* guarantees unique
records to be retrieved by the first field.
2006-09-04 22:05:58 +00:00
vinkmar 8f5c4adbd7 Changed so that the settingpage titles are shown (see MDL-6402) 2006-09-04 21:38:23 +00:00
stronk7 fea43a7f51 Casting $course->modinfo to string prevents one notice to
be showed when it's null, returning false as desired.
2006-09-04 21:12:37 +00:00
stronk7 0703d22ede One less reserved word. glossary->comment is out! 2006-09-04 20:37:27 +00:00
skodak 4b83ec33fe merging collisions cleanup 2006-09-04 20:32:59 +00:00
stronk7 d0d5525d93 Included course/lib.php to be able to rebuild_course_cache()
It was working until some time ago, but now it's required.
2006-09-04 19:33:27 +00:00
stronk7 71db9136fb Now the temp backup directory is properly created/cleaned
and indexes info are properly stored there.
2006-09-04 19:27:53 +00:00
ethem 9456e4b7be *** empty log message *** 2006-09-04 12:31:54 +00:00
ethem b4efae98b4 New strings for echecks. 2006-09-04 12:25:21 +00:00
ethem 131a7ca81b New config: Echeck bank account types enabled. 2006-09-04 12:09:30 +00:00
ethem 4d072568c0 New string: adminaccepts; Select payment methods allowed and their types 2006-09-04 12:09:25 +00:00
ethem 460635599a Autoconfigure accepted echeck bank account types. CHECKING, BUSINESSCHECKING, SAVINGS 2006-09-04 09:44:00 +00:00
toyomoyo cc398c7262 adding caapabilities 2006-09-04 08:45:08 +00:00
moodler 6ea5ff3ab7 Make Moodle Docs work for settings pages 2006-09-04 08:33:57 +00:00
moodler c2da075758 Further reductions in logic to deprectaed functions 2006-09-04 08:31:07 +00:00
vyshane 1795175972 Re-worded comment to make more sense 2006-09-04 08:19:23 +00:00
moodler dd46fc5daa Just some small doc changes 2006-09-04 08:15:48 +00:00
vyshane b331040e9e TCPDF pdf library 2006-09-04 08:11:37 +00:00
vyshane 713b20faae Wrapper class with modifications to TCPDF for Moodle usage. 2006-09-04 08:10:08 +00:00
skodak 6d574c33b4 fixed missing global $USER 2006-09-04 08:01:57 +00:00
ethem 039edfab07 This merchant accepts eCheck (ACH) transactions only; no credit card transactions are accepted. 2006-09-04 07:51:15 +00:00
ethem f1b31fb517 Allow all payment methods as default: AN_METHOD_CC, AN_METHOD_ECHECK
authorizenetlib.php autoconfigures payment method as AN_METHOD_CC if the merchant doesn't accept AN_METHOD_ECHECK. First real echeck transaction is enough for this.
2006-09-04 07:33:11 +00:00
ethem 07c48fcff6 Error message isn't shown when user clicked button without key if course key is set. 2006-09-04 07:09:44 +00:00
toyomoyo 2acc290c17 legacy functions to use 4th parameter to by pass doanything capability 2006-09-04 04:50:12 +00:00
moodler be7ed5f8a8 Merged confirmation email fix from stable 2006-09-04 02:30:52 +00:00
stronk7 dcb8916f2d notice() should be allowed at install/upgrade. It stops the whole
process without need to do it. Changed to notify().

Thanks to one "orphan" forum in moodle.org (234) we detected this.
2006-09-03 22:32:14 +00:00
stronk7 446a78cd4a notice() should be allowed at install/upgrade. It stops the whole
process without need to do it. Changed to notify()
2006-09-03 22:30:13 +00:00
stronk7 56b4d70d58 typo ;-) 2006-09-03 21:43:37 +00:00
stronk7 afc36fdf2e Patch submitted by Ethem:
Error message isn't shown when user clicked without key.
Multienrol is enabled (course enrol key with authorize)

This patch allows showing error message when user clicked button without key.
2006-09-03 20:16:24 +00:00
stronk7 71c143f41e The custom function to convert the user table hasn't to drop/create indexes anymore.
It's handled automatically by the main utf8 script.
2006-09-03 19:20:01 +00:00
stronk7 763989c0d6 Now, the UTF8 migration doesn't rely one indexes specified in the .xml files. Instead,
for each table, it fetches all the existing indexes from db, drop them all and, after
utf-8 conversion, rebuilds them.

With this, all the indexes will be exactly the same than the original present in DB, no matter
of their names nor anything else.

So, starting now, to provide a sucessful UTF8 migration we only have to keep updated the
fields .xml info. Bye, bye indexes info.
2006-09-03 19:18:00 +00:00
skodak 15ad37459a fixed language string 2006-09-03 19:13:53 +00:00
skodak 64c4f9c443 minor fix 2006-09-03 18:53:07 +00:00
skodak 08c15b68d7 removed useless includes 2006-09-03 18:49:13 +00:00
skodak b1631fef28 add admin_tree to front page during install and upgrade 2006-09-03 18:37:41 +00:00
stronk7 4762bff7a3 Added the feedback attribute to the execute_sql_arr() function. 2006-09-03 17:56:34 +00:00
skodak e9a207595c allow deleting of block when original code not present 2006-09-03 17:46:27 +00:00
moodler 460a7a6271 Cutting down on the debug notices 2006-09-03 16:31:46 +00:00
moodler 7191a1fa27 Added capability for showing documentation links 2006-09-03 16:26:55 +00:00
moodler 72df7e1ebd Merging $CFG->disablestatsprocessing from stable 2006-09-03 15:46:21 +00:00
stronk7 de48394039 Prevent NULL fields in 1.7 to become NOT NULL after the UTF-8 migration process. 2006-09-03 15:33:42 +00:00
skodak f21def1f11 fixed collisions in merges, sorry 2006-09-03 15:21:46 +00:00
moodler 11737b8bfa Fixed module links to suit new admin/*.php file page names 2006-09-03 15:13:53 +00:00
moodler 1ea1bcb36b New admin menu files 2006-09-03 14:52:43 +00:00
moodler de093f77a6 Proper log index.php so that admin pages work correctly 2006-09-03 14:52:23 +00:00
moodler bee4702d10 Various tidying up of the admin pages.
Reports now don't need mod.php but they should include the admin headers/footers.

There are undoubtedly bugs in this but this framework should be more sane
2006-09-03 14:45:57 +00:00
moodler 996a5f8d76 These files still need tidying 2006-09-03 14:43:41 +00:00
skodak 50999a0b94 new admin block fixes and reorganisation - I guess we need something more traditional for now 2006-09-03 13:10:56 +00:00
gustav_delius b7ef492c41 Take out invalid </tr>. While this makes the html valid some work should still be done on the layout of this. 2006-09-03 12:23:11 +00:00
gustav_delius 5b3df41fd9 The file countries.php does not exist in lang/en, only in lang/en_utf8. Therefore the fallback default in the function get_list_of_countries() should always be en_utf8. 2006-09-03 11:38:45 +00:00
moodler 51df210337 Upgrade_log stuff needed adminlib.php included 2006-09-03 09:00:13 +00:00
moodler d90f5d7b01 New tags file 2006-09-03 08:56:05 +00:00
moodler fc8db0e791 Use proper way to get config values :) 2006-09-03 08:48:39 +00:00
moodler 4d2401d524 Removed student view 2006-09-03 08:46:30 +00:00
moodler dc411d1be0 Fices bug when loading another user's capabilities (it would trash your own) 2006-09-03 08:45:41 +00:00
moodler d5a0163891 Removed student view completely until a roles-ased replacement can be made 2006-09-03 08:10:51 +00:00
moodler c4d0753b25 Moving deprecated functions to deprecatedlib.php from moodlelib.php and
some cleanups around the place.

Many of the functions in deprecatedlib.php have been rewritten to work with
the new roles and capabilities so that they can still work as well as possible.
2006-09-03 08:10:10 +00:00
moodler 02bd14a7ed Tidy-ups 2006-09-03 08:03:02 +00:00
moodler e084b2f98b Replaced forum_get_user() with forum_add_user_default_subscriptions() 2006-09-03 08:01:48 +00:00
moodler 1911105fa1 Fixed typo 2006-09-03 08:00:03 +00:00
moodler 7700027f40 Improvements to load_notloggedin_role for robustness and clarity.
More checking in role_assign and calling of forum_add_user_default_subscriptions
2006-09-03 07:56:40 +00:00
skodak 6eb4f82357 fixed missing return in assign_role() 2006-09-03 07:29:06 +00:00
skodak 7fbd539a18 version bump for db upgrades 2006-09-03 00:00:17 +00:00
skodak 02cc05a708 fixes for new admin blocks 2006-09-02 23:55:56 +00:00
stronk7 623942afff Allowinng tables to create fields/keys/indexes using the one-pass-setters 2006-09-02 23:52:55 +00:00
stronk7 76fd473623 Added one-pass-setters for fields/keys/indexes. 2006-09-02 23:51:39 +00:00
stronk7 cb62712c6d Added some used strings 2006-09-02 23:49:02 +00:00
stronk7 4dc4dde9e2 First implementation of the create_table() function. Simple. 2006-09-02 23:48:02 +00:00
stronk7 228d8c20d7 New function execute_sql_arr() to execute arrays of
statements, Used by ddllib.php mainly.
2006-09-02 23:46:43 +00:00
stronk7 b0c7d55893 Skeleton of the view_php helper. 2006-09-02 23:44:06 +00:00
stronk7 3430fb2993 Only launch the old upgrade if it exists. It doesn'texist for new DB
flavours and modules.
2006-09-02 23:40:13 +00:00
stronk7 ec87d0474f Don't asume that table and column exist in the migration process.
Just to avoid some warnings.
2006-09-02 23:38:16 +00:00
stronk7 1331745826 course_sections->summary and course_sections->sequence can be NULLable (experimenting....) 2006-09-02 22:37:38 +00:00
skodak 4672d9557d added prune() to admin tree class to prevent errors in applying of backup defaults 2006-09-02 19:30:54 +00:00
skodak e0f6e99528 fixed frontpagesettings, install is not useing admin/site.php anymore 2006-09-02 15:29:52 +00:00
skodak a4b473f452 fixed site defaults, reorganized administartion tree - new category legacy for obsoleted settings 2006-09-02 15:05:27 +00:00
ethem be59e14b9e Remove +}
I like this format:
{
}

not {
}
2006-09-02 15:05:10 +00:00
ethem 134c20fb14 Link to CVV help 2006-09-02 14:28:55 +00:00
ethem dedc048c92 CVV 2006-09-02 14:26:17 +00:00
ethem d019150d5b Link to ABA help 2006-09-02 14:11:54 +00:00
ethem e44aa47ceb ABA help 2006-09-02 14:11:51 +00:00
ethem f6a1084c8b ABA help 2006-09-02 14:08:31 +00:00
ethem 6ce17f1ff0 Don't show "Notice: Undefined property: paymentmethod" 2006-09-02 13:42:28 +00:00
skodak e95b2c1c6d fixed missing } 2006-09-02 13:39:27 +00:00
skodak 6e4dc10f54 deglobalization of $ADMIN; merged admin/adminlib.php into lib/adminlib.php; fixed includes and some other minor fixes 2006-09-02 13:14:57 +00:00
ethem 5b7e05d646 Submit buttons (ccsubmit, echecksubmit) are no longer used. Hidden field paymentmethod is enough for checking forms. 2006-09-02 13:09:21 +00:00
ethem c8716d80e2 Better handling of forms and configs. 2006-09-02 12:37:01 +00:00
ethem e3949d06af Moved all static functions in authorize class to localfuncs.php as normal function.
Removed abaval.php and ccval.php, because functions in these files moved to localfuncs.php.
2006-09-02 11:49:02 +00:00
skodak 86a1ba04fd replace all uses of isset($USER->id) with empty() to allow proper operation of $CFG->notloggedinroleid hack 2006-09-02 11:44:04 +00:00
skodak 741fee9bb0 more install time fixes for new admin code 2006-09-02 11:26:33 +00:00
skodak 99c8a1004d fixed defaults for backups during installation 2006-09-02 11:10:10 +00:00
stronk7 803b4eeffe Now, not null fields are respected by the UTF-8 migration process. Also,
for those NULLable fields, if the default was '', convert it to null (i.e.
disable de default).
2006-09-02 10:04:22 +00:00
skodak 35a518c5de fixed admin defaults, some warnings during install and added trmporary hack to make $CFG->notloggedinroleid work 2006-09-02 10:03:30 +00:00
moodler 73254f625a Automatic installer.php lang files by installer_builder (20060902) 2006-09-02 02:42:41 +00:00
gbateson c2e04a5df1 improve detection of PostgreSQL version number 2006-09-01 22:44:07 +00:00
stronk7 681ba47a59 Only mysql and postgresql show the UTF-8 migration message. 2006-09-01 18:41:30 +00:00
stronk7 d32d63b6e0 Now record_exists_sql() uses the cross-db limit implementation. 2006-09-01 18:33:19 +00:00
stronk7 0be16c1d8c mssql doesn't support aliases nor position numbers in the
GROUP BY clause. Just columns and expressions.
2006-09-01 18:24:09 +00:00
stronk7 8351e29517 Introduced one function to calculate the proper "AS"
keyword for columns. All DB seems to support it but
PostgreSQL require it!
2006-09-01 17:45:02 +00:00
ethem d69ce8d4eb Echecks can not be cancelled.
2 actions only for echecks: auth_capture and credit
2006-09-01 17:16:08 +00:00
ethem 0c76d7e375 New string: paymentmethod 2006-09-01 16:43:52 +00:00
stronk7 e9f02dafca New md5key fields and associated indexes.
Now hotpot should be 100% cross-db. Thanks Gordon!
2006-09-01 15:36:49 +00:00
ethem a2cfb0ec00 FFFFFFFFAAAAAANNNNNNTTTTTAAAAASSSSTTTTTIIIIICCCCC
Echeck is ready for usage. I've been buying access into some test courses by echeck. :-)
2006-09-01 15:18:22 +00:00
ethem 0fae43aa7b + Don't show AVS message if not applicable.
+ Email message that translated instead of english if cc type and payment method will be autoconfigured.
2006-09-01 15:05:36 +00:00
moodler 4dc40740ba New installer lang files. 2006-09-01 14:30:58 +00:00
bobopinna 773534f4a2 Added multi-attemps support 2006-09-01 10:17:01 +00:00
toyomoyo 20aeb4b8e3 utf8 migrate support for site with roles active, resolved isstudent legacy problem, implemented $CFG->notloggedinroleid 2006-09-01 09:25:34 +00:00
ethem 7222c36bf8 * New strings for Authorize.net eCheck.
Authorize.Net provides an exclusive, fully integrated electronic check payment method, eCheck.Net.
Using eCheck.Net, merchants can accept and process payments from consumer and corporate bank accounts
directly from their Web site or through the Authorize.Net Virtual Terminal. By accepting electronic checks,
you expand the payment options available to new and existing customers, enhancing customer loyalty and
potentially increasing sales.

+ Lower Fees - Lower rates than credit cards or PayPal.
+ More Efficient - eCheck.Net does everything online, eliminating the cost and inconvenience of manually
  processing paper checks and waiting for checks in the mail.
+ Fully Integrated Solution - No third-party integration required implementing eCheck.Net is easy
  for merchants already using the Authorize.Net Payment Gateway.
+ Integrated Reporting - Provides a combined view of all eCheck.Net and credit card payment transactions.
  Reconcile payment and billing activity using online reports and statements.
+ Ship Product Sooner - Improved up-front transaction validation that returns the status of transactions faster.
+ Security - Authorize.Net uses the latest 128-bit Secure Socket Layer (SSL) technology for
  secure Internet Protocol (IP) transactions.
2006-09-01 09:04:11 +00:00
gbateson e1af293f5f fix bug MDL_6419 2006-09-01 08:55:43 +00:00
moodler 9aeeb39286 forum subscriptions use capabilities 2006-09-01 06:56:24 +00:00
moodler 9ebcb4d28e if role_assign is called by the current user on themselves, then reload
the capabilities table
2006-09-01 06:30:01 +00:00
moodler 1dc1f03795 More flexible role_unassign() that allows setting of any combination of arguments 2006-09-01 06:10:45 +00:00
gbateson a70b3fbb4c correct the detection of HotPot 2.0 backups (from Moodle 1.5) 2006-09-01 04:24:34 +00:00
gbateson 3044600bf3 add md5key field to end of hotpot_questions and hotpot_strings 2006-09-01 04:20:19 +00:00
gbateson 5048c8d658 fixed typo on line 2 2006-09-01 02:18:41 +00:00
gbateson 1897e3ef95 replace MySQL-only indexes on text fields (hotpot_question.name + hotpot_strings.string) with two new md5key fields (hotpot_question.md5key + hotpot_strings.md5key), which are the MD5 hash of the respective text fields. Microincrement version number to 2006083101 2006-09-01 02:08:39 +00:00
stronk7 5f941d12ab user->description can be NULLable (experimenting....) 2006-08-31 23:31:36 +00:00
stronk7 9b99c05f10 user->description can be NULLable (experimenting....) 2006-08-31 23:20:47 +00:00
stronk7 6c76032bc1 course_categories->description can be NULLable (experimenting....) 2006-08-31 23:17:23 +00:00
stronk7 1d39207fae course_categories->description can be NULLable (experimenting....) 2006-08-31 23:04:15 +00:00
stronk7 17c9113752 This condition was preventing new installs sometimes 2006-08-31 22:42:04 +00:00
stronk7 a0abf36ddd This condition was preventing new installs sometimes. 2006-08-31 22:33:18 +00:00
skodak 441470ff03 fixed problem with applying of default settings during install - choices can not be constructed yet 2006-08-31 22:17:47 +00:00
skodak dd04ab499e fixed default values in apply_default_exception_settings(); several values in lib/default.php are wrong, but I guess we do not need to fix them because it as replaced by the new administration framowork ;-) 2006-08-31 21:50:22 +00:00
skodak 3a25fa7286 'prefix' can only be defined in config.php, it can not be changed or stored in database ;-) 2006-08-31 21:15:12 +00:00
rtcn2 9fb0f61a03 missing comma inserted line 752, removed comma from line 753 2006-08-31 19:47:54 +00:00
stronk7 545196c55f course->modinfo nullable and no default 2006-08-31 19:42:22 +00:00
stronk7 99215f2c6f modinfo nullable and without default. 2006-08-31 19:39:18 +00:00
ethem 79c63c4415 + New ENUM field: paymentmethod(cc,echeck);
Store in database and when calling authorize_action() pass this method. Hence, removed $method=AN_METHOD_CC from this function.
    If a refund will be do, unset($order->paymentmethod); Because this field comes when joining(enrol_authorize)

+ AN_METHOD_CC and AN_METHOD_ECHECK is now lower case, because these fields are stored in database as enum.
  Eloy's response:
   They are lowercase because we decided to use lowercase identifiers everywhere and enum contents are,
   from a DB perspective, identifiers.

  Ok, NP. :)) set_config('an_acceptmethods', strtolower($CFG->an_acceptmethods)); solves this.
2006-08-31 18:24:37 +00:00
tjhunt 6459b8fc8d Give a bit more information to the subclasses. 2006-08-31 16:59:52 +00:00
stronk7 a974b5a4d8 course->modinfo can be NULLable (experimenting....) 2006-08-31 16:59:29 +00:00
tjhunt d3b92b4ba5 MDL-6418 - Grading of multiple choice questions broken 2006-08-31 16:59:05 +00:00
tjhunt 73d4db845e New function choose_from_menu_yesno 2006-08-31 16:55:48 +00:00
skodak 2b53194573 fixed riskbitmask problems, sorry :-( 2006-08-31 16:01:41 +00:00
ethem 555759709c If the method is AN_METHOD_CC submit cclastfour, don't send for ECHECK. 2006-08-31 15:46:53 +00:00
ethem c024e8c6f2 Fixed fixo. 2006-08-31 15:10:24 +00:00
tjhunt 695d225c6a Clarified comment. 2006-08-31 11:28:44 +00:00
bobopinna 77bf0c292d Fixed a typo 2006-08-31 10:37:33 +00:00
bobopinna 0d699c2449 Fixed context selection 2006-08-31 10:29:16 +00:00
skodak 6086e1aab2 removing trustbitmask for now and comment from riskbitmask 2006-08-31 09:20:24 +00:00
thepurpleblob 2bb63d99c2 Fixed syntax error. 2006-08-31 09:17:57 +00:00
toyomoyo 4f83ae95ca adding capabilities 2006-08-31 08:51:09 +00:00
skodak be4486da83 capability riskbitmasks and user trustbitmask patch #1 see MDL-6412 2006-08-31 08:36:36 +00:00
bobopinna 2b3447c38a Added capability support 2006-08-31 08:34:13 +00:00
moodler 86cbff7abd Clean up for role_assign() 2006-08-31 08:30:28 +00:00
ethem 9f7f87a9a6 If the merchant does not accept ACH (echeck) method, set default payment method as AN_METHOD_CC. 2006-08-31 08:06:19 +00:00
moodler f44152f44c Added "enrol" parameter to role_assign which records how this assignment
was made
2006-08-31 07:58:53 +00:00
skodak eb744c5ef7 redirect() now always respects delay 0 if specified + some minor changes 2006-08-31 07:45:58 +00:00
moodler a9e1c058d5 More robustness fixes for accesslib 2006-08-31 07:40:48 +00:00
ethem fde7c9dfc5 Added Echeck UI validation. 2006-08-31 07:11:31 +00:00
moodler c5ddc3fd8b More defensive get_parent_cats() 2006-08-31 05:06:30 +00:00
moodler 5f70bcc3a0 Some robustness when loading capabilities 2006-08-31 04:17:51 +00:00
moodler cf0b6604e0 Removed tabs
This block still needs work to merge with the new admin pages
2006-08-31 04:00:01 +00:00
stronk7 4782a1f8bc Minor modifications to oci8po generator (max 38 for number) 2006-08-31 00:19:57 +00:00
stronk7 790647b950 Block plugin tables can use the XMLDB install & upgrade 2006-08-31 00:02:06 +00:00
stronk7 1164af7cf5 Block core blocks tables can use the XMLDB install & upgrade 2006-08-30 23:18:29 +00:00
stronk7 015e946d98 Small rework of the main install/upgrade script. Everything should
continue working as before.
2006-08-30 23:13:43 +00:00
cap2501 62cb403260 Updated front-end display to accurately represent how moodle is handling things on the backend. 2006-08-30 21:39:09 +00:00
cap2501 305f223035 Switched over to using moodle commands instead of direct DB manipulation for everything but blocks(still working on that one). 2006-08-30 21:38:23 +00:00
stronk7 94ab72f8b0 Now backup tables can use the XMLDB install & upgrade 2006-08-30 20:41:37 +00:00
stronk7 450cf307ea Triple "l" were preventing new installations to be executed for plugins. 2006-08-30 20:27:29 +00:00
stronk7 7c006e345a Minor separations... 2006-08-30 20:13:46 +00:00
stronk7 e79a09a259 Now plugins (qtypes and enrols) can use the XMLDB install & upgrade 2006-08-30 19:52:16 +00:00
ethem a1c4676cf1 User fields for ECHECK 2006-08-30 19:38:28 +00:00
cap2501 ff96b9df7e Added the 'delete' methods back nessicary to change $field to optional. 2006-08-30 19:22:34 +00:00
ethem 2c50dc0b63 Some UI stuff for ECHECK 2006-08-30 19:12:28 +00:00
ethem 35f4a0772a Autoconfigure credit card types. This is not a Makefile :))) 2006-08-30 18:59:53 +00:00
stronk7 81465066c2 Just "normalizing" index names inside the XMLDBEditor. Not critical but...
Following rule 1.3 from:
http://docs.moodle.org/en/XMLDB_Defining_one_XML_structure#Conventions
2006-08-30 17:17:39 +00:00
stronk7 2813c04ba9 One new error string added. 2006-08-30 17:14:57 +00:00
ethem e2863967c6 Added ABA validation funtion. 2006-08-30 17:14:32 +00:00
stronk7 b4f3a93b01 Improve save file, showing the proper error if not writeable. 2006-08-30 17:12:00 +00:00
skodak e9d5166a3e fixed wrong type for session data field in mysql, enabled feedback when dropping old session table during upgrade 2006-08-30 16:37:52 +00:00
stronk7 393e7cc373 where BIG should be LONG... 2006-08-30 16:14:44 +00:00
stronk7 914597ee9f ...where = should be == ... 2006-08-30 16:06:16 +00:00
tjhunt 1680ebe40b Eliminate an isteacheredit 2006-08-30 15:52:11 +00:00
ethem d1b86e65cc Some documentation. 2006-08-30 14:33:31 +00:00
ethem edbe60abb6 Deleted comment. 2006-08-30 14:16:45 +00:00
ethem 75bb06e0aa Some UI changes. 2006-08-30 14:06:40 +00:00
ethem 6b1d27020d Ported AUTHORIZE_ECHECK changes into HEAD. (cvs update -j HEAD -j AUTHORIZE_ECHECK)
* New Feature (Authorize.net eCheck)

Authorize.Net provides an exclusive, fully integrated electronic check payment method, eCheck.Net.
Using eCheck.Net, merchants can accept and process payments from consumer and corporate bank accounts
directly from their Web site or through the Authorize.Net Virtual Terminal. By accepting electronic checks,
you expand the payment options available to new and existing customers, enhancing customer loyalty and
potentially increasing sales.

+ Lower Fees - Lower rates than credit cards or PayPal.
+ More Efficient - eCheck.Net does everything online, eliminating the cost and inconvenience of manually
  processing paper checks and waiting for checks in the mail.
+ Fully Integrated Solution - No third-party integration required implementing eCheck.Net is easy
  for merchants already using the Authorize.Net Payment Gateway.
+ Integrated Reporting - Provides a combined view of all eCheck.Net and credit card payment transactions.
  Reconcile payment and billing activity using online reports and statements.
+ Ship Product Sooner - Improved up-front transaction validation that returns the status of transactions faster.
+ Security - Authorize.Net uses the latest 128-bit Secure Socket Layer (SSL) technology for
  secure Internet Protocol (IP) transactions.


== TO DO ==

- Generate Echeck forms.
- Show users a echeck option if admin enabled echeck method.
- Allow admins/teachers to enrol a student using echeck method (FIX: role consept)

==========
2006-08-30 10:29:10 +00:00
skodak d78f25b8c0 fixed missing semicolon typo 2006-08-30 09:17:40 +00:00
skodak e1ecc9fbbe imported newer PCLZIP library; added directory restriction to our own security checks 2006-08-30 08:51:57 +00:00
toyomoyo 81e956b964 added some capabilities 2006-08-30 08:43:17 +00:00
skodak 849bbccfbb ADODB v4.92a import 2006-08-30 08:12:11 +00:00
skodak 61212e3f96 better input validation in files/index.php SC#307 2006-08-30 08:03:12 +00:00
skodak 02b22073b8 more appropriate type for locale setting 2006-08-30 07:42:42 +00:00
toyomoyo 247cdeb68f utf8 migrate support for additional fields MDL-6339 2006-08-30 06:12:12 +00:00
moodler 2328673a12 Automatic installer.php lang files by installer_builder (20060830) 2006-08-30 02:44:42 +00:00
stronk7 13c2ed6410 Removing DTD and XMLSchema. It's under lib/xmldb 2006-08-30 00:11:36 +00:00
stronk7 758537ef2a relative+cleaned paths 2006-08-30 00:10:08 +00:00
stronk7 ee7de32ea3 relative+cleaned paths 2006-08-29 23:53:46 +00:00
stronk7 fc3221015d relative+cleaned paths 2006-08-29 23:45:08 +00:00
stronk7 2a05e82571 relative+cleaned paths 2006-08-29 23:33:55 +00:00
stronk7 68905e201b relative+cleaned paths 2006-08-29 23:29:28 +00:00
stronk7 8f5b5e4f68 relative+cleaned paths 2006-08-29 23:20:03 +00:00
koenr 51b8bebb7a updating index files MDL-3484 2006-08-29 23:08:28 +00:00
skodak 647a256616 db sessions are now using the newer session handler adodb-session2.php 2006-08-29 22:45:54 +00:00
stronk7 2af2711f79 relative+cleaned paths 2006-08-29 22:45:46 +00:00
stronk7 d81f3415ca relative+cleaned paths 2006-08-29 22:26:57 +00:00
stronk7 077505db10 cleaned paths 2006-08-29 22:21:13 +00:00
stronk7 115a73653a relative+cleaned paths 2006-08-29 22:17:25 +00:00
skodak a68f983779 fixed $zthis typo in postgres7 driver, Eloy is reporting it upstream 2006-08-29 22:06:31 +00:00
stronk7 a0da32e935 Moving getEndedStatements() to the propef function. 2006-08-29 21:57:40 +00:00
stronk7 fd6a294ff6 relative+cleaned paths 2006-08-29 21:26:46 +00:00
stronk7 4317fe985e relative+cleaned paths 2006-08-29 21:07:59 +00:00
koenr 8775961a89 updating index files MDL-3484 2006-08-29 21:02:16 +00:00
stronk7 c080aa88d7 relative+cleaned paths 2006-08-29 20:50:44 +00:00
skodak 5e0ff187c7 better handling of anchor name in docs index SC#306 2006-08-29 20:38:23 +00:00
skodak c0e3c8d2b2 import of new ADODB v4.92 library 2006-08-29 20:23:17 +00:00
stronk7 a199036810 Now the "created" field is refreshed always in the main list. 2006-08-29 19:27:34 +00:00
vinkmar 9fdc896535 adding (slowly) strings from soc admin page cleanup 2006-08-29 17:02:35 +00:00
vinkmar 3a64b2d144 fixed the duplicate "Themes" page (well, not quite duplicate, but confusing nonetheless) 2006-08-29 17:00:23 +00:00
vinkmar f36d9a82b8 adding a more obvious heading to the page :) 2006-08-29 16:59:19 +00:00
ethem 98d415567c If review enabled, get_users_by_capability('enrol/authorize:managepayments') at SYSTEM_LEVEL and send email for a new pending payment. 2006-08-29 14:30:11 +00:00
ethem 70b1aa8071 get_users_by_capability('enrol/authorize:managepayments') and send email for pending orders expiring. 2006-08-29 13:59:35 +00:00
ethem 0c10124755 merged from 16stable 2006-08-29 09:04:03 +00:00
tjhunt 32b0adfade Better comments 2006-08-29 08:57:47 +00:00
toyomoyo f9a59efa64 adding some capabilities 2006-08-29 08:43:59 +00:00
toyomoyo 8493ff6fd5 added acapability 2006-08-29 06:02:29 +00:00
moodler 3511c16cfd Minor change to prevent bugs while Ed works on not needing this parameter at all. 2006-08-29 04:04:12 +00:00
toyomoyo be07f21b61 replaced isguest with capability calls 2006-08-29 03:36:31 +00:00
toyomoyo 0bde63002a adding in capabilities 2006-08-29 03:22:05 +00:00
toyomoyo 38ac07d284 adding capability, indenting, putting in brackets etc 2006-08-29 03:20:51 +00:00
cap2501 d63545d8e8 Fixed errors in refactoring ( rev4, almost there) 2006-08-29 02:34:35 +00:00
moodler 0e4af1664c New param type, PARAM_SEQUENCE for 5,6,7,8,9 2006-08-29 02:26:37 +00:00
vyshane 7b12414814 Fix for bug MDL-6385 2006-08-29 02:09:31 +00:00
cap2501 7c72c2889a updates to accommodate retooled command.php 2006-08-29 02:03:00 +00:00
cap2501 dad4a8e5d7 Fixed errors in refactoring ( rev3, almost there) 2006-08-29 02:02:45 +00:00
cap2501 5281e0ab2a Fixed errors in refactoring ( rev2) 2006-08-29 01:38:58 +00:00
cap2501 6fe72833d0 Fixed errors in refactoring 2006-08-29 01:35:45 +00:00
cap2501 04ba9d5330 updates to accommodate retooled command.php 2006-08-29 01:35:01 +00:00
skodak b735d140ef fixed regex typo in installer 2006-08-28 22:09:44 +00:00
skodak 790fda7b0e show detailed log messages only when debug is not off SC#303 2006-08-28 21:33:21 +00:00
stronk7 840391757e Initial commit of XMLEditor langpack. 2006-08-28 21:33:03 +00:00
skodak d389b12829 create safer .htaccess SC#302 2006-08-28 21:07:43 +00:00
skodak add47d44d0 check suggested dataroot in install.php SC#295 2006-08-28 20:54:16 +00:00
skodak 57e35f328a basic detection of sites with misconfigured dataroot SC#295 2006-08-28 20:11:24 +00:00
mark-nielsen ab8e5428b5 Merged bug fix for MDL-6325 2006-08-28 20:02:49 +00:00
stronk7 8c15ae9958 Moving all the XMLDB stuff from contrib to head. Go, go, go... 2006-08-28 19:50:57 +00:00
tjhunt f0a7247d0e Fix typo. 2006-08-28 18:50:42 +00:00
skodak bad211a3b9 enabletrusttext can not be 1 by default - it is new, not much tested and maybe even insecure feature ;-) 2006-08-28 18:46:37 +00:00
skodak 635c0e0b4a turning on the upgrade in progress check again, added skip warning link 2006-08-28 18:07:15 +00:00
stronk7 683ff5d4f3 Dropping forum.open and forum.assesspublic
(mimic from .sql files)
2006-08-28 16:20:52 +00:00
stronk7 ba05965e5c Messages about missing functions in old and new upgrade are showed
only if the corresponding file exists.
2006-08-28 15:47:45 +00:00
stronk7 b477a2f166 Changing one wrong previous value. 2006-08-28 15:21:41 +00:00
moodler 5bfecd388d Cleaned up the code to remove security issues and to show Ed Coyne
how to use the Moodle API and follow coding guidelines.

I think I broke something but I'm sure Ed can fix it from here!
2006-08-28 14:42:07 +00:00
gustav_delius e57d9d69f7 Small correction in the documentation for the $CFG global 2006-08-28 09:00:38 +00:00
toyomoyo 1648afb278 changes to how to pull out a list of users (course/module participants) 2006-08-28 08:42:30 +00:00
vyshane 7654b2bb08 Added lang string 2006-08-28 07:30:07 +00:00
moodler 9250203ff5 Added a better string as per MDL-6379 2006-08-28 07:12:10 +00:00
moodler b2174cc86b FIxed some file paths 2006-08-28 06:57:40 +00:00
moodler c5eef32d56 New strings for AJAX setting 2006-08-28 06:51:46 +00:00
moodler a0bfbeaae8 Integrated topicsajax into "topics" 2006-08-28 06:49:19 +00:00
moodler 67a3fac51f Added new field 'ajax' to user table, to store AJAX preference 2006-08-28 06:41:05 +00:00
vyshane e823cd13fa Cleanups 2006-08-28 06:36:36 +00:00
vyshane 620e1e5b27 Fixed notice. 2006-08-28 06:14:58 +00:00
vyshane d50ccb9932 Fixed notice 2006-08-28 06:14:06 +00:00
vinkmar f1700fab26 Install/upgrade procedures changed to use $ADMIN instead of defaults.php and config.php.
See http://moodle.org/mod/forum/discuss.php?d=52636 for details
2006-08-28 06:02:00 +00:00
cap2501 fbca9f0f57 Removed frame around draggable blocks and fixed 'short drag' bug. 2006-08-28 04:33:41 +00:00
cap2501 0dcb53d545 removed override for $USER->use_ajax 2006-08-28 04:30:46 +00:00
vyshane 5ce6f628ba Dropping forum.open and forum.assesspublic from .sql files. Added forum
upgrade to roles code to postgres7.php.
2006-08-28 03:51:38 +00:00
cap2501 2f661649b0 *** empty log message *** 2006-08-28 02:49:04 +00:00
moodler 668896e531 It's not required that all modules have the old upgrade function and
the new upgrade function.
2006-08-28 02:10:23 +00:00
cap2501 931ef52833 added description for topics - AJAX format 2006-08-28 02:08:37 +00:00
cap2501 4a1a14c9d3 added nessicary code for ajax course format 2006-08-28 02:06:04 +00:00
cap2501 d4df8fdcae small changes, also de-tabbed and unix fomatted 2006-08-28 02:05:02 +00:00
vinkmar 9519ee2eb7 * admin_setting defaults added 2006-08-28 01:32:11 +00:00
vinkmar d83f27cefe * documentation started in adminlib.php
* default for block editing changed to "off" (bug in previous revisions)
* added defaults for all admin_setting's
2006-08-28 01:31:37 +00:00
cap2501 49884e9702 Removed evil tabs 2006-08-27 23:45:36 +00:00
cap2501 9a900dfc07 converted dos mode to unix mode 2006-08-27 23:28:39 +00:00
cap2501 097579f09c Fixed to eliminate use of 'GET' and 'POST' 2006-08-27 22:58:51 +00:00
stronk7 716332e68b Added support to SQL generation of statements 2006-08-27 22:31:02 +00:00
stronk7 9dbc13db9a Concat operator for mysql added 2006-08-27 22:25:41 +00:00
stronk7 b96aaad125 Concat operator for mssql added 2006-08-27 22:24:09 +00:00
stronk7 a75636b7ed Added support to SQL generation of statements 2006-08-27 22:22:23 +00:00
cap2501 ee3c87bd84 Fixes needed to work from cvs 2006-08-27 22:09:56 +00:00
stronk7 efd1e2032d Added support to SQL generation of install INSERTs 2006-08-27 21:59:04 +00:00
stronk7 3655a6b39f Set magic_quotes_sybase for both mssql and oci8po.
Anyway, this isn't enough and if must be defined in php.ini
or .htaccess, because GPC are added BEFORE this setting
has effect so they are slashed with the default char.
2006-08-27 21:57:33 +00:00
stronk7 de64b6c69e modify stripslashes_safe() to work properly under magic_quotes_sybase
(both addslashes and stripslashes do it properly based on the setting)
2006-08-27 21:52:22 +00:00
skodak f2b5d7e3b7 trusttext implementation in Forum module, fixed incorrect merging, added missing postresql upgrade code, some other minor fixes 2006-08-27 20:45:04 +00:00
danmarsden 6ba7f08774 Fix for MDL-4190 - when admin is editing profile, admin loses all subscriptions to forums. 2006-08-27 20:33:54 +00:00
skodak 7af25328c2 fixed cosmetic typo - missing semicolon before closing tag 2006-08-27 18:38:16 +00:00
skodak 9d4cb9e33b New handwritten XMS schema for install.xml files, generator is fixed to link it too. It is not doing all the checks as XMLDB editor from contrib, but it helps to detect basic problems in general XML editors - such as the one in Eclipse ;-) It can serve also as basic documentation of the install.xml format. 2006-08-27 18:33:37 +00:00
koenr 6494526340 typo - Thanks Mits! 2006-08-27 18:02:23 +00:00
stronk7 d1c21c8f31 Very, very, very, very initial support of insert_record for oracle.
I shouldn't interfere with the rest at all. I needed it in CVS now.
2006-08-27 09:02:41 +00:00
stronk7 d6eb06b60b Initial commit supporting install/upgrade inder XMLDB. 2006-08-27 09:00:23 +00:00
stronk7 f2e0049dec Just remove one condition previously checked. 2006-08-27 08:58:09 +00:00
stronk7 b8851b80eb Cache names for improved speed in long iterations requesting
the same name thousands of times.
Prepare Oracle Sequnces for the insert_record function.
2006-08-27 08:52:51 +00:00
koenr c7a872cbcf updating index files MDL-3484 2006-08-27 08:26:48 +00:00
koenr 4d6cb85c3b updating index files MDL-3484 2006-08-27 08:20:34 +00:00
skodak 168fa2c1d1 reverting isguest() changes 2006-08-27 08:10:03 +00:00
koenr 7d06e3b3be updating index files MDL-3484 2006-08-27 08:09:03 +00:00
koenr 702a3aafa7 typo 2006-08-27 08:01:24 +00:00
koenr 0bb3edbcff updating index files MDL-3484 2006-08-27 08:00:42 +00:00
koenr b85953c847 updating index files MDL-3484 2006-08-27 07:31:10 +00:00
koenr 936678268c updating index files MDL-3484 2006-08-27 07:13:40 +00:00
skodak cf8eaebb06 fixed warning in glossary recent activity from deteted entries 2006-08-26 19:38:32 +00:00
skodak b3e570450f removing some isteacher()s from glossary 2006-08-26 19:19:36 +00:00
skodak 18d8a6a741 isguest() compatible with roles 2006-08-26 18:42:56 +00:00
skodak 907cf31821 trusttext cleaning in glossary upgrade - definitions and comments 2006-08-26 18:08:18 +00:00
skodak daed1a2f37 minor trusttext fix 2006-08-26 17:39:31 +00:00
skodak b8dc934baa fixed table already exists problem during install and upgrade in Opera 2006-08-26 17:20:52 +00:00
skodak 7d8a3cb06a trusttext:
* proposed by Martin Dougiamas
 * implemented by skodak

Usage:
1/ change enabletrusttext to yes in site settings (it is off by default) or set it in config.php
2/ assign moodle/site:trustcontent capability to users whose text submitted in glossary entries, comments, forum posts etc. should not be cleaned == they can use javascript or any other forbidden tags in glossary and forums...

done:
 * core
 * glossary (without proper upgrade)

to do:
 * data cleaning in upgrades
 * forum, blocks and some other places (MD decides)
2006-08-26 13:00:07 +00:00
moodler 8618b509fd Automatic installer.php lang files by installer_builder (20060826) 2006-08-26 02:48:03 +00:00
stronk7 c8a418b8d6 Max for decimal type in MSSQL is 38 cc. 2006-08-26 00:50:09 +00:00
stronk7 7e8f922047 Adding back the first column in the recordset, that is out after GetAssoc(),
in order to:

- Don't get our first named column under some drivers.
- Be able to migrate to ADODB_FETCH_ASSOC soon.

For more info, http://docs.moodle.org/en/XMLDB_Problems,
in the  ADOdb fetch mode (ASSOC, NUM and BOTH) section.
2006-08-26 00:08:11 +00:00
mark-nielsen c87a341cb9 Merged bug fix for bug MDL-6323 2006-08-25 22:53:17 +00:00
skodak 426a369bfa fixed missing continue button during upgrade when using dbsessions 2006-08-25 20:50:44 +00:00
skodak 9425b25f46 Many bugs and typos fixed in capabilitties and legacy isteacher() and similar functions - not many lines changed but it was a looong coding day.
Roles and capabilities should be usable now and old unconverted code should work too :-D

Tested only in fresh installation - admin, teacher and student roles should sort of work.
2006-08-25 20:12:12 +00:00
mark-nielsen 2fc13bc767 Merged differences from MOODLE_16_STABLE into HEAD 2006-08-25 18:33:50 +00:00
stronk7 09942a5ec2 PGs doubles are caller DOUBLE PRECISION 2006-08-25 17:11:43 +00:00
stronk7 c049e98881 Indexes on text fields are not allowed 2006-08-25 17:02:49 +00:00
stronk7 a5ea2dc334 Solved one wrong field declaration in lesson_grades 2006-08-25 17:02:04 +00:00
tjhunt cd06115fa7 Convert mod/quiz/view.php to roles, and further tidy up the code flow in there. This touches other files because I had to change a function in locallib that had an $isteacher parameter.
I have not converted the rest of the quiz, and I don't intend to. I am hoping Moodle.com will do it.

I hope this does not introduce any bugs, but view.php is so complicate (at least it is less complicated than it was) and the quiz has so many options, that it is hard to be sure. This needs lots of testing before 1.7 is released.
2006-08-25 16:03:54 +00:00
tjhunt 6ac7a65d76 Missing language string. 2006-08-25 14:29:47 +00:00
skodak 51195e6f9f fixed missing global $CONTEXT in get_context_instance() 2006-08-25 14:15:52 +00:00
tjhunt 64d8092342 Correct typo. 2006-08-25 11:23:00 +00:00
moodler a72784d3c6 Just a slight tidy-up 2006-08-25 08:54:22 +00:00
vyshane 1a3e93ffe6 Added has_capability checks 2006-08-25 08:51:50 +00:00
vyshane 25c38f25a1 Added has_capability check 2006-08-25 08:30:25 +00:00
vyshane 6ac96fcb3c Added has_capability checks 2006-08-25 08:27:28 +00:00
toyomoyo 41d7209c7f some (mainly admin realated) capabilities 2006-08-25 08:27:27 +00:00
moodler fd57975491 Added 3d moving icon for ajax course format 2006-08-25 07:10:22 +00:00
moodler 954fdb4293 FIxed some tabs :(
and added a module-xxxxx CSS id to each item
2006-08-25 07:09:28 +00:00
vyshane 1be4d00d56 Previous committer missed one rename from $edit to $categoryedit. Fixed. 2006-08-25 04:06:41 +00:00
vyshane e1b5643ff7 Changes to take care of forum upgrade to new roles system. Backed up forums
will also be converted to the new roles system if the backup was made
pre-roles.
2006-08-25 02:41:16 +00:00
vyshane 7f6301c464 We need the newly created course_module id to be passed to the restore
functions of the modules. We need this now for the forum module to convert
forums backed up in 1.6 to use roles upon restore in 1.7. However, this might
be needed for other modules as well if they need conversion to the roles
system.
2006-08-25 02:37:54 +00:00
stronk7 c779eb1a15 Added support for the new upgrade system for main tables. 2006-08-24 22:27:11 +00:00
stronk7 2acf462dd9 Renamed column question_sessions->comment at Eloy's
request since comment is a DB reserved word.
(mimic from sql files) Thanks Tim! B-)
2006-08-24 16:57:39 +00:00
tjhunt 3830553d47 Avoid reserved words in dmllib unit tests.
(Except that TEXT is not a reserved word after all, although some things like TINYTEXT are. Wheird!)
2006-08-24 16:56:59 +00:00
stronk7 81abf10971 MDL-5969 Let multiple choice questions have feedback that does not depend on the chosen answer
(mimic from old sql files)
2006-08-24 16:54:02 +00:00
tjhunt 3e3e5a4030 Renamed column question_sessions->comment at Eloy's request since comment is a DB reserved word.
I have not been able to test this fully, because I cannot assign roles (e.g. Student and Teacher) in 1.7dev at the moment to test a student answering an essay question then a teacher grading it. However, I have tested as much as possible as admin and cannot get any errors.
2006-08-24 16:44:15 +00:00
tjhunt dd4a1bca28 During the conversion datalib -> ddllib, Eloy removed my comment that made it possible to understand how to use table_colum :-( Adding it back. 2006-08-24 15:37:03 +00:00
tjhunt 3ebdddf70f MDL-4816 Fix silly error in my commit for this bug. 2006-08-24 11:37:10 +00:00
tjhunt b2ba9f6ef3 Fix Eclipse warnings. 2006-08-24 11:36:38 +00:00
tjhunt 2fe0d172f8 Fix PHP syntax error. I wish more developers used Eclipse. 2006-08-24 11:22:24 +00:00
tjhunt 307f045f07 MDL-5969 Let multiple choice questions have feedback that does not depend on the chosen answer
In passing, I fixed MDL-6297 Export of multichoice questions in Moodle XML format doesn't save shuffle option too.
2006-08-24 10:22:43 +00:00
tjhunt 6e557c0806 Fixed syntax error in a PHPdoc comments. 2006-08-24 10:16:54 +00:00
tjhunt 2d30f53dcc Fixed syntax error in a PHPdoc comment. 2006-08-24 10:12:15 +00:00
vinkmar 236c08a56f Added support for phpMyAdmin plugin. 2006-08-24 06:44:35 +00:00
moodler 7468981e67 FIxed roles button on blocks 2006-08-24 03:48:04 +00:00
moodler eba88175b6 Formatting fixes 2006-08-24 03:37:41 +00:00
moodler 28e7967aea FIxed some notices 2006-08-24 03:28:09 +00:00
moodler 0a0bb38019 Ed Coyne's AJAX course format, with some cleanups done.
More cleanups to come from Ed.

This isn't actually working for me right now but he'll fix it now.

This is completely optional and won't affect any other code right now.
2006-08-24 03:20:37 +00:00
moodler 600212a9a1 FIxing Ed's mistaken checkin 2006-08-24 03:17:53 +00:00
danmarsden 038184e264 MDL-4493 issue with 405 pages for IIS users - must specify actual page, as the notice function does a post - you cannot use the POST Verb on a directory in IIS. 2006-08-24 02:08:59 +00:00
tjhunt c82f76d050 MDL-4816 Short answer question type considers '100' and '100.' to be the same Actually, this may have affected other question types too. 2006-08-23 21:17:23 +00:00
tjhunt ac249da55e Clarified comment. 2006-08-23 21:04:04 +00:00
tjhunt 9e8dba7960 MDL-6338 - Short answer questions with ' in the answer don't work. Merged from MOODLE_16_STABLE. Yet another unpleasant quiz bug caused by the current broken way we do things with addslashes. 2006-08-23 19:04:24 +00:00
tjhunt 647bcd4129 Fix getting the context. It did not work during question preview from the question bank when there was no quiz in sight. 2006-08-23 18:37:38 +00:00
tjhunt a18fa6d5ba Get the contexts without referring to undefined variables. 2006-08-23 15:32:06 +00:00
stronk7 454adccfa9 Adding one PHP close tag that has been missing (but working) since years! 2006-08-23 15:23:53 +00:00
tjhunt 5cae120596 Get the contexts without referring to undefined variables. 2006-08-23 15:12:52 +00:00
thepurpleblob c81415c77e Merged from STABLE 2006-08-23 14:57:40 +00:00
tjhunt 78fd16a5fb Improved one language string. Thank Mitshiro Yoshida. 2006-08-23 09:23:56 +00:00
moodler 0cfb6a52fb Adding a copyright notice, and mentioning MDL-3717 purely as a test of the
new CVS integration on tracker.moodle.org
2006-08-23 08:39:15 +00:00
toyomoyo 5769734f2a changing default override values 2006-08-23 08:14:14 +00:00
toyomoyo ae1e00a089 renamed variable so that it doens't get recycled 2006-08-23 08:11:43 +00:00
vyshane 905c4567a2 Removed forum_get_course_forum for forum type teacher. 2006-08-23 07:05:36 +00:00
vyshane 9a7538a35b Fixed notice 2006-08-23 06:56:23 +00:00
toyomoyo 945f88ca15 various changes - loading capabilities for questions, quiz, hide tab if no assignalbe or no overridable role is found, added some functions and comments in accesslib 2006-08-23 06:36:08 +00:00
toyomoyo b56d75dd00 fixing a typo 2006-08-23 05:52:39 +00:00
toyomoyo ed60c54a94 fix for MDL-6326, add support for quiz_feedaback table 2006-08-23 05:39:41 +00:00
moodler d9a35e1270 Fixed context caching (wasn't using globals) 2006-08-23 01:29:52 +00:00
skodak a2b0c57b0a debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294; merged from MOODLE_16_STABLE 2006-08-22 22:25:30 +00:00
skodak bb5a61a1d4 reverting wrong commit, sorry :-( 2006-08-22 22:22:34 +00:00
skodak 2881101ca1 debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294 2006-08-22 22:19:58 +00:00
skodak 868ca14f1f fixed trailing whitespace in last commit :-(; merged from MOODLE_16_STABLE 2006-08-22 22:12:17 +00:00
stronk7 860b55463f Normalizing a bit all the float/double generators. 2006-08-22 22:10:09 +00:00
skodak 6be7abc726 Rewritten help.php by Tim Hunt with minor fixes - SC#292; merged from MOODLE_16_STABLE 2006-08-22 22:04:06 +00:00
stronk7 962f8a9b4e quiz_feedback added to XMLDB 2006-08-22 21:55:20 +00:00
stronk7 8792c16589 Small typo. ;-) 2006-08-22 21:44:07 +00:00
tjhunt e9ad37edc2 SC 299. Merged from MOODLE_16_STABLE. 2006-08-22 21:33:54 +00:00
stronk7 598dc3a99c Change rule to tzrule (reserved word) 2006-08-22 21:19:52 +00:00
stronk7 7970cce9f4 Updated using tzdata2006j 2006-08-22 20:11:33 +00:00
stronk7 c0fe3453ef Change rule to tzrule (reserved word) 2006-08-22 20:10:54 +00:00
tjhunt d758f1e2eb Fix an obvious typo in the roles and permissions code. 2006-08-22 19:26:05 +00:00
tjhunt 07d8d530f5 Fix Eclipse warnings. 2006-08-22 19:09:52 +00:00
tjhunt 080314b8bb Fix Eclipse warnings. 2006-08-22 19:09:07 +00:00
tjhunt 20808266c8 Work round Eclipse warning. 2006-08-22 19:01:42 +00:00
tjhunt 199e43d470 Fix Eclipse warnings. 2006-08-22 19:00:18 +00:00
tjhunt 212b7b8cd9 MDL-5270 - give students a feeback comment for their performance in the entire quiz.
Also, along the way I noticed and fixed MDL-6290 student grades not rescaled when quiz maximum grade changed.
2006-08-22 17:31:26 +00:00
stronk7 2efaf3f8ab One trick to allow pseudo-null Oracle insertions. Let's see what happen. 2006-08-22 16:39:14 +00:00
tjhunt 75e84883ca Unbreak roles and permission on Postgres yet again.
If you want a laugh, compare this fix the with the diff between revisions 1.5 and 1.6 of this file.
2006-08-22 16:18:11 +00:00
stronk7 93d2c55ffc Standard naming now user FOUR char for tables (to avoid
avoid some potential duplicates)
2006-08-22 16:15:44 +00:00
tjhunt 1751eebc69 Reverting toyomoyo's conversion of mod/quiz/view.php to roles because his changes made no sense.
Admittedly, this file is pretty incomprehensible and it is not clear at first what it is trying to do. (Even though it is more comprehensible now than it was a week ago.) I'll to a proper conversion of this file to RnP once I have checked in my other changes there - assuming I can actually get Moodle to work so I can test my changes.
2006-08-22 13:53:39 +00:00
tjhunt a4a6eb8a17 Fix toyomoyo's syntax errors. 2006-08-22 13:12:24 +00:00
toyomoyo 5cf38a57cd some quiz capabilities 2006-08-22 09:04:23 +00:00
vyshane 5cae056c45 Removed deprecated teacher forum type 2006-08-22 07:42:34 +00:00
vyshane 45c38eef4c Removed deprecated forum type teacher. 2006-08-22 07:38:01 +00:00
vyshane d604bdeaed Added prevent for mod/prevent:createattachment for default students and guests
in teacher forums
2006-08-22 05:56:45 +00:00
vyshane 9fa3350862 Upgrade now works. Needs more testing. 2006-08-22 05:45:43 +00:00
vyshane 021a7467b5 Fixes:
1) has_capability call used in fullname()
2) initialised array $options
3) $context->level has been renamed to $context->aggregatelevel
2006-08-22 05:44:32 +00:00
vyshane c1a657cc1f Bug fixes:
1) Replaced isteacher call in fullname ($course undefined)
2) Initialised $options array
2006-08-22 05:35:52 +00:00
vyshane f13a5fa609 Removed forum->open config since roles will take over this 2006-08-22 02:43:58 +00:00
vyshane ac195b6fa6 Need to pass the module id and not the object to add_course_module 2006-08-22 02:24:45 +00:00
skodak a2392230a1 fixed some notices in scheduled backup; merged from MOODLE_16_STABLE 2006-08-21 20:40:07 +00:00
stronk7 5cf36b39b1 Solved hh (horrible-hidden) bug in backup_scheduled code.
Credits go to Thirot Jean-Luc. http://moodle.org/mod/forum/discuss.php?d=52156

Merged from MOODLE_16_STABLE
2006-08-21 19:10:21 +00:00
stronk7 28f6c41d45 Changed level (reserved word) to aggregatelevel. 2006-08-21 14:59:48 +00:00
stronk7 88534572c3 Reducing the list of MSSQL reserved words to the efectively
reserved words (the previous list included a lot of words
reserved by SQLXX standars but not by MSSQL)
2006-08-21 12:28:46 +00:00
stronk7 c8f85eeeba Reducing the list of PG reserved words to the efectively
reserved words (the previous list included a lot of words
reserved by SQLXX standars but not by PG)
2006-08-21 12:04:48 +00:00
vyshane c1de8b8a80 Fixed bug - empty teacher forums (deleted) should not have a course module
created for them.
2006-08-21 08:45:12 +00:00
toyomoyo 3765fd5367 some capabilities for quiz and questions, need to load them in access.php 2006-08-21 08:40:06 +00:00
vyshane f0da6b858e Removed $forum->open, $forum->assesspublic from code. Fixed bug in upgrade
code, changed module config form to accomdate removal of forum.assesspublic
and forum.open.
2006-08-21 06:56:04 +00:00
skodak efc7316caa import of ADODB v4.91 and general cleanup, removed some unused files - see readme_moodle.txt; new session2 code needs a new table, I am going to use the new database functions for that later, for now we are using the old table and old database session code. 2006-08-21 06:54:00 +00:00
cap2501 0894b9271e Semi-final version 2006-08-21 06:15:24 +00:00
cap2501 04b2d74f03 Main JS file for topic - ajax course format (still needs a little cleaning though) 2006-08-21 06:14:43 +00:00
cap2501 be2a520783 Restful interface for AJAX course format 2006-08-21 06:13:28 +00:00
toyomoyo d140ad3f7c fix for bug #6307, reserved word 'level' changed to 'aggregatelevel' for Oracle. Some parts could be broken by this. please report breakage asap! Thanks 2006-08-21 05:19:16 +00:00
vinkmar e277678dab changes made to ensure compatibility with core admin (admin/adminlib.php) where $_GET is no longer used; changed 'admin' to $CFG->admin in dir paths 2006-08-21 04:08:57 +00:00
vinkmar 9acea96564 changes made to ensure compatibilty with core admin files (admin/adminlib.php), where $_GET is no longer used 2006-08-21 04:08:00 +00:00
vinkmar 6fcbab99ef fixed tabs, fixed potential notices for undefined variables, added structure that will be used for detecting what variables to flag during installs & upgrades, removed all $_GET usage, switched 'admin' to $CFG->admin (for directory paths), and fixed blank line at end of index.php 2006-08-21 04:06:58 +00:00
toyomoyo d37bac7e5d fix for 6294 2006-08-21 02:23:25 +00:00
mchampan 791a4cece1 Comments, update logic improved, rest of module add/delete functions added. 2006-08-21 00:50:29 +00:00
stronk7 0513f3bfa5 $statement_end for Oracle changed to "/" because standard ;
causes problems with trigger generation
2006-08-20 21:56:54 +00:00
tjhunt dcc0a7e25f Bug #6305 - Quiz settings form field order could be better. Merged from MOODLE_16_STABLE. 2006-08-20 20:11:05 +00:00
stronk7 73bb7f8db0 Setting some ADOdb variables properly and calling to the new
configure_dbconnection() function to set DB encoding and other
preliminar settings.
2006-08-20 18:22:48 +00:00
stronk7 d086d854a8 Added the configure_dbconnection() function to be executed
after DB conection. Responsible to set a lot of things
(charsets, dbsession variables...)
2006-08-20 18:21:33 +00:00
stronk7 f9543de627 Since PostgreSQL 7.4 the precision given for float columsn is
the number of bits to use, and not the number of decimals. So,
based on the number of decimals from the XMLDB schema, we are
going to create REAL (<6 decimals) or DOUBLE PRECISION (>=6) columns.
2006-08-20 18:19:50 +00:00
stronk7 16f07ff2b0 MySQL doesn't like any name on its primary keys (neither "primary") 2006-08-20 18:03:55 +00:00
stronk7 c412278140 Although difficult, now all the key/index/sequence/trigger names
are quoted if they are reserved words
2006-08-20 18:01:50 +00:00
stronk7 134e3128bb Added the install_from_xmldb_file() function that
loads, transform and execute one entire XMLDB
file into the correct SQL sentences.
2006-08-20 15:50:27 +00:00
tjhunt 0f49e5655d Bug #6303 - True / False applies penalty factor wrongly. Merged from MOODLE_16_STABLE. 2006-08-20 15:37:42 +00:00
tjhunt 948bf30099 Fix Eclipse warnings. 2006-08-20 15:30:31 +00:00
stronk7 420f683619 Core tables XMLDB installation is now working. Disabled by default
until fully working.

$CFG->xmldb_enabled = true; will enable it for test/dev against any DB
2006-08-20 11:20:40 +00:00
stronk7 293bccd539 First commit for the progressive adoption of ADODB's SelectLimit() function
in order to support LIMIT clauses in a cross-db compatible way.
Changes don't affect old sentences at all (all them would be changed soon too).
2006-08-20 09:37:56 +00:00
vinkmar 36647b9fbb More PHP4 compatibility issues fixed. 2006-08-20 03:56:25 +00:00
skodak 7f5495053f fixed short php tag and end tag in comment 2006-08-19 11:15:59 +00:00
moodler 3566b97c4a Fixing some strings 2006-08-19 08:21:05 +00:00
moodler c06140513d Fixed up get_user_roles to remove notices 2006-08-19 08:12:45 +00:00
tjhunt 707b5c9953 Renamed unit tests to match Eloy's work. 2006-08-19 07:47:41 +00:00
vinkmar 95cdbec95f Added paramtypes (mandatory) to all text field objects. 2006-08-19 05:34:25 +00:00
vinkmar 7ba710e6a3 Small bug fix. Caused problems when moving or deleting blocks. 2006-08-19 05:32:56 +00:00
moodler 9f948d1136 Just minor doc tweaks 2006-08-19 02:58:07 +00:00
moodler 6e0993ee48 Just tidying up things a bit as I look it over 2006-08-19 02:46:46 +00:00
moodler dfcf72ba94 Automatic installer.php lang files by installer_builder (20060819) 2006-08-19 02:45:53 +00:00
vinkmar 085dfc0c20 solving the issue with an undefined sesskey (happens when there is no user logged in) 2006-08-19 02:26:01 +00:00
vinkmar fea42164fb preventing notifications by using isset() unsparingly (i.e. small bug fixes) 2006-08-19 02:21:44 +00:00
vinkmar ccad2d8e7d Modifications made for PHP4 compatibility. 2006-08-19 01:40:54 +00:00
vinkmar 0155cf991d Fixed error that caused self_test failure during initial install; made changes for PHP4 compatibility (no use of instanceof, no use of private/protected/public) 2006-08-19 01:38:57 +00:00
vinkmar 63aafc9e56 Fixing errors in admin page cleanup; working towards compatibility with PHP4 (use of interfaces, private/protected/public, instanceof all removed). 2006-08-19 01:37:38 +00:00
stronk7 465a802937 Thought this was commited. Solve one bug in trigger generation 2006-08-19 00:58:30 +00:00
stronk7 7e13be0887 Splitting datalib.php in three libraries:
- ddllib.php: Where all the DDL (install/upgrade) functions will be.
  - dmllib.php: Where all the DML (select...) functions will be.
  - datalib.php: Legacy lib. Its contents should go to other libraries soon.
For more info see: http://docs.moodle.org/en/XMLDB_Roadmap (point 1)
2006-08-18 22:56:08 +00:00
tjhunt ef82286874 Bug #6293 - Cannot regrade a question when a teacher has added a comment with a ' - Merged from MOODLE_16_STABLE. Stupid, wreched, datalib. Why can't datalib take care of addslashes, so the whole of the rest of the code can forget about it? That is how a database abstraction layer should work. I know, it is pointless to moan about it, but it has just cost me 3 hours, so I feel I have earned the right to moan. 2006-08-18 22:34:54 +00:00
tjhunt 865b753486 Code cleanup. Merged from MOODLE_16_STABLE. 2006-08-18 22:26:04 +00:00
vinkmar 708870d3a8 added blank footer (to eliminate the notice when $footer is non-existant) 2006-08-18 22:02:09 +00:00
vinkmar 3d8ef99d9e Blocks fixed in admin pagelib, and (hopefully) many notices pointed out in the general forum board no longer show up. 2006-08-18 22:00:37 +00:00
tjhunt 4abc23b2ae Fix some Eclipse code warnings. Merged from MOODLE_16_STABLE. 2006-08-18 21:23:15 +00:00
vinkmar 0b4073cedb trying to prevent an undefined index error 2006-08-18 19:27:02 +00:00
ethem 516b138516 Colorize all orders. 2006-08-18 17:10:30 +00:00
ethem be4f7e7fec Colorize refunds and show refunded total.
Red: Refunded/Pending Settlement
Green: Refunded/Settled
Black: Cancelled
2006-08-18 16:01:47 +00:00
ethem 49c22bc46b Display capture/void/delete instead of 'Yes'; Merged from 16stable. 2006-08-18 14:54:08 +00:00
tjhunt 5553c2ec47 New function record_exists_select with unit tests for all the record_exists_* functions. 2006-08-18 11:28:30 +00:00
tjhunt bc2defd5f8 Bug #3481 - wildcard problem in cloze question. Thanks to Joseph Rezeau. Merged from MOODLE_16_STABLE, not a straight merge becuase of other 1.7 changes. 2006-08-18 10:29:34 +00:00
moodler d100b8a04d Make sure .htaccess is created in dataroot, just in case 2006-08-18 09:54:09 +00:00
vinkmar cdb46b63d2 more bugs! incompatibility with php 5.1.2 (presumably earlier versions as well) fixed 2006-08-18 08:40:58 +00:00
vinkmar bb14a9e3b7 admin page cleanup blocks (new ones!) 2006-08-18 08:25:02 +00:00
vinkmar c74af0688f adding admin page cleanup blocks (new ones!) 2006-08-18 08:24:07 +00:00
vinkmar dca7a9cfad admin page cleanup (bug fixes :) ) 2006-08-18 08:16:32 +00:00
tjhunt 1780811d55 Added todo. 2006-08-18 08:14:47 +00:00
toyomoyo 68c5252623 adding functions and interface for access control - role assignment and role overrides 2006-08-18 08:01:16 +00:00
vinkmar 4cd174bfce Reverting changes to file from admin page cleanup... whoops! Accidentally broke the install. 2006-08-18 07:52:56 +00:00
vinkmar f8a511519b admin page cleanup (google soc 2006)... updated field name for category editing function so that it doesn't conflict with 'edit' when used for blocks 2006-08-18 07:29:19 +00:00
vinkmar 7ff99cb64f admin page cleanup (google soc 2006)... updated to use new pagelib 2006-08-18 07:27:05 +00:00
vinkmar dd81bb350c updated for admin page cleanup 2006-08-18 07:26:25 +00:00
vinkmar 90a73bb361 Admin page cleanup (Google soc 2006) 2006-08-18 07:25:17 +00:00
vinkmar a7c72afc04 Admin page cleanup (google soc 2006) 2006-08-18 07:23:02 +00:00
vyshane e6416e3f12 Updated upgrade to roles system 2006-08-18 07:08:14 +00:00
vyshane 314af32a92 Forum upgrade to roles in progress (commented out). 2006-08-18 04:17:31 +00:00
skodak 408965376d still more upgrade logging fixes 2006-08-18 00:01:37 +00:00
skodak 26c91c7394 major upgrade logging speed improvement - write buffer implemented 2006-08-17 23:50:18 +00:00
skodak 7949356d64 fixed missing '}' 2006-08-17 22:49:21 +00:00
skodak dedb2304cd upgrade logging cleanup, fixes - more improvements ahead 2006-08-17 22:37:34 +00:00
skodak 031c8ae5a0 Bug #6276 - Multiple questions not showing up from scale page; merged from MOODLE_16_STABLE 2006-08-17 21:34:39 +00:00
stronk7 1bf63d33c8 Oracle automatically builds UIXs for UKs 2006-08-17 19:40:49 +00:00
stronk7 9dcc6300a7 Now all the XMLDBxxx->geSQL functions return an array of statements to be
executed (easily to handle them in the installation/upgrade process
individually. Also, it's possible to specify one statement end.
2006-08-17 19:20:45 +00:00
stronk7 de16da7293 adding role_allow_assign , role_allow_override table and dropping role_deny_grant
NOTE: Need to confirm that both these fields:
    role_allow_assign->allowassign and
    role_allow_override->allowoverride
are pointing to role->id (this is the assumption I've done, so I've
created them as FKs)
2006-08-17 19:16:07 +00:00
tjhunt eb9189bc2f Bug #6277 - Missed function renaming in question/format/multianswer. Merged from MOODLE_16_STABLE. 2006-08-17 17:38:31 +00:00
tjhunt 8d2054411c Tweak to unbreak unit tests. 2006-08-17 17:30:56 +00:00
stronk7 4d00e5e4ec Now admin includes all the required ddllib stuff 2006-08-17 16:59:39 +00:00
stronk7 46d42a3cc5 Now ddllib includes all the required xmldb stuff 2006-08-17 16:59:14 +00:00
stronk7 b7bc9446a9 Added JS template field for JavaScript if needed. 2006-08-17 16:40:46 +00:00
tjhunt cfa27f4472 Fix bug in new function get_field_select(), and this time add a unittest to see if the new function works! 2006-08-17 16:28:29 +00:00
ethem b9c3d818fe enrol_authorize.courseid must be passed to authorize_get_status_action() function to allow a user has_capacity; Joined 2 tables to get courseid field. Merged from 16stable. 2006-08-17 15:43:54 +00:00
tomflannaghan ca20f89151 Slashes added for database entry. 2006-08-17 13:19:28 +00:00
tomflannaghan 1f9aab2e10 *** empty log message *** 2006-08-17 13:18:02 +00:00
tomflannaghan b010085239 Javascript added 2006-08-17 09:27:51 +00:00
tomflannaghan f0a93e5d30 jstemplate 2006-08-17 09:26:31 +00:00
tomflannaghan 5a83945ec5 Extra tab for 'jstemplate' 2006-08-17 09:26:06 +00:00
moodler 8ac4971405 Added JS template field for JavaScript if needed 2006-08-17 09:02:56 +00:00
toyomoyo f9e2f481df adding role_allow_assign , role_allow_override table and dropping role_deny_grant 2006-08-17 08:58:51 +00:00
vyshane c39f126780 Fixed warning 2006-08-17 03:52:05 +00:00
moodler 8b4e649a1e Automatic installer.php lang files by installer_builder (20060817) 2006-08-17 02:52:18 +00:00
stronk7 6c11ad54d8 UNIQUE KEY is UNIQUE 2006-08-17 00:31:23 +00:00
stronk7 848caec8c2 Now we are able to generate all the module SQL (any RDBMS) with one
simple function call (final inserts are missing yet)
2006-08-17 00:16:34 +00:00
stronk7 f075bac4f7 Bah, Oracle requires the default clause BEFORE the not null clause. 2006-08-16 23:45:18 +00:00
stronk7 6aa7885eb5 Minor adjustments to some comments. 2006-08-16 23:17:28 +00:00
stronk7 ada5648103 Fixing some potential problems with prefixes and object names. 2006-08-16 23:01:46 +00:00
stronk7 d7444bfce3 Initial commit of oci8po generator 2006-08-16 22:58:51 +00:00
stronk7 866c0747e8 Line feed added + small bug 2006-08-16 22:23:39 +00:00
stronk7 d7bf5f9917 Initial version of the mssql generator 2006-08-16 21:46:08 +00:00
stronk7 2ad7da9bec Initial version of the postgres7 generator 2006-08-16 18:41:47 +00:00
stronk7 0c82f279c6 Added one more configuration parameter to disable inline SQL to be added in enum column lines 2006-08-16 18:37:33 +00:00
stronk7 aacf02c55b Proper parent init and comment close 2006-08-16 17:53:24 +00:00
stronk7 6caad5177d Minor change to do proper create table close 2006-08-16 17:51:49 +00:00
stronk7 e54ae5264b Partial rework of the mysql generator. Working now. 2006-08-16 17:43:55 +00:00
stronk7 1f0872e8ba Changed one default 2006-08-16 17:34:46 +00:00
stronk7 91496d15bc Initial commit of the base generator class. 2006-08-16 17:28:41 +00:00
tjhunt b169c31e39 Save two queries if we are not going to output anything. 2006-08-16 16:54:20 +00:00
tjhunt 1d723a169a Bug #6267 - questionlib.php delete_question infinite loop with rantom questions. Thanks to mbockol at carleton dot edu. Merged from MOODLE_16_STABLE. 2006-08-16 16:17:18 +00:00
stronk7 54121a7921 permission has to be signed integer in mysql. Mimic from sql files 2006-08-16 16:06:37 +00:00
mchampan 6f1b1da1ec Add/delete/update cron functions added.
IndexDBControl class added to abstract some index functionality out.
2006-08-16 13:34:07 +00:00
mchampan ecebdf0e6e Date field added to documents. 2006-08-16 13:31:55 +00:00
toyomoyo b3e900cee6 some more UI change 2006-08-16 09:11:43 +00:00
vyshane 01199ea958 Updated to use new Roles System. Plus some fixes. 2006-08-16 08:54:07 +00:00
tjhunt 920b93d1e3 Remove horrific code duplication in mod/quiz/lib.php. 2006-08-16 08:46:10 +00:00
toyomoyo 77d4953ee2 bumpoing up version, permission has to be signed integer in mysql!!! added new capabilities in access.php 2006-08-16 07:57:51 +00:00
vyshane e40a7a3c8b Fixing notices 2006-08-16 03:24:43 +00:00
moodler f6f5f52a19 Automatic installer.php lang files by installer_builder (20060816) 2006-08-16 02:50:27 +00:00
vyshane 87ca0adf00 Fixed forum_print_post. Thanks Yu :) 2006-08-16 02:33:43 +00:00
tjhunt a21567892f Refactor how question types register themselves with the question bank. This change makes it easier for 3rd party question types to control their destiny, but is also backwards compatible, in that old 3rd party plugins will still work. See http://moodle.org/mod/forum/discuss.php?d=51796 for more details. 2006-08-15 21:25:38 +00:00
tjhunt eeaeff8e04 Corrected include. 2006-08-15 20:44:21 +00:00
tjhunt 3c957efd2e Correct comment. 2006-08-15 20:43:09 +00:00
tjhunt d3eeba599b Delete stray space. 2006-08-15 16:53:24 +00:00
tjhunt 4e3487c59c Remove horrific code duplication in mod/quiz/mod.html. 2006-08-15 15:29:38 +00:00
thepurpleblob 8daaaafcf0 Merged from STABLE 2006-08-15 14:39:47 +00:00
tjhunt ab757152ec New function get_field_select(). 2006-08-15 13:44:22 +00:00
stronk7 edc8779b92 Latest changes, nothing important. 2006-08-15 11:30:32 +00:00
tomflannaghan 72184a52b8 A few fixes for the dropdown menus. 2006-08-15 11:14:07 +00:00
stronk7 82b7ceb568 Just adding support for reserved words.... 2006-08-15 10:15:52 +00:00
vyshane 6c384dd1bb Replaced isteacher and isadmin calls by has_capability 2006-08-15 09:56:41 +00:00
vyshane f8a6c19d23 Replaced creator() calls with has_capability() 2006-08-15 09:45:11 +00:00
vyshane 9f5c1e1057 Added has_capability calls 2006-08-15 09:28:12 +00:00
stronk7 8165877a17 Initial commit on HEAD of all the XMLDB stuff. 2006-08-15 09:14:31 +00:00
stronk7 f11bf81701 Initial commit of the ddllib (to perform DDL operations) 2006-08-15 09:08:17 +00:00
moodler 901dd2fb4c Merged new "Database preset" support from Tom Flannaghan.
Still needs some tidy-up work but it's working.
2006-08-15 08:42:06 +00:00
toyomoyo 0a8a95c91e some more UI stuff 2006-08-15 08:29:29 +00:00
vyshane 6006c31d28 Added has_capability call 2006-08-15 06:37:55 +00:00
vyshane 67e4cf27e2 Added has_capability checks 2006-08-15 06:21:35 +00:00
vyshane bede8db79f Updated with new capabilities 2006-08-15 05:01:00 +00:00
vyshane a028c29187 Added new capabilities 2006-08-15 04:13:22 +00:00
toyomoyo dd91f41525 revert ugly changes back to original 2006-08-15 02:28:04 +00:00
skodak 284ac70210 $CFG->debug=0 from config.php is not overriden by setup.php anymore SC#293; merged from MOODLE_16_STABLE 2006-08-14 20:57:18 +00:00
skodak 508d4a0d14 adding proper checks that the requested help file exists SC#292; merged from MOODLE_16_STABLE 2006-08-14 20:08:52 +00:00
moodler cfef9e55d0 Endless loop fix from stable 2006-08-14 15:20:49 +00:00
ethem 839958faf6 * $CFG->teachermanagepayments will have to go since we are moving away from the rigid hardcoded teacher role concept.
* If a teacher has_capability('enrol/authorize:managepayments'), send email about pending orders expiring.

* All isteacher converted to has_capability.
2006-08-14 15:06:11 +00:00
ethem 4503e31d9a Roles support added: enrol/authorize:managepayments
TO DO:
* $CFG->an_teachermanagepay will be removed.
   XXX??? What will be do while sending email to teachers about pending orders expiring???
   If this feature enabled and a teacher no role in managepayments, this will send an email and the teacher cannot manage payments.
   Extra work: get_course_teachers and a teacher has_capability(at course level), send this email.

* convert isteacher to has_capability.
2006-08-14 14:23:01 +00:00
moodler 10f5c89035 FIxed another ossible notice during upgrade 2006-08-14 13:44:10 +00:00
ethem abaeae30f7 Guests can NEVER manage payments. CAP_PREVENT to CAP_PROHIBIT. 2006-08-14 13:42:35 +00:00
moodler 9db12da755 Fixed some notices during install 2006-08-14 13:42:34 +00:00
tjhunt c097419986 Reorder the table definitions in the file, to group them more logically. 2006-08-14 13:32:39 +00:00
ethem 79469c6600 Roles support added: enrol/authorize:managepayments 2006-08-14 13:29:24 +00:00
moodler c4a333b328 Fixes from forum http://moodle.org/mod/forum/discuss.php?d=46048 2006-08-14 08:59:38 +00:00
vyshane e6316185ab Fixed bug in upgrade_plugins(). Capabilities were not being loaded correctly. 2006-08-14 08:59:01 +00:00
skodak 795821c497 fixed warning in participants block 2006-08-14 08:54:45 +00:00
skodak 4c460d9821 fixed admin page layout 2006-08-14 08:52:15 +00:00
toyomoyo 7e2d7c92ad some UI changes 2006-08-14 08:46:44 +00:00
skodak b367b152ad fixed warning during installation when creating admin account 2006-08-14 08:44:30 +00:00
moodler 339a9129ec Only need to pass contextid to this script 2006-08-14 08:41:54 +00:00
moodler e957cc2644 Cleaned up a bunch of notices and some logic 2006-08-14 08:38:49 +00:00
skodak 8549af11d1 fixed upgrade success notification, backup and blocks success messages are not red anymore... 2006-08-14 08:37:19 +00:00
moodler 5c524305e3 FIxed 'assign roles' link from course admin 2006-08-14 08:34:11 +00:00
moodler 218564acfc Fixed bug #6238, bad debug statements 2006-08-14 08:26:58 +00:00
moodler e4dd322255 Function to get roles used in a context 2006-08-14 08:14:02 +00:00
skodak 9fecfdfb83 Bug #6245 - rewritten multilang filter 2006-08-14 07:46:03 +00:00
vyshane 951e1073da Added has_capability calls. Reverted forum_search to pre-roles until the
function is totally converted to work with roles.
2006-08-14 07:37:53 +00:00
vyshane d7bf6d17d9 Fixes for capability checks. 2006-08-14 07:25:18 +00:00
vyshane cee0901c06 Formatting cleanups and comments 2006-08-14 07:15:03 +00:00
skodak 33851b5c16 prevent access to filters when disabled in filter settings SC#291; merged from MOODLE_16_STABLE 2006-08-14 06:24:34 +00:00
moodler 65f4d137a7 Fixed a typo 2006-08-14 06:22:29 +00:00
moodler f2e21e6c03 Fix error string 2006-08-14 06:03:30 +00:00
moodler 0468976c9a SWEEPING CLEANUP
The API was changed slightly so that has_capability now takes the
whole $context object (we almost always have it anyway)

The $kill thing was removed.   If you want to assert a capability
then use:

    require_capability('capname', $context);

with optional variables to modify the error message

Misc bugs here and there also removed and code tidied
2006-08-14 05:55:40 +00:00
mchampan 6e7805628e Advanced search page added. 2006-08-14 02:29:43 +00:00
tjhunt a7c3953d1c SC 289, small, but non-exploitable hole in backup permissions checking. Merged from MOODLE_16_STABLE. 2006-08-13 20:39:21 +00:00
moodler acee2e2491 Temporayr debug a bit more sensible 2006-08-13 15:50:58 +00:00
moodler 340ea4e89e Some wider caching 2006-08-13 15:48:57 +00:00
moodler e5605780cf Cache context lookup per page for performance 2006-08-13 13:28:01 +00:00
moodler b63ec9db78 Adding roles to front page course list "add" button 2006-08-13 13:17:38 +00:00
moodler 624f2fea76 Removed some old calls to isadmin 2006-08-13 13:12:51 +00:00
moodler 7fad699525 Tidying up some spelling 2006-08-13 09:29:33 +00:00
moodler 8737be587d More language-related tidyups and a new get_local_override() function 2006-08-13 09:25:45 +00:00
moodler ceb83c70ba Changes to string format for capabilities 2006-08-13 09:11:45 +00:00
moodler f9a67ea1e2 New strings for Roles and Capabilities 2006-08-13 09:10:52 +00:00
moodler bade10e350 Removed all of the "Restricted users" hack because Roles can do it all better. 2006-08-13 07:01:57 +00:00
moodler f633ae28ae Automatic installer.php lang files by installer_builder (20060813) 2006-08-13 02:49:19 +00:00
stronk7 6750328ba0 Latest changes added + some polish in keys. 2006-08-12 23:03:59 +00:00
stronk7 d236d4f577 Initial version of the XMLDB file for this plugin 2006-08-12 22:26:05 +00:00
stronk7 9bd4d98bc2 Initial version of the XMLDB file for this plugin 2006-08-12 22:19:10 +00:00
stronk7 42173f5121 Initial version of the XMLDB file for this plugin 2006-08-12 21:41:46 +00:00
stronk7 6f398232e6 Added une foreign+unique key 2006-08-12 21:40:30 +00:00
danstowell ac87088b50 Added download link for all entries as KML 2006-08-12 19:03:16 +00:00
danstowell 94682d3e58 Another couple of latlong strings 2006-08-12 19:02:39 +00:00
danstowell 5cd48bf480 Another couple of latlong strings 2006-08-12 17:37:08 +00:00
danstowell 3af692dba0 Now latlong data types allow you to choose which labels appear in Google Earth 2006-08-12 17:36:22 +00:00
skodak b8a607d691 fixed format_text caching - now respects text format, current language and course id (lang fix is needed for my multilang filter rewrite ;-); merged from MOODLE_16_STABLE 2006-08-12 12:44:19 +00:00
stronk7 615b4a1391 An example of how one unitialized variable can generate really
dificult-to-trace bugs. Thanks to Jens Gammelgaard and support  B-)
(http://moodle.org/bugs/bug.php?op=show&bugid=6233)

Merged from MOODLE_16_STABLE
2006-08-12 09:14:40 +00:00
stronk7 613f306d1d XMLDB schema initial commit for the quiz module.
Some doubts are pending to finish it properly.
2006-08-11 19:29:47 +00:00
stronk7 b08eda731b Added one FK (recursive) to course_categories 2006-08-11 18:41:39 +00:00
stronk7 49025df359 Added one comment about recursive FK for the future. 2006-08-11 18:36:47 +00:00
stronk7 401846cca7 XMLDB schema initial commit for the lesson module 2006-08-11 17:56:18 +00:00
stronk7 a2a4bfc567 XMLDB schema initial commit for the lams module 2006-08-11 17:39:38 +00:00
stronk7 e0996851da XMLDB schema initial commit for the label module 2006-08-11 17:37:17 +00:00
stronk7 01c3c55960 Oops, filled now. I forgot to save changes before commit. 2006-08-11 17:31:11 +00:00
stronk7 4121848035 XMLDB schema initial commit for the journal module 2006-08-11 17:29:47 +00:00
stronk7 540c65ba43 XMLDB schema initial commit for the hotpot module 2006-08-11 17:24:55 +00:00
stronk7 2bf10cbf7b XMLDB schema initial commit for the glossary module 2006-08-11 17:11:46 +00:00
stronk7 b72bed89da Give some more chars to enum fields. 2006-08-11 16:45:45 +00:00
stronk7 d7a4f74ede XMLDB schema initial commit for forum module 2006-08-11 16:35:11 +00:00
tjhunt 1b8a7434e2 Bug 6239 - Allow questions to have some teacher-supplied commentary.
While implementing this, I removed the ~100 lines of very similar code from the top of each question type's editquestion.html template, and moved this to a the function print_question_form_start() in the base class, which uses the template question/type/editquestionstart.html. This is described in more detail here: http://moodle.org/mod/forum/discuss.php?d=51590, and is why this patch makes the codebase 523 lines smaller.
2006-08-11 14:59:18 +00:00
danstowell 8161ac9842 Adding new data field type, latlong, to HEAD 2006-08-11 13:17:29 +00:00
bobopinna 431b5cc855 Added two strings 2006-08-11 13:11:53 +00:00
bobopinna 5c1ac70c63 Fixed a problem during scorm update.
Now only the lost scoes tracks are deleted
Added support to IMS CP repository
2006-08-11 12:26:06 +00:00
thepurpleblob 57f4a71feb Merged from STABLE 2006-08-11 12:16:38 +00:00
tjhunt 712c25b10b Tidy up code flow in helpbutton. 2006-08-11 10:33:29 +00:00
stronk7 f1b2046912 Changing //TRANSLIT to //IGNORE because some weird bug
in the OS iconv libraries was breaking some texts.

Merged from MOODLE_16_STABLE
2006-08-11 09:48:35 +00:00
thepurpleblob 7b579ee61f Merged from STABLE 2006-08-11 08:52:24 +00:00
danstowell 8897f6fa9f Latitude and longitude lang strings for en_utf8 for data activity 2006-08-11 08:48:28 +00:00
vyshane df9c66776d Admin role assignment: changed from using get_string (too brittle) to
get_roles_with_capability (more robust).
2006-08-11 03:58:52 +00:00
vyshane abd896a114 Commented out code that adds the new admin user to user_admins and
user_teachers tables from user.php.

Fixed notices in roles/assign.php.
2006-08-11 03:24:37 +00:00
vyshane 0c30fdc924 Modified to support fresh installation of new Roles System. 2006-08-11 02:44:42 +00:00
vyshane 1afecc03f4 Modified to fix installation. 2006-08-11 02:44:02 +00:00
tjhunt 2c3968c407 Major code cleanup of this report (that started as a small code cleanup). None of the functionality should have changed - crosses fingers. 2006-08-10 21:52:07 +00:00
tjhunt 93eb0ea339 Fix comment. 2006-08-10 21:33:53 +00:00
tjhunt 7003072a7f Fix minor HTML validation issue. 2006-08-10 18:58:26 +00:00
tjhunt 8c8cad45d9 Convert tabs to spaces. 2006-08-10 18:32:32 +00:00
tjhunt 2befe77859 Convert tabs to spaces. 2006-08-10 18:23:09 +00:00
stronk7 c7b39f4737 XMLDB schema initial commit for exercise module 2006-08-10 17:12:00 +00:00
tjhunt 78b26f761c Typo in comment. 2006-08-10 15:44:52 +00:00
bobopinna f69db63ed4 Cleaned code 2006-08-10 11:32:48 +00:00
ethem 067d3cd138 Comment added. 2006-08-10 10:55:42 +00:00
stronk7 a1bdf659ad Adding latest changes, FKs and indexes. 2006-08-10 09:25:52 +00:00
toyomoyo 2a1ab5ecf2 name should be unique key, and should be length 255 2006-08-10 09:07:15 +00:00
toyomoyo 7952cb34ef changing name field in capabilities table to 255 2006-08-10 09:02:21 +00:00
bobopinna 03f5564e43 Fixed a problem with popup window and IE 2006-08-10 08:27:12 +00:00
toyomoyo 171948fd4a bumped up version to add keys, changed some more UI 2006-08-10 08:21:29 +00:00
toyomoyo bcf214dfc4 adding keys for new tables, added migration support too 2006-08-10 08:20:16 +00:00
moquist da4124beab Added $return=false parameter to the following functions:
print_navigation()
print_headline()
print_heading()
print_heading_with_help()
print_heading_block()
print_continue()
print_simple_box()
print_simple_box_start()
print_simple_box_end()
print_single_button()
print_spacer()
print_file_picture()
print_user()
print_recent_activity_note()
print_group_menu()
print_grade_menu()
print_scale_menu()
print_scale_menu_helpbutton()

Changed $returnstring parameter to $return (for consistency) in the following
functions:
print_user_picture()
print_group_picture()
2006-08-10 06:41:38 +00:00
vyshane 628e2264b1 Adding back lines that mysteriously disapeared. 2006-08-10 05:57:34 +00:00
moquist 469b650119 Added $return=false parameter to print_footer() using output control functions
to capture include() of themed footer HTML.
2006-08-10 05:10:00 +00:00
moquist 36b6bcecc0 Added $return=false parameter to print_header() and print_header_simple() using
output control functions to deal with the include() of the themed header HTML
file.
2006-08-10 05:01:57 +00:00
moquist eaeaf964dc Added $return=false parameter to close_window_button() and choose_from_radio(). 2006-08-10 04:33:55 +00:00
moodler b85956993a Automatic installer.php lang files by installer_builder (20060810) 2006-08-10 03:00:40 +00:00
toyomoyo c04ba75f8f merged fix for a bug when user's lang is not set, fall back to site lang 2006-08-10 02:43:22 +00:00
skodak 805f61dd6c obfuscation of the email addresses; merged from MOODLE_16_STABLE SC#282 2006-08-09 20:40:31 +00:00
skodak 8fd62c6401 Bug #6199 - A typo in edit.php; merged from MOODLE_16_STABLE 2006-08-09 19:46:32 +00:00
skodak 016ffbd752 Bug #4936 - Highlighting a question text fragment with different color; merged from MOODLE_16_STABLE 2006-08-09 19:31:09 +00:00
skodak c853b39f50 Bug #6225 - Moodle bug #4658 Breaks assignment type: Upload Single; merged from MOODLE_16_STABLE 2006-08-09 18:36:54 +00:00
tjhunt dba4e6da97 Document table_column. 2006-08-09 17:46:16 +00:00
stronk7 433a13bc22 index2fk performed 2006-08-09 15:45:27 +00:00
moodler 41811960a1 Added patch from Tim (http://moodle.org/mod/forum/discuss.php?d=51323#234978) 2006-08-09 14:16:13 +00:00
moodler 2ad25548c6 Fixed some typos. Thanks Tim! 2006-08-09 14:01:14 +00:00
moodler f10306b9e2 Removed tabs 2006-08-09 14:00:51 +00:00
moodler d1516f2064 Fixed a typo, thanks Tim 2006-08-09 13:55:05 +00:00
moodler ee4a52c59e Removed tabs 2006-08-09 13:53:12 +00:00
moodler dabfd0ed85 Removed tabs 2006-08-09 13:45:49 +00:00
moodler bee7ee3815 Removed tabs 2006-08-09 13:39:44 +00:00
moodler 5ec8a4f009 Removed tabs 2006-08-09 13:18:33 +00:00
moodler 9888263703 Removed tabs 2006-08-09 13:14:15 +00:00
moodler 30725d5a3b Tabs and some random formatting fixes 2006-08-09 13:11:53 +00:00
stronk7 388e9ab212 One more FK in blocks system. 2006-08-09 11:56:02 +00:00
skodak 563e64e3de Bug #6106 - HTML editor inserting unwanted hard return between images; merged from MOODLE_16_STABLE 2006-08-09 09:37:01 +00:00
vyshane 7613e6d7d1 More updates in lib.php 2006-08-09 09:18:31 +00:00
vyshane f0eb2ffe85 Added mod/forum:viewhiddentimedposts 2006-08-09 09:17:37 +00:00
vyshane 53d7785b4a Added moodle/site:viewfullnames 2006-08-09 09:16:35 +00:00
vyshane 0fa18d5a27 Bug fixes + updated capabilities. 2006-08-09 06:59:28 +00:00
moodler ced70cb63d More Roles-related strings 2006-08-09 05:54:27 +00:00
moodler f21d80947c Fix up the admin listing a bit 2006-08-09 05:53:36 +00:00
moodler 927bf46f3c Tidy-ups 2006-08-09 05:37:53 +00:00
moodler aa31141173 Small cleanup of a notification 2006-08-09 05:37:31 +00:00
moodler 4ed70f1b6e Some new strings 2006-08-09 05:35:55 +00:00
moodler ec0810ee2d Some fixes to make the context more readable for humans 2006-08-09 04:51:05 +00:00
toyomoyo 07a9cdb544 tables went missing =( 2006-08-09 04:00:44 +00:00
skodak f9d5371b28 new function get_coursemodule_from_id() is now used for obtaining of valid $cm from coursemodule id SC#283 2006-08-08 22:09:55 +00:00
stronk7 9c642ecacb Initial XMLDB schema for data tables. Using FKs where they are obvious. 2006-08-08 17:00:44 +00:00
stronk7 305ebf6849 Initial XMLDB schema for choice tables. Using FKs where they are obvious. 2006-08-08 17:00:03 +00:00
stronk7 14e1b02e68 Initial XMLDB schema for chat tables. Using FKs where they are obvious. 2006-08-08 16:59:35 +00:00
stronk7 5a1d835487 Adding some unsigned keywords here and there and implementing role tables 2006-08-08 09:04:55 +00:00
toyomoyo e9871557be some UI change for roles 2006-08-08 08:31:21 +00:00
toyomoyo 90f7a7d509 adding unsigned 2006-08-08 08:30:10 +00:00
toyomoyo e6723f80dc these tables should not be there,, 2006-08-08 08:04:01 +00:00
vyshane 9af1611a06 Replaced capability mod/forum:viewdiscussionsfromallgroups by
moodle/site:accessallgroups in code. Removed former from mod/forum/db/access.php.
2006-08-08 06:56:09 +00:00
vyshane 27950688bb Added moodle/site:accessallgroups capability. 2006-08-08 06:45:25 +00:00
moodler bbbf2d4015 ROLES AND PERMISSIONS - FIRST CHECK-IN
=======================================

WARNING:  DEV IS CURRENTLY VERY UNSTABLE.

This is a mega-checkin of the new Roles system.   A lot of changes have
been made in core and modules.

Currently there are a lot of rough edges and known problems.  We are
working hard on these .. .the reason for getting this into HEAD at this
stage is enable us to move faster (our branch was diverging from HEAD
too much).

Please keep an eye on http://docs.moodle.org/en/Roles for current status
and information for developers on how to use the new Roles system.
2006-08-08 05:13:06 +00:00
moodler 394577c3e4 Automatic installer.php lang files by installer_builder (20060808) 2006-08-08 02:48:27 +00:00
stronk7 2bcd169775 Hack to link from the admin interface to the XMLDB editor. 2006-08-07 19:47:03 +00:00
stronk7 ab8bfc7eee Two new strings to display the XMLDB editor under the admin page. 2006-08-07 19:45:02 +00:00
stronk7 cbd645bf96 Initial commit of assignment XMLDB file. Stopping now from now. Going to document things... 2006-08-07 19:02:46 +00:00
stronk7 e80d52526d Initial commit for enrol tables XMLDB 2006-08-07 18:52:27 +00:00
stronk7 08b6ce833d Initial commit for rss block tables 2006-08-07 18:40:37 +00:00
stronk7 158c1b3035 Initial commit of blocks XMLDB schema 2006-08-07 18:30:46 +00:00
stronk7 a689637d0f Polishing a bit key and indexes names... 2006-08-07 18:02:15 +00:00
stronk7 dff83d0bdc Initial XMLDB implementation of Moodle backup tables 2006-08-07 17:58:19 +00:00
stronk7 67d7d69494 Initial XMLDB implementation of Moodle Core. 2006-08-07 17:38:06 +00:00
skodak 3e46c6ec5a Swf now disabled by default in Mediaplugin and added explanation SC#284; merged from MOODLE_16_STABLE 2006-08-07 14:53:53 +00:00
moodler 214f1402ac Automatic installer.php lang files by installer_builder (20060806) 2006-08-06 02:50:52 +00:00
tjhunt 5a14d563b9 Bug #5972 - Some question types mark a blank answer inconsistently.
Also, cleaned up the marking code for numerical and short answer questions, partly by making the base-class method more useful.

Rewrote the way the way short answer questions do wildcard matching to be more robust, Unicode safe, and generally not suck.

This is a big change, so I am pleased to report I tested it using my new Selinium  test suite. See: http://moodle.org/mod/forum/discuss.php?d=51161
2006-08-04 16:53:43 +00:00
tjhunt 00c300692f Fix whitespace. 2006-08-04 16:47:57 +00:00
tjhunt 0b4ce29d8d Matching question would fill in the right answer after an incorrect attempt. 2006-08-04 12:28:39 +00:00
martinlanghoff cbfad05c86 login: forgot password now works for guest again (bug #6214) 2006-08-04 06:11:48 +00:00
martinlanghoff bed24ce7f5 mod/assignment if we are not using a numeric scale and a custom scale
return that as the max grade


Author: Jun Yamog <jun@catalyst.net.nz>
2006-08-04 05:51:31 +00:00
skodak 2c93e66a4c merging forgotten changes from MOODLE_16_STABLE; sorry for the breakage ;-) 2006-08-03 19:19:23 +00:00
tjhunt bc5694133a Bug #6206 - Quiz can't be created on some mysql configurations. Merged from MOODLE_1.6_STABLE. 2006-08-03 16:30:38 +00:00
skodak df77b427d5 check_dir_exists() has new recursive parameter - it should help clean up the restore code a bit and could be handy elsewhere too; tested in both linux and windoze 2006-08-02 19:40:58 +00:00
mchampan 56e924061e Resource doc type and Zend readme changed. 2006-08-02 15:31:59 +00:00
mchampan c629cfed33 Option for additional search types added. 2006-08-02 15:17:46 +00:00
mchampan 01e6afe2cd String issue fix in ZF. 2006-08-02 15:15:45 +00:00
moodler f505236c51 Automatic installer.php lang files by installer_builder (20060802) 2006-08-02 02:47:38 +00:00
koenr 3e35ad3397 string is necessary in 1.6 (so must stay here for backward compatibility of translated language packs, created with Moodle editor) 2006-08-01 19:58:07 +00:00
skodak 9e72ebd678 improved redirect() - faster and more standards compliant 2006-08-01 18:02:42 +00:00
skodak 583fad994c Bug #5352 - upgrade might be interrupted by user - upgrades are now logged into moddata/upgradelogs/, user abor is ignored and concurrent running of upgrades is prevented from one browser 2006-08-01 07:46:19 +00:00
toyomoyo 0c23b59c9b merfed fix for 6178 2006-08-01 05:12:13 +00:00
skodak bfc38bb2eb merging changes from MOODLE_16_STABLE 2006-07-31 18:21:42 +00:00
skodak a8ff58dd2c merging changes from MOODLE_16_STABLE 2006-07-31 18:10:02 +00:00
skodak 889e6b46f4 Bug #6147 - Upgrade from 1.5.x breaks with Postgres 7.4.x
Even though Postgres 7.4.x is officially supported, several upgrade scripts use syntax that only works in Postgres 8.x. and it's impossible to finish the upgrade.

The attached patch fixes those scripts.

Saludos. I�aki.

Author: I�aki Arenaza
Review: Jun Yamog, Martin Langhoff

merged from MOODLE_16_STABLE
2006-07-31 18:04:10 +00:00
skodak 365525fc51 Bug #6147 - Upgrade from 1.5.x breaks with Postgres 7.4.x
Even though Postgres 7.4.x is officially supported, several upgrade scripts use syntax that only works in Postgres 8.x. and it's impossible to finish the upgrade.

The attached patch fixes those scripts.

Saludos. I�aki.

Author: I�aki Arenaza
Review: Jun Yamog, Martin Langhoff

merged from MOODLE_16_STABLE
2006-07-31 17:54:32 +00:00
ethem d9d69929f5 Don't show authorize.net password for security reasons. Merged from 16stable. 2006-07-31 12:45:34 +00:00
ethem 0127848e11 Don't show authorize.net password for security reasons. Merged from 16stable. 2006-07-31 12:37:12 +00:00
skodak 3ea3763a18 Bug #6146 - Smiley popup can not be translated; merged from MOODLE_16_STABLE 2006-07-31 10:28:12 +00:00
skodak 1322b7199a fixed warning when no referer available; merged from MOODLE_16_STABLE 2006-07-31 10:05:23 +00:00
skodak d1a66080d5 Bug #6168 - missing link for course request - fixed; merged from MOODLE_16_STABLE 2006-07-31 09:18:52 +00:00
martinlanghoff 0ff463ae95 assignment: count_user_files() no longer creates extraneous dirs (bug#4658)
Applied the fix by Samuli.Karevaara, from the bug report - the directory is checked for existence beforehand.
Previously it was created if it didn't exist, then the files within it were counted.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-07-31 04:56:58 +00:00
martinlanghoff 51886e2fb4 wiki: Added a link to force reloading of the page (WR#515)
The link allows the page to be reloaded, which saves people from only seeing the cached copy. This is the equivalent of doing Shift+Reload in most
browsers.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-07-31 04:56:12 +00:00
martinlanghoff c1cda9df45 forum: notification of a moved dicussion (bug#4874)
Moving a discussion now leaves a notification message in the
original location with a link to the new location.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-07-31 04:54:44 +00:00
julmis 5113b779f6 First attempt to indentify special tags and nicely formatted output 2006-07-31 01:45:22 +00:00
julmis bb9cd4503a Merging from stable 2006-07-30 23:24:43 +00:00
skodak 3d05094553 SC #280 force downloading of database files; merged from MOODLE_16_STABLE 2006-07-30 22:44:50 +00:00
skodak 95d5682927 Bug #6170 - Glossary bug: it displays nothing when autolinking to non-ascii text and other minor cleanup; merged from MOODLE_16_STABLE 2006-07-30 22:22:22 +00:00
skodak 36259d1bd3 Bug #6135 - Reduce unnecessary use of strtolower to make non-English languages look better; merged from MOODLE_16_STABLE 2006-07-30 21:47:43 +00:00
skodak be933850a7 Bug #6176 - locale setting on config variables page not functioning correctly; merged from MOODLE_16_STABLE 2006-07-30 10:39:21 +00:00
moodler 8ee8f34bff Automatic installer.php lang files by installer_builder (20060730) 2006-07-30 02:47:40 +00:00
koenr bfb2734ed4 updating install.html (see bug 4759) Changed some links.
Should that file really be there?
2006-07-29 20:40:20 +00:00
koenr 4239429527 making one perfectionist happy (bug 5646) 2006-07-29 20:00:26 +00:00
skodak e9515eb3ec Bug #6181 - icelandic doesn't migrate; merged from MOODLE_16_STABLE 2006-07-29 09:44:33 +00:00
skodak 592c30370c Bug #6184 - unexpected T_OBJECT_OPERATOR on Admin/blocks; PHP 4.x compatibility 2006-07-29 09:08:56 +00:00
skodak f4f6599085 Bug #6183 - typo in clean_param() description; merged from MOODLE_16_STABLE 2006-07-28 20:57:19 +00:00
mchampan 0961c4e654 Added constant for search database table. 2006-07-28 13:27:44 +00:00
mchampan fef0afe183 Changed $doc->id to $doc->docid to prevent clashes with Zend Search's internal
$doc->id
2006-07-28 13:27:15 +00:00
tjhunt 7d6af8ca5a Bug #6185 - bug with matching questions. 2006-07-28 10:56:47 +00:00
tjhunt bdfad57b83 Added information to a comment. 2006-07-28 10:55:37 +00:00
urs_hunkler 89240f2f30 *** empty log message *** 2006-07-27 20:37:58 +00:00
urs_hunkler f88d969277 *** empty log message *** 2006-07-27 20:27:33 +00:00
urs_hunkler 13351b29b8 *** empty log message *** 2006-07-27 20:18:27 +00:00
ethem 9dec3768bc Merged from 16stable. 2006-07-27 16:11:11 +00:00
skodak 0e29ee3af7 Fixed Call to undefined function: print_progress() in /usr/share/moodle/admin/upgradeforumread.php; merged from MOODLE_16_STABLE 2006-07-27 11:49:52 +00:00
ethem 08b9be083c Bug: Sending email to admins/teachers the count of pending orders expiring. "Column 'timecreated' in where clause is ambiguous."
We joins 2 tables: course and enrol_authorize. We didn't select course.timecreated, but it gives this error.
Merged from MOODLE_16_STABLE.
2006-07-27 10:57:58 +00:00
tjhunt 9a1e5f0a5f Clarified unit test failure message. 2006-07-27 10:43:14 +00:00
tjhunt fad28a7451 More unit tests for numerical question type. 2006-07-27 08:32:50 +00:00
moodler 3088953230 Automatic installer.php lang files by installer_builder (20060727) 2006-07-27 02:50:35 +00:00
mchampan defb87ba90 Glossary indexing added, used to demonstrate that it's relatively simple
to add a new module to the indexing queue.
2006-07-26 11:29:35 +00:00
moodler ed35659607 Automatic installer.php lang files by installer_builder (20060726) 2006-07-26 02:43:53 +00:00
ethem 36e5d9b7e1 Merged from 16stable. 2006-07-25 17:38:32 +00:00
mchampan b585dc5fcb General updates, see README.txt. 2006-07-25 17:23:10 +00:00
mchampan d9e1bf2478 Initial commit 2006-07-25 17:10:58 +00:00
ethem 8692e35c77 New string: costdefaultdesc
<strong>In course settings, enter -1</strong> to cost field to use this default cost; Merged from 16stable.
2006-07-25 17:00:41 +00:00
tjhunt 22f2f41810 Start of unit tests for numerical question type. 2006-07-25 07:08:21 +00:00
ethem 8895a9cdc8 Sometimes ssl connections are slow. Increase max_execution_time to 5 minutes. Merged from 16stable. 2006-07-24 16:32:38 +00:00
tjhunt 3b48ba9dc1 Bug #6157 - lang strings using concatenation, not $a. Merged from MOODLE_16_STABLE. 2006-07-24 14:40:48 +00:00
ethem fc9e83ed5c * Update record as soon as possible. If update/insert record fails email to admin to have update manually.
* ignore_user_abort(true) at critical section (before fwrite($fp, "POST /gateway/transact.dll).
   This is last change to ignore request for user.
 * Made some functions "static" to call function directly. So, no need new enrolment_plugin_authorize() instance.
   Now, these are static:
   get_list_of_creditcards, zero_cost, get_course_cost, prevent_double_paid, email_to_admin, check_openssl_loaded
 * Some mtrace cleanup. Removed default new line.

This is big work. When PHP5 is required for moodle in the future, I will add static modifier to functions.
Now and future, this plugin is/will unbreakable; Merged from MOODLE_16_STABLE. :)
2006-07-24 12:19:20 +00:00
skodak b245d2e707 Bug #6159 Site settings interface typo - Combo list - my first commit form UK MoodleMoot :-); merged from MOODLE_16_STABLE 2006-07-24 10:33:34 +00:00
danmarsden f2b7abf058 Bug #5882 ldap enrolment doesn't work. $USER->student getting munged
patch from I?aki.
2006-07-24 00:37:58 +00:00
danmarsden 0ba66a5de0 Bug 6130 session has bad entries causes calendar to fail showing events
Workaround untill Session is fixed properly.
2006-07-24 00:15:54 +00:00
danmarsden e4aa175a92 Fixes for Bug 5749 and Bug 5750
summary of bug 5749 and 5750
fixes for: function causes timeout when deleting temporary files for large scorm objects
scorm\validate.php calls function scorm_delete_files from scorm\lib.php - but lib.php not included in validate.php

Validation of Scorm objects broken - adds entry in modules database even when scorm object is not created.
2006-07-23 23:48:09 +00:00
danmarsden 1e0c4d67fd Fix for Bug 6119 - gives error when choice full, and user submits a choice they have already selected 2006-07-23 22:14:31 +00:00
danmarsden 5ac207d98e fix for Bug #4733 title gets garbled when html inside title. 2006-07-23 22:05:18 +00:00
moodler d2308eb9ea Automatic installer.php lang files by installer_builder (20060722) 2006-07-22 02:44:19 +00:00
tjhunt 87ee4968e5 Bug #4811 (and several dups!) - Matching questions should treat identical answers as the same. 2006-07-21 13:58:00 +00:00
tjhunt 43595a3370 Replace a few odd tabs with spaces. Merged from MOODLE_16_STABLE. 2006-07-21 08:03:23 +00:00
stronk7 3f5adc4af1 Keeping this in sync with 16_STABLE 2006-07-21 07:56:27 +00:00
tjhunt 393c9d489a Bug #5946 - matching question php notice. Merged from MOODLE_16_STABLE. 2006-07-21 07:21:45 +00:00
urs_hunkler b08c4173ea merged, corrected bug with teacger rights 2006-07-21 05:00:02 +00:00
ethem 769b3187c2 x_auth_code is required for capture only transactions!
NOTE: Capture only transactions have not implemented yet!
2006-07-20 14:48:03 +00:00
skodak 57ea9c8fff fixed minor PHP5 compatibility problem with clone(); merged from MOODLE_16_STABLE 2006-07-20 06:54:44 +00:00
skodak 249ab74573 Bug #6075 - file admin/index.php is ISO encoded - headers broken by ob_end_flush(), fixed version check; merged from MOODLE_16_STABLE 2006-07-20 06:39:48 +00:00
skodak 5e60122254 Bug #6141 - Cron output is not plain text - <pre> and missing encoding, minor lang issues; merged from MOODLE_16_STABLE 2006-07-20 06:36:33 +00:00
skodak 250f78be94 Bug #6097 - HTML editor and brackets - fixes lesson problems; merged from MOODLE_16_STABLE 2006-07-20 06:32:38 +00:00
ikawhero 9f76a845ff Fixed typo. Merged from stable. 2006-07-20 01:33:11 +00:00
skodak 5337b2b727 yet another fix for course list for guests; merged from MOODLE_16_STABLE 2006-07-19 13:59:06 +00:00
skodak d35d50bf94 fixed course list for guests; merged from MOODLE_16_STABLE 2006-07-19 13:45:13 +00:00
skodak fe2920ad54 admin should not see list of courses on the frontpage when there are too many of them; merged from MOODLE_16_STABLE 2006-07-19 13:37:09 +00:00
skodak d157bd5b28 fixed course/index.php category display affected by previous commit - improved category and course list display on front page; merged from MOODLE_16_STABLE 2006-07-19 13:16:57 +00:00
skodak 1bc6fc82b6 section not always moved when requested - page reloading prevented by anchor; added random parameter to force reloading; merged from MOODLE_16_STABLE 2006-07-19 12:52:06 +00:00
skodak a987106d9e Bug #6093 - Removed course sections re-appear after moving existing sections; merged from MOODLE_16_STABLE 2006-07-19 12:30:39 +00:00
skodak 6f24e48e1f Improved category and course list display on front page- see bug Bug #5965 - Frontpage Category List also showing courses; new Combo List(categories + courses), fixed categories list and separate settings for not logged in / logged in users; merged from MOODLE_16_STABLE 2006-07-19 12:10:07 +00:00
moodler fa145ae1af Merged fixes from stable 2006-07-19 10:21:52 +00:00
skodak ad0f9c828e Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE 2006-07-19 08:13:25 +00:00
tjhunt 45d5305e19 Bug #6048 - Fix 'are you sure you want to start an attempt' warning. 2006-07-18 16:49:33 +00:00
stronk7 8f7211fc2c minor bump to perform some changes on grade_letter
Mimic from MOODLE_16_STABLE
2006-07-18 16:35:52 +00:00
stronk7 d272c2feb8 Fixing one recently added DB upgrade. Please be careful on STABLE!
Mimic from MOODLE_16_STABLE
2006-07-18 16:35:15 +00:00
tjhunt d7444d442f Bug #6033 - missing string for unknown questiontype. Also tidied up some messy code. Merged from MOODLE_16_STABLE. 2006-07-18 15:34:24 +00:00
tjhunt 1367cb8d6b SC#277. Merged from MOODLE_16_STABLE. 2006-07-18 13:33:45 +00:00
tjhunt ee26dfd17b Bug #6116 - Quiz database upgrade scripts call renamed function by the old name. Merged from MOODLE_16_STABLE. 2006-07-18 11:01:06 +00:00
urs_hunkler 1ec4315887 remove styles_layout.css 2006-07-18 09:21:39 +00:00
urs_hunkler 296ed48e99 merged from 1.6 - enhancements and bugfixes, works now in Safari and Konqueror 2006-07-18 09:11:35 +00:00
urs_hunkler d4b912c242 merged from 1.6 - some CSS changes 2006-07-18 08:10:29 +00:00
skodak f90238b303 Bug #2149 - admin/creators.html javascript error; merged from MOODLE_16_STABLE 2006-07-18 07:17:13 +00:00
skodak 8332de167d Bug #6134 - error of coding, in function grade_download_form(); merged from MOODLE_16_STABLE 2006-07-18 06:43:29 +00:00
martinlanghoff 2338ad3239 Close Bug #5670 - get_courses_page() - remove costly and redundant DISTINCT
get_courses_page() uses get_records_sql() which means that it will actually
break if the first field requested isn't c.id. This in turn means that
the DISTINCT is not needed at all.

So let's go fast again!
2006-07-18 04:39:01 +00:00
martinlanghoff cb6f407365 Course restore - Restrict shortname to <= 15 characters, like the database table.
Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-18 03:35:02 +00:00
moodler 23458f0d30 Automatic installer.php lang files by installer_builder (20060718) 2006-07-18 02:40:53 +00:00
toyomoyo 626fddc8f5 merged fix for a bug where user can view site blogs when not logged in 2006-07-18 02:28:25 +00:00
martinlanghoff 3279a35540 auth/db: When using internal passwords we must register auth_update_user_password()
Now users can update their password correctly. We did have this before, I
wonder if it got dropped in a merge.
2006-07-18 01:36:47 +00:00
martinlanghoff bd18fe9ced auth/db: use auth_validate_form() to set auth_db_stdchangepassword when passtype is 'internal'
When using the 'internal' password handling, set auth_db_stdchangepassword
so we allow users to change their password normally.
2006-07-18 01:36:24 +00:00
martinlanghoff 1590773b1c auth: extend API to support auth_validate_form()
Now Auth plugins can register auth_validate_form to get a chance
to validate config form input. Needed on MOODLE_16_STABLE to fix
a bug with auth/db.

The auth API must follow suit with the enrol API, where we can safely
do method_exists().
2006-07-18 01:36:06 +00:00
skodak 2d4fb02fa2 Bug #1395 - Calandar view.php should respect forcelogin; merged from MOODLE_16_STABLE 2006-07-17 21:08:01 +00:00
tjhunt a92a796a6a Bug 6092 - Give quiz finish time as well as start time in the quiz overview report. 2006-07-17 16:35:34 +00:00
skodak 1b4035b074 Bug #6129 - Incorrect glossary import file size limit; merged from MOODLE_16_STABLE 2006-07-17 13:35:05 +00:00
tjhunt da298d8201 Bug 5840 - Image not displayed in Cloze question. Thanks to Joseph Rezeau for the fix. Merged from MOODLE_16_STABLE. 2006-07-17 08:57:30 +00:00
skodak 43d774a94f Bug #6120 - Course creation - loginproblem; merged from MOODLE_16_STABLE 2006-07-17 08:39:36 +00:00
skodak 639835274c workaround by Dan for bug #6130, fixed some warnings; merged from MOODLE_16_STABLE 2006-07-17 07:31:22 +00:00
martinlanghoff 63aea8815d enrol API: Updated documentation 2006-07-17 06:02:10 +00:00
stronk7 cd58557ae0 Close properly the showentry page. Bug 5986.
(http://moodle.org/bugs/bug.php?op=show&bugid=5986)

Merged from MOODLE_16_STABLE
2006-07-16 09:01:03 +00:00
moodler 9448bfca23 Automatic installer.php lang files by installer_builder (20060716) 2006-07-16 02:38:13 +00:00
stronk7 c67303bd97 Soled bug 6089 plus some minor iteration savings...
(http://moodle.org/bugs/bug.php?op=show&bugid=6089)

Merged from MOODLE_16_STABLE
2006-07-15 08:39:50 +00:00
skodak 3984a18589 Bug #6080 - Loancalc block doesn't define a footer string; merged from MOODLE_16_STABLE 2006-07-14 21:05:14 +00:00
skodak e25f766dee todo: add detection of incorrect chars in wwwroot; merged from MOODLE_16_STABLE 2006-07-14 20:57:08 +00:00
tjhunt 062a7522c2 Bug 6111 - Rewrite the code for making an indented list of question categories, becase the existing code was so horrible. Merged from MOODLE_16_STABLE. 2006-07-14 15:36:29 +00:00
mchampan 91ad9557c1 Fixed pagination in query page (lines were too long, distorting table),
and added results caching to improve query time when browsing pages of the
same query. Wiki document strips (x.x.x.x) ip field from author field now.
2006-07-14 13:58:46 +00:00
sam_marshall 44c55d4662 Added hooks so that blocks can create functions that are run when they are installed and uninstalled. The base implementation does nothing. 2006-07-14 11:17:46 +00:00
moodler a62b843a51 Automatic installer.php lang files by installer_builder (20060714) 2006-07-14 02:37:32 +00:00
skodak 15a6cf334f Bug #6099 - Restore alternatively failing on data module - fixed status codes of module restore process; merged from MOODLE_16_STABLE 2006-07-13 15:38:03 +00:00
moodler 418b4e5a5f Merged new variable $CFG->allowvisiblecoursesinhiddencategories from stable 2006-07-13 14:18:29 +00:00
tjhunt a36f058e53 Bug 6101 - Automatically scroll to any errors when upgrading the database. JavaScript thanks to Andrew Walker. PHP changes are my fault. 2006-07-13 09:48:56 +00:00
moodler 118917bf17 Checking YUI into Moodle for future AJAX work 2006-07-13 08:35:43 +00:00
moodler 7bf59275a7 Merged assignment updates from stable 2006-07-13 07:50:13 +00:00
moodler fcdcc372f1 Integrating the "AU Assignment type" into Moodle (which was based on
Upload&Review).

It's not tested and probably needs polishing, but people seem to love it
as it is.

    http://moodle.org/mod/forum/discuss.php?d=46829
2006-07-13 07:17:51 +00:00
skodak afda6b5681 Bug #6087 - alphabetic problem in glossary; merged from MOODLE_16_STABLE 2006-07-12 20:29:18 +00:00
tjhunt bba6c85f24 Bug 5968 - Improvements to the numerical question type. You can now display feedback for wrong answers. You can also award partial credit for different levels of accuracy. 2006-07-12 18:10:22 +00:00
tjhunt fc05b7d1ca Doh! remove debug code. Sorry. 2006-07-12 17:54:45 +00:00
tjhunt 1fe641f7b4 Bug 5968 - Improvements to the numerical question type. You can now display feedback for wrong answers. You can also award partial credit for different levels of accuracy. 2006-07-12 17:49:14 +00:00
tjhunt 78b9c960e9 Fixed notice when restoring a numerical question with no units. 2006-07-12 17:37:36 +00:00
moodler b574487ae9 Automatic installer.php lang files by installer_builder (20060712) 2006-07-12 08:35:53 +00:00
martinlanghoff 7199fcd466 Fixed installer langpacks for sm and to. 2006-07-12 06:38:09 +00:00
skodak 18478666ca fixed printing of filenames from zip archives - SC#273; merged from MOODLE_16_STABLE 2006-07-12 05:57:28 +00:00
moodler e6e6ca0389 Automatic installer.php lang files by installer_builder (20060712) 2006-07-12 02:36:01 +00:00
martinlanghoff 07b76bad6a chat: Prevent user from submitting a 2nd message before his 1st is received.
Some users reported that mod/chat was silently dropping some messages. The
user's browser may not be able to keep up with the rate at which he submits
chat messages. This update keeps things sane.

Merged from MOODLE_16_STABLE

Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-12 02:29:12 +00:00
stronk7 1a9b9a0143 Emulate file_put_contents() under PHP 4.3.x 2006-07-11 17:42:21 +00:00
mchampan a25a3912f7 Search functions moved from mod/name/lib.php to search/documents/mod_document.php.
Pagination added to query page. Various small changes and amendments.
2006-07-11 17:15:22 +00:00
tjhunt 079aa26d7d Bug #6077 - Teacher saving their grades destroys student essay! Merged from MOODLE_16_STABLE. 2006-07-11 16:14:23 +00:00
mchampan e0eb89a13e Initial commit 2006-07-11 16:08:47 +00:00
danstowell 12a2567375 Small fix, and a bit more output, for IMS enroller 2006-07-11 14:09:26 +00:00
skodak 496d06443a better cleaning of $file parameter SC#276; merged from MOODLE_16_STABLE 2006-07-11 13:19:52 +00:00
skodak b2ec10959a workaround for Bug #6035 - editing quiz in one tab changes quiz in other; merged from MOODLE_16_STABLE 2006-07-11 13:02:42 +00:00
skodak 4e060ab972 Bug #6067 - The restore process behaves differently depending on which module contains the absolute links; merged from MOODLE_16_STABLE 2006-07-11 10:01:33 +00:00
moodler 18ab25bccd new installer.php file added. (stronk7)
Merged from MOODLE_16_STABLE
2006-07-11 09:43:22 +00:00
toyomoyo 2256c10d36 merged changing of feedback for the function that handles user table 2006-07-11 03:36:13 +00:00
moodler 10c51050fe Automatic installer.php lang files by installer_builder (20060711) 2006-07-11 02:38:03 +00:00
skodak 5109569b69 Bug #5988 - Branch Tables in 1.6+ (Lesson Module); merged from MOODLE_16_STABLE 2006-07-10 22:39:58 +00:00
skodak 46341ab710 Bug #5732 - Lesson Scores &quot;out of XX&quot; marks report incorrect mark; merged from MOODLE_16_STABLE 2006-07-10 21:52:12 +00:00
ethem 411df816d6 - authorize_expired function added to lessen the code.
- All functions in authorize plugin are named with authorize_ prefix.

Merged from 16stable.
2006-07-10 10:17:23 +00:00
moodler 6476b0afe7 CSS templates weren't being backed up! 2006-07-09 02:03:22 +00:00
skodak 81b0eec894 Bug #6050 - import glossary entries to new glossary not creating new glossary; merged from MOODLE_16_STABLE 2006-07-07 19:54:22 +00:00
thepurpleblob 1e8639290f Merged from STABLE 2006-07-07 10:36:56 +00:00
skodak 2af7f6e266 fixed warning in glossary export, merged from MOODLE_16_STABLE 2006-07-06 21:27:00 +00:00
skodak 10ab3efc35 Bug #5820 - IE returns unsecure items with SSL on login; merged from MOODLE_16_STABLE 2006-07-06 15:53:46 +00:00
thepurpleblob 0fade9ed01 Merged from STABLE 2006-07-06 14:01:52 +00:00
ethem f9bfa458a2 Some outputting debugging info for cron. Merged from 16stable. 2006-07-06 13:41:55 +00:00
danstowell 6d19caab41 Change to make LDAP enroller simply ignore accounts with blank idnumber - see moodle.org discussion with Inaki 2006-07-06 13:13:42 +00:00
ethem 1c23b14db3 - Daily cron seperated from main cron for performance.
- Performance for welcome message sending to students. Order by student. This sends only one message for each students.

Merged from MOODLE_16_STABLE.
2006-07-06 12:01:24 +00:00
ethem 8ca28a6119 New string: welcometocoursesemail 2006-07-06 11:54:27 +00:00
tjhunt ec23db087c Bug 6031 - missing parameter for warningmissingtype in libquestionlib.php. Merged from MOODLE_16_STABLE. 2006-07-06 11:09:24 +00:00
skodak 2cc14e87d3 Bug #4698 - Login block is broken!, improved cookie test; merged from MOODLE_16_STABLE 2006-07-06 10:11:06 +00:00
tjhunt 68d07f8b01 6030 - Can't move question categories back to the top level. Merged from MOODLE_16_STABLE. 2006-07-06 10:07:26 +00:00
skodak 84a9db331f Bug #5921 - editing forum post bug; merged from MOODLE_16_STABLE 2006-07-06 10:01:12 +00:00
skodak 246444b975 Bug #5615 - Assigment listing shows duplicate names with paged display; merged from MOODLE_16_STABLE 2006-07-06 09:47:48 +00:00
tjhunt 16750bcd85 File header cleanup. 2006-07-06 09:45:02 +00:00
thepurpleblob 2c4ef1504f Merged from STABLE 2006-07-06 08:37:56 +00:00
martinlanghoff 330b0bb2ad wiki: fix for IE6 bug with HTMLArea, where the text area is not drawn
IE6 measures a page element and - sometimes - it does this before the
element is drawn, so the dimensions it finds are zero. This update sets
sensible minimum for the width.

Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-06 05:38:53 +00:00
martinlanghoff 95900e17f2 wiki: Fix for broken view on new (empty) wiki pages.
The wiki should display the 'edit' screen when a user tries to view a page
that doesn't exist. This output should not be filtered.

Merged from MOODLE_16_STABLE

Author: Donal McMullan
2006-07-06 05:08:11 +00:00
tjhunt df7d152e77 Improved on-screen instructions for matching questions. 2006-07-05 15:39:27 +00:00
mchampan abb4ea20d4 Cleaned up files, fixed some discrepancies and made sure strings that needed escaping
used the correct function. Add description comments to files.
2006-07-05 14:37:16 +00:00
thepurpleblob 71ffbac2da merged from STABLE 2006-07-05 12:39:35 +00:00
tjhunt 9e452c0d7b Layout similar question types more consistently. 2006-07-05 12:32:53 +00:00
tjhunt 645d76103b Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. And another one. 2006-07-05 12:19:11 +00:00
tjhunt 974383f976 Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. And another one. 2006-07-05 12:00:23 +00:00
tjhunt 0c24ee0fbf Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. I missed a bit last time. 2006-07-05 11:58:14 +00:00
thepurpleblob eaaf06f1ce Merged from STABLE 2006-07-05 11:51:08 +00:00
sam_marshall ba75ad9400 Minor changes to send_file():
* Wrote phpdoc comment that documents all parameters
* Added $mimetype param (default empty) that can be used if MIME type is already known and doesn't need guessing from filename
2006-07-05 11:10:37 +00:00
tjhunt 00aeaec820 Bug 6019: Quiz timer does not submit the form when it reaches zero. Merged from MOODLE_16_STABLE. 2006-07-05 10:43:53 +00:00
skodak 8a91d7fcf3 changed memory limit test in healthcenter; merged from MOODLE_16_STABLE 2006-07-05 08:38:34 +00:00
skodak 9bbb40d631 healthcenter fixes - new extra whitespace detection, fixed automatic slasharguments detection; merged from MOODLE_16_STABLE 2006-07-05 07:44:20 +00:00
toyomoyo 8ab2baa8f3 merged fix for a problem where globallang is not respected in user table 2006-07-05 01:55:29 +00:00
tjhunt a58ffe3fe2 Bug 5971 - Allow matching questions to have extra wrong answers. 2006-07-04 17:11:00 +00:00
skodak aedbbbcf9c fix for mysqladmin links; merged from MOODLE_16_STABLE 2006-07-04 09:41:47 +00:00
skodak bc1544bfc7 Bug #5909 - Fix use of user_group() because it returns arrays now - part 2 forum search fixed too; merged from MOODLE_16_STABLE 2006-07-04 08:32:05 +00:00
skodak 06622f92fc fixed $site->id warning; merged from MOODLE_16_STABLE 2006-07-04 06:05:25 +00:00
skodak 81e10e950d Bug #6007 - &quot;The requested URL /course/report/log/view.php was not found on this server&quot; merged from MOODLE_16_STABLE 2006-07-04 05:27:18 +00:00
moodler 21c5d4ed3d Automatic installer.php lang files by installer_builder (20060704) 2006-07-04 02:38:09 +00:00
skodak f262874bbe Bug #5909 - Fix use of user_group() because it returns arrays now - part 1; merged from MOODLE_16_STABLE 2006-07-03 21:11:17 +00:00
skodak 13d32e2297 Bug #5974 - Course overview report should not error when stats are not up to date; fixed by changing the return value from stats_check_uptodate(), NULL is now OK, string value describes error and adding notify() where needed; merged from MOODLE_16_STABLE 2006-07-03 15:43:41 +00:00
tjhunt 4f9c6e279c Rename lang file as per Martin's request. 2006-07-03 10:04:04 +00:00
skodak d61989033f Bug #5991 - The calendar does not show the month's first day's event; merged from MOODLE_16_STABLE 2006-07-03 09:10:12 +00:00
skodak 7eb60c262a Bug #5995 - poor English in expiry notice; merged from MOODLE_16_STABLE 2006-07-03 07:21:20 +00:00
skodak dbfa9ccd8d Bug #5996 - block+resource=problem; merged from MOODLE_16_STABLE 2006-07-03 06:26:38 +00:00
moodler 050e11247b Automatic installer.php lang files by installer_builder (20060701) 2006-07-01 02:38:26 +00:00
tjhunt 3ef8c9362d Bug #5979 - Check in the OU's unit testing framework. Docs at http://docs.moodle.org/en/Unit_tests 2006-06-30 14:59:05 +00:00
skodak 6544f8d896 slashargument fix for healthcenter, better diagnostic messages; renamed file.php/pic.jpg option to file.php/1/pic.jpg because the course number is mandatory; merged from MOODLE_16_STABLE 2006-06-30 13:46:25 +00:00
skodak 629c25da67 cleanup in admin/index.php; preparation for health center, loginas gui, password salts; merged from MOODLE_16_STABLE 2006-06-30 13:06:31 +00:00
skodak 79b37009fc fixed // in course root when browsing files; merged from MOODLE_16_STABLE 2006-06-30 11:56:37 +00:00
tjhunt c358d62055 Bug 5967 - Missing lang strings and help for quiz reports. Merged from MOODLE_16_STABLE. 2006-06-30 10:31:44 +00:00
skodak 06cfc6db58 Bug #5961 - small grammar error; merged from MOODLE_16_STABLE 2006-06-30 07:36:06 +00:00
skodak aba588a726 Bug #5802 - Incorrect length in http partial content (206) packets.; merged from MOODLE_16_STABLE 2006-06-30 07:23:08 +00:00
moodler 95e86170a2 Automatic installer.php lang files by installer_builder (20060630) 2006-06-30 02:41:15 +00:00
skodak 9c1cd39de5 Bug #5937 - Fix nonascii chars in graphs:
* text is converted to unicode - no html entities anymore
 * then all nonascii chars are converted to decimal number entites
 * default.ttf is searched in dataroot/lang and local language packs too
 * removed lang_decode() - obsoleded by proper entity converison above
 * updated documentation in lang/en_utf8/fonts/README.txt

merged from MOODLE_16_STABLE
2006-06-29 21:22:16 +00:00
ethem 3b34491b95 Put back last commit. If cost is 0, it always falls back to manual method. 2006-06-29 19:13:12 +00:00
ethem 11fffc6059 Merged from MOODLE_16_STABLE. 2006-06-29 19:07:28 +00:00
moodler 5e2194494b new installer.php file added. (stronk7)
Merged from MOODLE_16_STABLE
2006-06-29 16:55:24 +00:00
ethem b1c87d90dc $teacher is used in manual form. No need global. merged from 16stable. 2006-06-29 15:03:54 +00:00
ethem 665d43006a get_student_courses and get_teacher_courses functions added for future reference.
Cron description added. Merged from 16stable.
2006-06-29 12:44:01 +00:00
ethem 8389613abb Don't show choose method string if course cost is 0. Merged from 16stable. 2006-06-29 11:27:32 +00:00
ethem c4e2966709 New string. No cost yet. Merged from 16stable. 2006-06-29 11:12:08 +00:00
ethem c1f6386c47 Interactive plugins (authorize and paypal ) must use 'manual'.
Some patches must be applied to lib/db.
http://moodle.org/bugs/bug.php?op=show&bugid=5941
Look: version.patch, lib_db.patch

Eloy, your question about enrol fields for interactive plugins were solved.
Now, we sure we never use authorize and paypal field for backup and restore.
Because manual is active and cannot be disabled when restoring.
Bug #5358 - Add support for enrol systems in backup/restore
http://moodle.org/bugs/bug.php?op=show&bugid=5358&pos=0

Merged from 16 stable.
2006-06-29 10:38:34 +00:00
ethem c1a2545882 Bug #5941 - Myriad of problems with Paypal enrollmemts, au_enrol.patch
Merged from 16 stable.
2006-06-29 09:49:36 +00:00
skodak 895a45e231 Bug #5944 - error message when moving thread; merged from MOODLE_16_STABLE 2006-06-29 08:01:48 +00:00
skodak 8b23c04a12 Bug #5952 - bad links in &quot;about wysiwyg editor&quot; merged from MOODLE_16_STABLE 2006-06-29 07:20:37 +00:00
skodak 4630e4e483 Bug #5953 - problem in /auth/ldap/lib.php; merged from MOODLE_16_STABLE 2006-06-29 07:05:00 +00:00
skodak eb073d70ad Bug #5955 - link to help item for html editor looks funny; merged from MOODLE_16_STABLE 2006-06-29 07:00:27 +00:00
skodak 62ce993db3 Bug #5959 - save and view takes to wrong place; merged from MOODLE_16_STABLE 2006-06-29 06:53:53 +00:00
skodak 036c0fcb1a Bug #5960 - can't delete or edit comments; merged from MOODLE_16_STABLE 2006-06-29 06:48:31 +00:00
moodler 71b2e4986f Automatic installer.php lang files by installer_builder (20060629) 2006-06-29 02:38:54 +00:00
tjhunt 04a4cd2a0e Bug #5918 - essay question comments from teachers lost in 1.6 upgrade. Thanks to Mark Nielsen the suggestion of how to fix. Merged from MOODLE_16_STABLE. 2006-06-28 17:21:53 +00:00
mchampan bef08835f7 Corrected database prefix_ errors 2006-06-28 16:12:08 +00:00
skodak d6e1bd8092 Bug #5941 - Myriad of problems with Paypal enrollmemts, part 3 - fixed 'login as student' button, now plain guest login action; merged from MOODLE_16_STABLE 2006-06-28 15:38:04 +00:00
skodak e87fe61524 Bug #5941 - Myriad of problems with Paypal enrollmemts, part 2 - Login as guest not shown to guests and there is login link instead of paypal button for guests; merged from MOODLE_16_STABLE 2006-06-28 15:26:31 +00:00
skodak 7c24284126 minor loginas cleanup; merged from MOODLE_16_STABLE 2006-06-28 14:58:30 +00:00
skodak 44adc9032b Bug #5941 - Myriad of problems with Paypal enrollmemts, part 1; merged from MOODLE_16_STABLE 2006-06-28 12:45:28 +00:00
tjhunt 82b5d7cd8e Bug #5922 - comment from manualgraded questions lost during regrade. Thanks to Jean-Michel Vedrine for the fix. Merged from MOODLE_16_STABLE. 2006-06-28 11:45:11 +00:00
tjhunt 5190eed81b Bug #5945: Lang string name missmatch when starting quiz attempt. Merged from MOODLE_16_STABLE. 2006-06-28 10:13:40 +00:00
moodler 9e0c1e331c Automatic installer.php lang files by installer_builder (20060628) 2006-06-28 02:37:47 +00:00
mudrd8mz 1bd9b44a33 * Hide preview link when editing docs\ files. I have not found any way how to display
local documenation pages in 1.6. More comment in bug 4972
* Hide the form when displaying non-editable files (like en_utf8 ones).
2006-06-28 01:02:54 +00:00
skodak 43f06aa027 Bug #5927 - extending enrollments doesn't; merged from MOODLE_16_STABLE 2006-06-26 21:58:35 +00:00
skodak a251b76547 Bug #5931 - blocks block database; merged from MOODLE_16_STABLE 2006-06-26 21:35:05 +00:00
skodak b3d4840d39 assignments on mymoodle page, Bug #5839 - Found more than one record in get_record_sql !; merged from MOODLE_16_STABLE 2006-06-26 16:16:43 +00:00
skodak 6865c1ff89 fixed broken stats image link, Bug #5924 - User profile statistics tab; merged from MOODLE_16_STABLE 2006-06-26 13:49:03 +00:00
tjhunt 5e60643e1b Bug 5889 - Regrading a quiz wipes student answers. Thanks to Jean-Michel Vedrine for the fix. Merged from MOODLE_16_STABLE. 2006-06-26 11:23:32 +00:00
toyomoyo b7425e2ebc merged fix for 5916 2006-06-26 08:32:39 +00:00
skodak 77cf4951b7 fixed Turkish problems see, Bug #5878 - Teachers can't add blog and blocks; merged from MOODLE_16_STABLE 2006-06-26 07:23:10 +00:00
vyshane 4e5e7d54b5 Merged from 1.6 stable. Error message now displays using notify() instead of
error() when purging of old RSS feeds fail during a discussion move.
2006-06-26 04:44:41 +00:00
mchampan 682d403259 Initial commit 2006-06-25 23:07:36 +00:00
stronk7 1cd1252752 Some minor changes in order to avoid some notices... 2006-06-25 10:16:45 +00:00
julmis 63183a0932 Commenting out ob_gzhandler
Merging from stable
2006-06-23 19:53:26 +00:00
danstowell 87075ec1cd Fixed typo which caused images in questions to fail to display if NOT using slasharguments 2006-06-23 15:06:23 +00:00
stronk7 83c020ba20 Sending Yu's change to support custom langs to HEAD.
Changed progress info to 1000 records (from 5000). This
makes the script a bit more responsive on browser stops.

If finally approved, this should go to 16_STABLE too. (+1 for it)
2006-06-22 23:39:42 +00:00
thepurpleblob 2cb6db51f3 Merged from STABLE 2006-06-21 10:19:46 +00:00
toyomoyo d7f0baa944 merged fix for 5881 2006-06-21 03:13:46 +00:00
moodler 15983a967b Automatic installer.php lang files by installer_builder (20060621) 2006-06-21 02:41:28 +00:00
ethem bd4669d344 Very small change. A little performance for cron if admin enabled sending email for pending orders expiring.
1- If dailysettlement is 00:05 and cron executes at this time, nothing will occur. If it is executes at 00:10 it works. I think "<" works faster then "<=" :))
2- Don't compare course->ids by authorize->courseid, because courses are grouped by courseid. We sure each line is unique.
3- Only get pendingorderexpiring strings for sending email if course teachers exist.

Merged from 16stable.
2006-06-20 17:22:00 +00:00
stronk7 c17d7ead6a helper string to explain $CFG->doctonewwindow added.
Merged from MOODLE_16_STABLE
2006-06-20 14:23:58 +00:00
stronk7 7038fe44bf Now docs are showed in a new window based on $CFG->doctonewwindow
Merged from MOODLE_16_STABLE
2006-06-20 13:53:09 +00:00
stronk7 d3b9dbad78 Added new option to decide if docs will be showed in a new window.
Merged from MOODLE_16_STABLE
2006-06-20 13:41:56 +00:00
mits 71e367bd8a Changed <hr> widh of header.html.
Added <hr> to footer.html.
Changed color of "HOME" button.

Eloy, thanks for good suggestion.
2006-06-19 18:20:18 +00:00
mits 21bc85d65a Added back homelink to oceanblue theme based on standard theme. 2006-06-19 16:36:51 +00:00
moodler 2de506e1da Merged homelink from stable 2006-06-19 16:32:00 +00:00
moodler e6dd6b9a68 No need for error when deleting RSS feed 2006-06-19 16:20:35 +00:00
moodler 25fb38d465 Merged tag block context fixes from stable 2006-06-19 14:17:55 +00:00
moodler adc7b679aa Merged user tab visibility from stable 2006-06-19 13:52:39 +00:00
moodler c1edf72575 Merged header fix from stable 2006-06-19 13:38:17 +00:00
toyomoyo 08cf9e250d merged, changed copyright to &#169; to validate better 2006-06-19 03:53:26 +00:00
toyomoyo 6c525f490d merged, gives IE a bit more time to print 2006-06-19 03:30:08 +00:00
vyshane 68efe393f6 Merge from 1.6. New class FPDF_Protection. See bug #5855. 2006-06-19 02:41:44 +00:00
moodler fb06b25570 Merged migration fixes from stable 2006-06-18 10:09:58 +00:00
moodler e5f121c6c1 Merged XHTML fix from stable 2006-06-18 08:21:35 +00:00
moodler a6320cc0b8 Merged helplink fix from stable 2006-06-18 08:10:52 +00:00
moodler c96a3047ec Merged header fixes from stable 1.6 2006-06-18 07:45:22 +00:00
moodler feec09eecf Merged fix for bug 5830 into dev 2006-06-16 09:42:38 +00:00
moodler 2de48ff93d Added check for $CFG->disablemycourses 2006-06-16 04:28:56 +00:00
toyomoyo e3ec7995a7 merged, centering of tabs on blog page issue 2006-06-16 02:59:37 +00:00
mjollnir_ ca79268087 merged from MOODLE_16_STABLE: participants list last access filter should only show for teachers! I noticed this on moodle.org this morning :| 2006-06-15 21:37:20 +00:00
ethem 2bc509a3c1 $a->course: course information added. Merged from stable. 2006-06-15 14:23:04 +00:00
ethem 8dd19dd3d2 $a->course: course information added. 2006-06-15 14:08:41 +00:00
ethem e3df6104f4 pendingordersemailteacher string added
merged from stable
2006-06-15 13:37:25 +00:00
ethem fa6a9cba16 pendingordersemailteacher string added 2006-06-15 13:25:47 +00:00
ethem b9e829691e When the number of pending orders expiring are sent to the teachers via email, which one is important? The number of the orders or the total of the amounts.
Merged from 16 stable.
2006-06-15 12:55:39 +00:00
ethem 43457b5f0f When the number of pending orders expiring are sent to the teachers via email, which one is important? The number of the orders or the total of the amounts.
Merged from 16 stable.
2006-06-15 12:27:49 +00:00
tjhunt 1cc1fa2425 Bug #5825 redonly attribute does not work on checkboxes, so using disabled instead when displaying quizzes read-only. 2006-06-15 10:12:17 +00:00
ethem b282e815d5 Order by order count. Courses that have many orders are emailed first. Merged from 16_stable. 2006-06-15 08:06:52 +00:00
toyomoyo 2217ff8d50 merged fix for 5633 2006-06-15 06:33:13 +00:00
toyomoyo 5365eebf9f merged fix for 5814 2006-06-15 03:24:33 +00:00
ethem 50172716a3 Email subject for pending orders expiring.
Merged from stable.
2006-06-14 16:32:08 +00:00
ethem a0333291ba Email subject for pending orders expiring.
Merged from stable.
2006-06-14 16:26:01 +00:00
ethem 4670207162 Email subject for pending orders expiring. 2006-06-14 16:17:46 +00:00
tjhunt 0b34616411 Moved constant definitions out of function, so they are not run repeatedly giving lots of warnings. Merged from MOODLE_16_STABLE. 2006-06-14 15:35:27 +00:00
tjhunt ee800653e4 Corrected reference to lang string and fixed a notice. Merged from MOODLE_16_STABLE. 2006-06-14 15:32:55 +00:00
ethem 71e27db713 If admin set up 'Teachers can manage the payments of the course' and enabled 'Manual-Capture', course teachers are notified about pending orders expiring. Merged from MOODLE_16_STABLE. 2006-06-14 11:53:50 +00:00
vyshane 883f4e3dc6 Merged fix from 1.6 for bug:
Notice: Undefined property: id in /home/moodle/public_html/certificate/mod/forum/discuss.php on line 38

This happens when the user is not logged in and wants to view a forum of type
news.
2006-06-14 08:47:19 +00:00
moodler 05b7eba955 Merged print_error fix from stable 2006-06-14 03:17:19 +00:00
moodler a503a59068 Automatic installer.php lang files by installer_builder (20060614) 2006-06-14 02:36:00 +00:00
tjhunt 0d8b8f1777 Quiz module sometimes left the user staring at a blank page. Now there is an error message. Merged from MOODLE_16_STABLE. 2006-06-13 18:59:41 +00:00
tjhunt 6f1991905d Bug #5812 - Standard theme font size CSS not sufficiently defensive. Merged from MOODLE_16_STABLE. 2006-06-13 18:55:25 +00:00
ethem c9ad76139d Link to Payment Management page. Merged from 16stable. 2006-06-13 18:31:09 +00:00
ethem f404747bf1 Link to help file 'Order Review'. Merged from 16stable. 2006-06-13 18:04:25 +00:00
ethem 0483b0823c Help file for 'Order Review'. 2006-06-13 17:51:11 +00:00
ethem f00a651c61 Predict the time of settlement at first time. Probably, admin user set up own country timezone and we can use this time as settlement time.
Merged from 16stable.
2006-06-13 16:05:15 +00:00
tjhunt 3fae19dd98 Bug #5810 missing ' > 7' in debug test. Merged from MOODLE_16_STABLE. 2006-06-13 14:37:45 +00:00
ethem e758a8f627 ? Capture_Only transaction added.
Capture_Only transactions are used when you already have an authorization from a bank.
To use this type of transaction, you will need an authorization code from the card-issuer (usually a 5 or 6 digit number).
For example, if you called Visa directly and obtained an authorization over the phone,
you would need to submit a Capture_Only transaction to start the funds transfer process.
You can manually submit a Capture_Only transaction from your Virtual Terminal by selecting Capture Only,
or from a website or billing application by including the following variables with your transaction request:

? x_Type (Capture_Only)
? x_Auth_Code (the 5 or 6 digit code provided by the card-issuer)
2006-06-13 07:58:04 +00:00
vyshane 9dc3d3255d Merged from 1.6. Fix for Bug #5767 - Section links block is removed from
course view after settings update.
2006-06-13 07:50:02 +00:00
tjhunt ff1b2fadbe Fix restore notice. Merged from MOODLE_16_STABLE. 2006-06-12 15:37:05 +00:00
tjhunt f92cf442db Bug #5793: remember whether Show all has been clicked in the question bank. Merged from MOODLE_16_STABLE. 2006-06-12 13:54:01 +00:00
tjhunt 4f7eaab661 Bug #5790: Answer order for MC qtype not specified. Fix. Thanks to Peter Bulmer. Merged from MOODLE_16_STABLE. 2006-06-12 11:05:39 +00:00
toyomoyo 2e434c01e9 merged proper html for help file 2006-06-12 07:25:18 +00:00
toyomoyo dec87f2e28 merged, a few mismatch of length between db and this html 2006-06-12 07:18:58 +00:00
toyomoyo 1ed1b33e40 adding help file 2006-06-12 04:09:21 +00:00
moodler df2f835eeb Merged changes from stable 2006-06-11 06:48:56 +00:00
stronk7 5dd95d35e5 Due to one potential bug in PHP under Win32 (http://bugs.php.net/37775)
the [[cntrl]] pcre class was breaking some chars. Changed to a safer
alternative. Bug 5777.
(http://moodle.org/bugs/bug.php?op=show&bugid=5777)

Merged from MOODLE_16_STABLE
2006-06-10 23:33:49 +00:00
stronk7 c0bd060a58 Change the moodle_strtolower() function to use textlib services.
Also, mark it as deprecated, code should use text services directly.
Partially, bug 5777. It continues under investigation.
(http://moodle.org/bugs/bug.php?op=show&bugid=5777)

Merged from MOODLE_16_STABLE
2006-06-10 10:40:16 +00:00
moodler 318192731e Automatic installer.php lang files by installer_builder (20060610) 2006-06-10 02:34:51 +00:00
moodler b1c8f1bcaa Automatic installer.php lang files by installer_builder (20060610) 2006-06-09 18:56:41 +00:00
moodler 6afefb9aa0 Automatic installer.php lang files by installer_builder (20060610) 2006-06-09 17:09:45 +00:00
stronk7 b944917b2e Automatic installer.php lang files by installer_builder (20060609) 2006-06-09 15:52:58 +00:00
stronk7 407e95edbd Automatic installer.php lang files by installer_builder (20060609) 2006-06-09 15:29:45 +00:00
stronk7 f6c08703b6 Automatic installer.php lang files by installer_builder (20060609) 2006-06-09 15:11:03 +00:00
nfreear 782792047b Fix bug 5611 (Skip block), across 4 files. Extra parameter $title in weblib.php: print_side_block, edits to moodleblock.class.php, Standard style, en_utf8 language pack. 2006-06-09 14:25:18 +00:00
stronk7 9fd0678fdd The absolutely incredible bug! It was working being wrong! Bug 5775.
(http://moodle.org/bugs/bug.php?op=show&bugid=5775)

Merged from MOODLE_16_STABLE
2006-06-09 14:23:55 +00:00
nfreear d65611c3fe Fix bug 5611 (Skip block), across 4 files. Extra parameter $title in weblib.php: print_side_block, edits to moodleblock.class.php, Standard style, en_utf8 language pack. 2006-06-09 14:21:25 +00:00
ethem ecf2f1ac3d Sending email for pending orders expiring string (adminemailexpired) seperated.
Settings moved to adminemailexpsetting.
Merged from stable.
2006-06-09 11:25:57 +00:00
ethem 673d602458 Show 'name on card' string instead of moodle.php's user string. Merged from MOODLE_16_STABLE. 2006-06-09 11:00:18 +00:00
ethem aed6497003 Some config sections 'Order Review' moved to
an_teachermanagepay -> Site-Wide Settings
an_emailexpired: -> Email-Sending Settings
an_cutoff: -> Authorize.net Settings

merged from 16stable.
2006-06-09 10:30:01 +00:00
stronk7 daec7cda9b One notice() was preventing the upgrade to 1.7dev to continue. Bug 5773.
(http://moodle.org/bugs/bug.php?op=show&bugid=5773)
2006-06-09 10:15:03 +00:00
stronk7 d96466d29f Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)

Merged from MOODLE_16_STABLE
2006-06-09 10:04:43 +00:00
stronk7 d836482a34 Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)

Merged (more or less) from MOODLE_16_STABLE
2006-06-09 09:47:01 +00:00
stronk7 c766b9dfaa Avoid empty processing both for PLAIN_SQL_UPDATE and PHP_FUNCTION 2006-06-09 09:16:09 +00:00
mudrd8mz 45428e8614 * Fixed bug 5745 reported by Harry Smith so now can edit en_utf8_local pack
* More notification messages included
2006-06-09 08:48:45 +00:00
toyomoyo cc841d67b0 merged, fixed a bug that blog tabs are displayed when blog is diabled 2006-06-09 02:53:16 +00:00
bobopinna 7d3f4007cb Removed a doubled text 2006-06-08 15:38:56 +00:00
bobopinna 89354664d3 change advanced to parameters 2006-06-08 15:36:55 +00:00
bobopinna 7ad2067fd7 Fixed some language refinements 2006-06-08 15:22:24 +00:00
bobopinna a681c2b0f9 Fixed language refinements 2006-06-08 15:16:14 +00:00
vyshane fd45188142 Help content for available tags (data module). Merged from 1.6. 2006-06-08 08:28:23 +00:00
vyshane da52f1523c Merge from 1.6. Fix for scorm_option2text(). options field is now saved
proprely.
2006-06-08 07:39:37 +00:00
skodak 9ef80fa4aa Bug #5663 - errors after changing grade weight; merged from MOODLE_16_STABLE 2006-06-08 06:39:14 +00:00
skodak f2fe353f2b Fixed course searching; merged from MOODLE_16_STABLE 2006-06-08 06:25:05 +00:00
vyshane 535fc3e907 Merged from 1.6. Added missing string. 2006-06-08 06:20:09 +00:00
toyomoyo e3cfd5d717 merged fix for 5748 2006-06-08 04:08:04 +00:00
toyomoyo 1c994d89f8 merged, changed recordsize to 50 2006-06-08 02:46:45 +00:00
stronk7 cb27c4e823 Solve one issue with skipped courses and email to admin
being set every xx minutes. Bug 5621.
(http://moodle.org/bugs/bug.php?op=show&bugid=5621)

Merged from MOODLE_16_STABLE
2006-06-07 22:22:21 +00:00
ethem a17f20183e Unnecesary strings removed. Merged from MOODLE_16_MERGED 2006-06-07 18:47:09 +00:00
stronk7 8326d5afa3 Now the question_attempts creation and dotation will be
only executed if it hasn't been done in MOODLE_16_STABLE. Bug 5717.
(http://moodle.org/bugs/bug.php?op=show&bugid=5717)
2006-06-07 17:56:47 +00:00
skodak e7251cdd21 Bug #5522 - question/restorelib.php error; merged from MOODLE_16_STABLE 2006-06-07 14:57:26 +00:00
skodak c2f3feed17 incorrect course number in categories after course delete; merged from MOODLE_16_STABLE 2006-06-07 14:05:44 +00:00
danstowell 67e3f5b540 Fix to ensure default auth method is copied to new user records 2006-06-07 10:44:12 +00:00
vyshane b134f6a71e Merged fix from 1.6 for Bug #5131 - RSS Feeds and Moving Discussions. 2006-06-07 08:19:34 +00:00
toyomoyo b6640a76ba merged fix for 5720 2006-06-07 06:05:03 +00:00
toyomoyo 257c550aae merged fix for 5720 2006-06-07 05:59:25 +00:00
toyomoyo 9073d2ddad merged, small changes to javascript progress bar 1) updates correctly when resuming 2) number of tables not hard coded anymore 2006-06-07 04:32:05 +00:00
toyomoyo 92cf4ecc12 merged, changes made to process user table on row basis. added migrate2utf8_user function. please help test and report bugs! 2006-06-07 04:11:10 +00:00
skodak d12cb320b3 Bug #5659 - Problem with build-in buttons when creating templates; merged from MOODLE_16_STABLE 2006-06-06 20:55:25 +00:00
skodak 332fbc3027 Bug #5734 - Enrolled students can't access metacourse after unhiding while logged in; merged from MODOLE_16_STABLE 2006-06-06 19:01:46 +00:00
tjhunt f801c7e028 Fix notices when you restore a course with no parent or child courses. Merged from MOODLE_16_STABLE. 2006-06-06 17:27:15 +00:00
tjhunt c078b2527b Fix notices when you restore a course with an empty forum. Merged from MOODLE_16_STABLE. 2006-06-06 17:25:00 +00:00
tjhunt 37611ee17c Bug #5559: revised fix - using better CSS class names. Merged from MOODLE_16_STABLE. 2006-06-06 17:10:04 +00:00
stronk7 93e779c236 Adding two new strings for RESTRICTED tests in environmenlib. 2006-06-06 17:02:19 +00:00
stronk7 95a39282bf Now environmentlib supports RESTRICT sections (to be able to deny
any general test with more detail (the opposite to the BYPASS section)
(http://moodle.org/bugs/bug.php?op=show&bugid=5653)

Merged from MOODLE_16_STABLE
2006-06-06 16:19:17 +00:00
skodak 3cdd4eeba0 Bug #5535 - Database module backup error in 1.5.4, patch submitted by Patrick Pollet ; merged from MOODLE_16_STABLE 2006-06-06 15:12:51 +00:00
bobopinna ba5d423b21 Fixed some regular expressions Bug 5041 2006-06-06 14:30:32 +00:00
tjhunt 7d83bbc2bd Bug #5506: Fix for calculated questions where each one builds on the last. Merged from MOODLE_16_STABLE. 2006-06-06 14:29:05 +00:00
tjhunt 4919564de9 Fix notices from the quiz module on backup and restore. Merged from MOODLE_16_STABLE. 2006-06-06 14:15:48 +00:00
tjhunt 331ca29783 Make cron a bit more rebust by changing the way the require is done. Merged from MOODLE_16_STABLE. 2006-06-06 14:12:04 +00:00
skodak 002ccfc7a0 Bug #5678 - Question marks, single quotes in field name cause trouble - cleaning hack ported from clean_filename(); merged from MOODLE_16_STABLE 2006-06-06 10:17:18 +00:00
tjhunt 9aafe70227 Fix notice. Merged from MOODLE_16_STABLE. 2006-06-06 10:10:43 +00:00
skodak f9e5457f16 Bug #5680 - Fixed duplicate field names; merged from MOODLE_16_STABLE 2006-06-06 09:35:15 +00:00
skodak f0e52f67df Bug #5444 - Import PowerPoint - PHP5 clone bug; merged from MOODLE_16_STABLE 2006-06-06 08:53:54 +00:00
vyshane 0f423e9d64 New admin stats report. This report module makes use of /course/report/stats/.
Merged from 1.6.
2006-06-06 05:31:42 +00:00
vyshane 030605e57a Merge from 1.6. Refactored this report module so that we can use it as an
admin report module.
2006-06-06 04:15:04 +00:00
tjhunt 3e734b607d Bug #5672: Make calculated questions less confusing to create. Merged from MOODLE_16_STABLE. 2006-06-05 16:59:58 +00:00
tjhunt 6d456aa2c1 Fixed reference to incorrect language string. Merged from MOODLE_16_STABLE. 2006-06-05 14:24:13 +00:00
ethem 9a4502dd1d Some cron performance. Run clean-ups and send email daily on settlement date.
an_nextmail config deleted, instead of old config new an_dailysettlement inserted into config_plugins table.
Merged from MOODLE_16_STABLE.
2006-06-05 13:12:28 +00:00
skodak 989a0a5203 Bug #5725 - Assignment grading pop up windows do not close, broken by 4976; merged from MOODLE_16_STABLE 2006-06-05 12:18:13 +00:00
fyang1024 3353b091f6 add learner link when user is a teacher 2006-06-05 10:01:42 +00:00
bobopinna 4023c0aa2d Fixed a typo 2006-06-05 08:21:45 +00:00
bobopinna 7cef1dfd3d Added class name for the IFRAME element 2006-06-05 07:38:46 +00:00
bobopinna b7679957eb Fixed modified names for some constants [Bug 5695] 2006-06-05 07:21:03 +00:00
skodak e369e0c4b4 Bug #5715 - error message in messaging - notice lastaccess; merged from MOODLE_16_STABLE 2006-06-04 23:11:18 +00:00
skodak fce786b146 Bug #5721 - students cannot take quiz when course language set to French; merged from MOODLE_16_STABLE 2006-06-04 23:01:13 +00:00
skodak d971525f28 fixed warning when no students graded yet (caused by useless assignment); merged from MOODLE_16_STABLE 2006-06-04 21:35:26 +00:00
skodak 7e4fe17600 merged last two commints into MOODLE_16_STABLE 2006-06-04 21:11:04 +00:00
skodak 32625a72f4 merged fixes from MOODLE_16_STABLE 2006-06-04 20:57:35 +00:00
stronk7 ee6e91d4af make_default_scale() now searches properly under
both dataroot and dirroot, defaulting to en_utf8. Bug 5719.
(http://moodle.org/bugs/bug.php?op=show&bugid=5719)


Merged from MOODLE_16_STABLE
2006-06-04 15:19:05 +00:00
stronk7 ae57b07c06 report XXXX actions added. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

More or less, merged from MOODLE_16_STABLE
2006-06-04 00:54:34 +00:00
stronk7 2efeb14832 course report xxxx actions now are supported on restore. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

Merged from MOODLE_16_STABLE
2006-06-04 00:03:12 +00:00
skodak f4f0bc84cb Bug #5716 - Impossible to turn off highlighted current topic; merged from MOODLE_16_STABLE 2006-06-03 23:49:15 +00:00
stronk7 b841722573 icourse report xxxx actions must send courseid in the info field. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

Merged from MOODLE_16_STABLE
2006-06-03 20:37:55 +00:00
stronk7 410c459db0 And some more (the last) notices out! Bug 5713.
(http://moodle.org/bugs/bug.php?op=show&bugid=5713)

Merged from MOODLE_16_STABLE
2006-06-03 20:18:02 +00:00
stronk7 5f8556bcd5 And one more collection of innocent notices avoided. Bug 5712.
(http://moodle.org/bugs/bug.php?op=show&bugid=5712)

Merged from MOODLE_16_STABLE
2006-06-03 20:01:24 +00:00
skodak eddb24ed20 clarification for restrict modules option - bug #5688; merged from MOODLE_16_STABLE 2006-06-03 19:58:29 +00:00
stronk7 8812e31233 And another notice in restore out. Bug 5711.
(http://moodle.org/bugs/bug.php?op=show&bugid=5711)

Merged from MOODLE_16_STABLE
2006-06-03 19:51:28 +00:00
stronk7 0f4de002a2 One less notice. Bug 5710.
(http://moodle.org/bugs/bug.php?op=show&bugid=5710)

Merged from MOODLE_16_STABLE
2006-06-03 19:45:19 +00:00
stronk7 c1543b80e9 Avoid one notice in backup. Bug 5709.
(http://moodle.org/bugs/bug.php?op=show&bugid=5709&)

Merged from MOODLE_16_STABLE
2006-06-03 19:01:07 +00:00
stronk7 1fa6d46069 Adding support to the forum user report action
in restore. Bug 3854.
(http://moodle.org/bugs/bug.php?op=show&bugid=3854)

Merged from MOODLE_16_STABLE
2006-06-03 17:51:20 +00:00
skodak 75d9b88f3d merged another try to fix IR from MOODEL_16_STABLE 2006-06-02 17:00:22 +00:00
skodak 08cbf449fe merged typo fix from MOODLE_16_STABLE 2006-06-02 16:55:27 +00:00
skodak 6d7ef1f2c3 merged Martins warning patch from MOODLE_16_STABLE 2006-06-02 16:53:17 +00:00
skodak 115938af04 fixed whitespace and merged whitespace fixes from MOODLE_16_STABLE 2006-06-02 16:46:39 +00:00
skodak 14dfa05958 merged whitespace fix from MOODLE_16_STABLE 2006-06-02 16:42:40 +00:00
skodak a5e7cb78fa Making sure timelimit is converted to integer before being written to database, otherwise postgreSQL complains. Closing bug 5401; merged from MOODLE_15_STABLE 2006-06-02 16:02:10 +00:00
tjhunt 042e68477d Bug #5559: Move CLOZE qtype hightight colours into CSS insted of hardcoding, so themes can override. Merged from 1.6stable. 2006-06-02 15:39:41 +00:00
nfreear b65f13b510 Fix, bug 5614 - added ALT text for link icons (x 5), based on TITLE. Merged from stable branch. 2006-06-02 13:18:49 +00:00
thepurpleblob 7b8bc256cc Merged from STABLE 2006-06-02 09:45:19 +00:00
ethem 3f609b21ff 'Authorize.net Payment Gateway' is better and shorter :) 2006-06-02 09:42:20 +00:00
vyshane 44e852cbea Merged from 1.6. Fixed php warnings when no course is selected. 2006-06-02 07:37:45 +00:00
skodak ee1e1a3b99 fixed warning and removed ugly hack in attachment path; merged from MOODLE_16_STABLE 2006-06-02 06:49:08 +00:00
vyshane f24eb26139 Merged from 1.6. Fix for Bug #5682 - 'Reset template' button in CSS template
adds HTML.
2006-06-02 04:29:11 +00:00
vyshane 0b0b5ea4ed Merge from 1.6. Added missing lang string. 2006-06-02 04:20:05 +00:00
toyomoyo fdcf2c4a07 merged fix for 5686 2006-06-02 02:54:28 +00:00
stronk7 2dbd7916e0 Adding propper support for the forum->user report log action. It was
a bit wrong. Code credits go to Petr!

Merged from MOODLE_16_STABLE
2006-06-01 23:16:08 +00:00
skodak cb77cf1262 fixed problem in restricted modules - mods were accessed using strtolower(translated module name) instead of directory name as usual, it partially worked for English; merged from MOODLE_16_STABLE 2006-06-01 19:52:38 +00:00
skodak 7f9ba24ef2 fixed - unable to disable blocks; merged from MOODLE_16_STABLE 2006-06-01 19:13:52 +00:00
ethem 8da4b779e4 Documentation for status codes and actions. Merged from MOODLE_16_STABLE 2006-06-01 16:08:00 +00:00
skodak 165a7502f8 Bug #5643 - add Yahoo online status to user profile; merged from MOODLE_16_STABLE 2006-06-01 15:19:06 +00:00
skodak 82e6ea72a9 Bug #5684 - frameset page in UTF8 doesn't appear on IE; merged from MOODLE_16_STABLE 2006-06-01 14:50:41 +00:00
tjhunt cd70aa32f2 Bug 5247: stop people creating tests with a close date before the open date. 2006-06-01 14:27:37 +00:00
ethem 095759281b Authorize.net Merchant Payment Gateway
Authorize module is not only credit card gateway but also it has echeck.
Echeck is implemented soon, please AUTHORIZE_ECHECK branch for more details.
2006-06-01 14:13:07 +00:00
thepurpleblob a0d187bfd7 Merged from STABLE 2006-06-01 10:13:57 +00:00
ethem d65af16ffd Just some tidy-ups. Merged from MOODLE_16_STABLE 2006-06-01 08:51:20 +00:00
vyshane 749818fd09 Merged from 1.6. Fix for cvs update -kk -j MOODLE_16_MERGED -j
MOODLE_16_STABLE.
2006-06-01 08:10:34 +00:00
ethem e302f054b3 Just some tidy-ups. Merged from MOODLE_16_STABLE 2006-06-01 07:47:22 +00:00
moquist b40a2b43be Added $return parameters to print_paging_bar() and print_table(). 2006-06-01 05:51:45 +00:00
skodak 1f48cd2892 Bug #5661 - mymoodle redirect problem; merged from MOODLE_16_STABLE 2006-06-01 05:40:45 +00:00
vyshane 65d169680c Merged fix from 1.6 (missing lang string) 2006-06-01 04:08:45 +00:00
vyshane 69c9c3e696 Fix for get_string(), which was not building path to report language files
correctly.
2006-06-01 03:10:17 +00:00
toyomoyo f9631ddb0d merged, bug fix for 5352, setting ignore_user_abort to false 2006-06-01 02:32:07 +00:00
danmarsden 8f3c8cdd84 BUG 5662 - bad check for 1.6 version. 2006-05-31 20:28:18 +00:00
stronk7 9914f09319 Prevent doubleslashes once and again in paths. Also prevent them when writing config.php
Merged from MOODLE_16_STABLE
2006-05-31 17:54:58 +00:00
tjhunt 7baff8aa1a Fix for bug 5379: Item analysis report should not have a hard coded list of question types.
Please test this if you have a moodle install with some unusual question types. Thanks.

Merged from 1.6stable.
2006-05-31 15:58:39 +00:00
tjhunt ce687025b7 Fix some Eclipse code style warnings. 2006-05-31 10:35:17 +00:00
tjhunt 1dd9972889 Check for errors before doing other processing. (Compare this with the add case.) 2006-05-31 10:34:05 +00:00
toyomoyo cc82876291 changepassword obsolete, merged 2006-05-31 07:24:19 +00:00
toyomoyo 6dede909af merged, changepassword obsolete 2006-05-31 07:12:10 +00:00
toyomoyo c26ba25f32 merged, changepassword obsolete 2006-05-31 06:58:51 +00:00
toyomoyo e79771162c merged, changepassword obsolete 2006-05-31 06:42:35 +00:00
toyomoyo c17253f9dc merged change to allow admins to click on the force password change checkbox if using internal_auth 2006-05-31 06:29:13 +00:00
stronk7 ae34cad5fd Users with messages (and messages) are only included in
SITEID backup. Bug 5658.
(http://moodle.org/bugs/bug.php?op=show&bugid=5658)

Merged from MOODLE_16_STABLE
2006-05-30 16:58:50 +00:00
mudrd8mz f20c155a3b * "go to first missing string" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* "go to next/previous missing" links can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* submit button may be repeated (see LANG_SUBMIT_REPEAT*)
* added (empty) "summary" attribute for the <table>'s
* 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 ;-)
* 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.
* added links from "missing" to "compare" mode page
* English strings are now key-sorted in "missing" mode
* list of files with missing strings is now displayed at the top of "missing" page
* A lot of changes to support translation of *_utf8_local langugage packs. Needs testing
* 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-30 16:47:59 +00:00
bobopinna 723fe255b4 Two icons added by Pham Minh Duc 2006-05-30 14:01:51 +00:00
nfreear ef4c53696b Fix bug 5628 (Farsi RTL language), modify '.accesshide' style so top is large negative, not left. Merged from STABLE branch. 2006-05-30 11:24:42 +00:00
skodak 2a0824b4a3 blacklist PHP 5.0.x in installation precheck; merged from MOODLE_16_STABLE 2006-05-30 09:50:23 +00:00
skodak d976b5fecb blacklist PHP 5.0.x in installation precheck; merged from MOODLE_16_STABLE 2006-05-30 09:42:29 +00:00
ethem 8761b0bc4f If config wwwroot starts with 'https', ignore config loginhttps value.
Dependency: Bug #5647; Merged from MOODLE_16_STABLE.
2006-05-30 08:32:43 +00:00
skodak 8af190b388 fixed typo - randomsmatch notice bug 5652; merged from MOODLE_16_STABLE 2006-05-30 06:29:07 +00:00
toyomoyo 3280c9fcc4 merged fix for 5648, utf8 migration problem 2006-05-30 02:51:52 +00:00
martinlanghoff 9aad454299 auth/ldap: better handling of empty values from ldap 2006-05-30 00:44:21 +00:00
stronk7 aca116d84e Bump equivalent to 1.6 2006-05-29 22:50:44 +00:00
skodak 508b76d94f fixed warning from clone($SITE) during site setup; merged from MOODLE_16_STABLE 2006-05-29 20:33:12 +00:00
stronk7 cfba5440c0 Normalize oracle driver name. 2006-05-29 17:42:01 +00:00
stronk7 2d2f440b6e Adding environmental checks for 1.7 (mssql and oracle added) 2006-05-29 17:35:19 +00:00
moodler 19078b653a Merged title fix from stable 2006-05-29 09:55:42 +00:00
moodler ed527b33cc Merged changes from stable 2006-05-29 09:40:38 +00:00
moodler 854c0e06a3 Merged CSS improvements for MyMoodle from stable 2006-05-29 09:27:40 +00:00
moodler d6da4a1aeb merged mymoodle fix from stable 2006-05-29 09:21:36 +00:00
moodler 10312bf9a2 Fixed some issues with course overview report 2006-05-29 09:10:33 +00:00
skodak 8f643c818b Bug #5620 - MyMoodle shows bogus Assignment due date; merged from MOODLE_16_STABLE 2006-05-29 08:37:51 +00:00
moodler 815c84a8dc Merged fix from stable 2006-05-29 08:36:58 +00:00
moodler 80acd6be74 Use global $COURSE in print_header to avoid ugly hack 2006-05-29 08:22:52 +00:00
moodler 1a2ea6f488 Merged $course -> $COURSE fixes from 1.6 stable 2006-05-29 08:17:57 +00:00
moodler 45fc1f759e Make $COURSE a full object for later use 2006-05-29 07:31:22 +00:00
bobopinna 3eabd4cf97 Cleaned some unused include 2006-05-29 07:07:48 +00:00
skodak e7056effbc fixed array warning when editting blocks; merged from MOODLE_16_STABLE 2006-05-29 06:04:13 +00:00
skodak 9b02b5342a global $course fix; merged from MOODLE_16_STABLE 2006-05-29 05:56:28 +00:00
wildgirl f1fc87d045 Updated small MP3 player to handle autoPlay (by Andrew Walker, Alton College) 2006-05-28 20:19:31 +00:00
skodak 9054ba924a sanitize submitted numerical values; merged from MOODLE_16_STABLE 2006-05-26 11:54:11 +00:00
skodak 2042e021be sanitize submitted numerical values; merged from MOODLE_16_STABLE 2006-05-26 11:47:22 +00:00
skodak 24c1be8880 sanitize submitted numerical values; merged from MOODLE_16_STABLE 2006-05-26 11:39:12 +00:00
skodak 27e51dfc89 sanitize submitted numerical values 2006-05-26 11:32:26 +00:00
skodak 3f19bff3cd Bug #5619 - Assignment Feedback mail lacks linefeed; merged from MOODLE_16_STABLE 2006-05-26 09:07:13 +00:00
skodak b56e8cfdfc Bug #4647 - Undefined property in lib/statslib.php; merged from MOODLE_16_STABLE 2006-05-26 09:01:37 +00:00
skodak 97bf7d6271 Bug #5456 - Item Analysis fails to calculate results for random question type; merged from MOODLE_16_STABLE 2006-05-26 06:55:25 +00:00
skodak cebf9a83e9 Bug #5472 - Download quiz grades in Excel format does not show correct foelds; merged from MOODLE_16_STABLE 2006-05-26 06:48:25 +00:00
skodak 4f162918f5 Bug #5612 - language string missing in blog; merged from MOODLE_16_STABLE 2006-05-25 19:24:53 +00:00
nfreear 134759fc36 Ongoing fix, bug 5614 - added ALT text for link icons, based on TITLE. Merged from stable branch. 2006-05-25 16:00:26 +00:00
skodak 4df627dfbf Bug #5582 - sort by numerical field doesn't work properly with decimals; merged from MOODLE_16_STABLE 2006-05-25 15:57:20 +00:00
bobopinna 1a50a1f91e New version with SCORM 2004 sequencing done by Pham Minh Duc 2006-05-25 10:20:45 +00:00
skodak be41c83691 Bug #5416 - sorting by question column in overview report plugin broken - please test; merged from MOODLE_16_STABLE 2006-05-25 10:00:06 +00:00
skodak de5f96195c Bug #5566 - wrong display of student's answers in MATCHING question type; merged from MOODLE_16_STABLE 2006-05-25 08:13:41 +00:00
skodak 043f527471 Bug #4779 - lib/moodlelib.php: typo; merged from MOODLE_16_STABLE 2006-05-25 06:34:33 +00:00
vyshane a389cc82df Merged from fix in 1.6. Made string more general for error message that is
shown when there are no fields defined in the database and we try to add an
entry.
2006-05-25 05:20:59 +00:00
vyshane fafbcc51b5 Merged fix for bug: when a student tries to add an entry and no fields are
defined, the foreach barfs since the value of $fields is false.
2006-05-25 05:19:24 +00:00
toyomoyo addcde11c8 merged changes from renaming reads/writes to statsreads/statswties - mysql5 reserved words 2006-05-25 02:53:00 +00:00
toyomoyo 7dbc6b5891 merged backup-restore/db migrate for rsstitletemplate field 2006-05-25 02:31:15 +00:00
toyomoyo 22a92ee224 merged dropping backticks 2006-05-25 02:07:48 +00:00
skodak 81f9948586 fixed my yet another bug; merged from MOODLE_16_STABLE 2006-05-24 21:54:51 +00:00
skodak 607a6aa83d fixed broken operations in subfolders - result of my recent patching :-( :-( bug #5603; merged from MOODLE_16_STABLE 2006-05-24 21:50:44 +00:00
skodak f2b5a58a0f Bug #5604 - LDAP error notice when users update profile; merged from MOODEL_16_STABLE 2006-05-24 21:12:46 +00:00
skodak 343296bf6a fixed warnings on save profile; merged from MOODLE_16_STABLE 2006-05-24 21:05:23 +00:00
skodak 3e5c847420 Bug #5587 - Redirect fails after a failed login and proper variable initialisation; merged from MOODLE_16_STABLE 2006-05-24 20:56:16 +00:00
skodak 5e205b74dd fixed bug #5562 I hope; merged from MOODLE_16_STABLE 2006-05-24 18:56:33 +00:00
toyomoyo ea6a834533 added rsstitle, merged 2006-05-24 07:03:14 +00:00
toyomoyo 6fe661e879 added rsstitletemplate field 2006-05-24 06:16:10 +00:00
toyomoyo 462458c66b renaming reads and writes to statsreads and statswrites 2006-05-24 05:07:22 +00:00
vyshane 941308d370 Fix for undefined property notice when cron.php is run. 2006-05-24 03:07:37 +00:00
stronk7 cf0403002e Solving one SQL error in data_get_participants()
plus some improved readability.

Merged from MOODLE_16_STABLE
2006-05-23 22:33:01 +00:00
stronk7 e8b8ab9f7b course_modules->deleted and user->guid are now out.
(they disappeared from DB ages ago)

Merged from MOODLE_16_STABLE
2006-05-23 22:06:58 +00:00
skodak fdcd0f0566 fix for printing of multiple group pictures bug #5548; merged from MOODLE_16_STABLE 2006-05-23 19:18:25 +00:00
skodak e0ce2e1ca4 fixed bug #5593 - logged in nested in <p> and <div>; merged from MOODLE_16_STABLE 2006-05-23 18:59:29 +00:00
skodak c65d1af557 fixed file backup and converted other forgotten "assignments"; merged from MOODLE_16_STABLE 2006-05-23 18:38:24 +00:00
skodak 4bb6c2563b fixed broken SQL that was throwing errors in backup; merged from MOODLE_16_STABLE 2006-05-23 18:15:52 +00:00
skodak a632e5dab1 fixed bug 5594 - can not save group details; merged from MOODLE_16_STABLE 2006-05-23 18:00:20 +00:00
skodak 394832e100 fixed warning; merged from MOODLE_16_STABLE 2006-05-23 13:33:44 +00:00
skodak 4b9842d27d fixed incorrect output buffer use - bug #5590; merged from MOODLE_16_STABLE 2006-05-23 10:55:32 +00:00
skodak f6f789936d fixed RSS feeds warning bug #5591; merged from MOODLE_16_STABLE 2006-05-23 10:25:39 +00:00
skodak d33f282a5b make sure variables are properly cleaned; merged from MOODLE_16_STABLE 2006-05-23 09:47:48 +00:00
skodak b01a2fcd0f proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE 2006-05-23 09:32:26 +00:00
skodak 0629da47d2 removed reliance on register globals; merged from MOODLE_16_STABLE 2006-05-23 09:16:17 +00:00
skodak 57f2e16c8d extra cleaning of variables; merged from MOODLE_16_STABLE 2006-05-23 09:02:13 +00:00
stronk7 b6725eba9a Allowing also numbers and underscores in sessioncookie
Merged from MOODLE_16_STABLE
2006-05-22 17:55:38 +00:00
skodak ebb63815f8 fixed register globals issues for $sort SC #256; merged from MOODLE_16_STABLE 2006-05-22 16:54:11 +00:00
tjhunt 5bbca3a4cb Fix for Bug #5588 - Editing a question after sorting leads to an error. Merged from 1.6stable. 2006-05-22 15:43:53 +00:00
skodak 1c871c231f fixed bug #5578 - remove login as button for other teachers in course; merged from MOODLE_16_STABLE 2006-05-22 13:15:06 +00:00
tjhunt 971cd5082a Fix an undefined variable notice. Merged from 1.6stable. 2006-05-22 13:06:36 +00:00
tjhunt 656ee8c6a1 Fix an undefined variable notice. Merged from 1.6stable. 2006-05-22 11:20:51 +00:00
nfreear e99e2d126d Ongoing, fix bug 5400, navbar/breadcrumb TABLE to DIV, to improve semantics. Merged from stable branch. 2006-05-22 10:00:18 +00:00
skodak 631264347b fixed bug #5572 missing PARAM_CLEAN; merged from MOODLE_16_MOODLE 2006-05-22 06:00:51 +00:00
toyomoyo 92998e94bd merged fix for 5551 2006-05-22 02:39:14 +00:00
gbateson 9fd66c6642 fixed typo: clck -> click 2006-05-22 00:22:21 +00:00
gbateson 1e80704a32 modified CVS URLs to start http://moodle.cvs.sourceforge.net 2006-05-22 00:18:41 +00:00
gbateson 6075dd444f Give Up button modified to send results and set status to Abandoned. Microincrement release to 2006052200 (release = v2.1.20) 2006-05-22 00:10:23 +00:00
skodak 2ee2481ef9 fixed register globals issue with $loginasguest; merged from MOODLE_16_STABLE 2006-05-21 20:51:52 +00:00
skodak 70efd5689a fixed redirection to https:// for edit profile and change password when loginhttps on; merged from MOODLE_16_STABLE 2006-05-21 20:35:22 +00:00
skodak d1c8eb14d1 temporary workaround for bug #5534, html editor now disabled for IE when loginhttps on and wwwroot starts with http://; merged from MOODLE_16_STABLE 2006-05-21 20:21:35 +00:00
skodak 108d928b8b removed isset and merged from MOODLE_16_STABLE 2006-05-21 10:14:17 +00:00
skodak 4eff058d5a fixed register globals issue with $text; merged from MOODLE_16_STABLE 2006-05-21 08:09:43 +00:00
skodak 17037270bc proper initialisation of passwordchangeurl; merged from MOODLE_16_STABLE 2006-05-21 07:51:27 +00:00
skodak 54eca8f2a4 proper initialisation of sqlsortkey SC#258; merged from MOODLE_16_STABLE 2006-05-21 07:42:58 +00:00
koenr 902a9198b6 copied from stable 2006-05-20 19:15:11 +00:00
skodak cd7d03fa48 fixed register globals issues in course/search.php; merged from MOODLE_16_STABLE 2006-05-20 18:41:59 +00:00
skodak 9cb14dbd9e proper initialisation of $focus SC#257; merged from MOODLE_16_STABLE 2006-05-20 18:19:27 +00:00
skodak 82f0028119 do not show pending courses button for nonadmins bug #5564; merged from MOODLE_16_STABLE 2006-05-20 18:08:25 +00:00
skodak a38a768b29 fixed cleaning of path in custom scripts SC#221; merged from MOODLE_16_STABLE 2006-05-20 17:23:14 +00:00
stronk7 76046108e9 Ready to new functionalities...;-) 2006-05-20 00:11:30 +00:00
skodak 940e39369a fixed block width calculation; merged from MOODLE_16_STABLE 2006-05-19 21:01:26 +00:00
skodak 9b7bff2699 submission in post.php cleanup, fixes for bugs #5530, #5484 and SC#252; merged from MOODLE_16_STABLE 2006-05-19 20:18:05 +00:00
skodak 4a10c3875b fixed - disabled autologinguest not always respected in require_login() SC#255; merged from MOODLE_16_STABLE 2006-05-19 19:11:30 +00:00
nfreear f08ab5f020 Ongoing, fix bug 5400, DIV to H1, to improve semantics. Merged from MOODLE_16_STABLE. 2006-05-19 13:30:25 +00:00
ethem 4087e6830e Eloy will plan support for enrol systems in backup/restore.
He has a lot of work to do, so this file temporary removed.
After implementation in /backup/restorelib&backuplib.php library, this file can be used again.
But now, this file is not necessary.

Discussion about support for enrol systems in backup/restore is here:

http://moodle.org/bugs/bug.php?op=show&bugid=5358
2006-05-19 12:35:49 +00:00
nfreear 1211e73244 Fix bug 5434 - hardcoded missing Alt text, with a warning comment. Merged from branch MOODLE_16_STABLE. 2006-05-19 10:33:13 +00:00
vyshane 2631c1744e Fix for Bug #5541 2006-05-19 06:25:12 +00:00
mark-nielsen 88427c077b [Merged][BugFix] Bug #5405 - made a new function that grades a lesson for a specific user's attempt. This is then used for grading lessons at the end of a lesson, for ongoing score feature and for updating the grade for essay question grading.
This new grading algorithm now enforces the lesson setting Max attempts when custom scoring is turned Off

Changed the reporting of minquestions setting to match the help file.  Now it is question based instead of attempt based.

Changed the reporting of ongoing score to use the new grade function.
2006-05-19 01:05:13 +00:00
skodak c23ff4d654 deprecated nvl() function similar to optional_variable(); merged from MOODLE_16_STABLE 2006-05-18 22:12:06 +00:00
dwoolhead 58de1815f4 Bug 5536 Replaced references to hide by show. Merged from stable branch. 2006-05-18 16:15:04 +00:00
ethem 5bf94809f0 Removed </td>. Help button appears on top :)) 2006-05-18 10:02:22 +00:00
ethem 527d142c43 I have just found a cute function called print_checkbox. :) 2006-05-18 07:55:12 +00:00
ethem 6b4f18622d Put back tjhunt's changes. Invalid merge. Tabs aren't more important than indexes. 2006-05-18 07:13:43 +00:00
skodak b2fcca2761 fixed bug #5533, could not choose from file root; merged from MOODLE_16_STABLE 2006-05-18 05:48:14 +00:00
martinlanghoff 42101fae2c login: Changing passwords now works when logged in as guest 2006-05-18 00:53:57 +00:00
skodak c0e2f1f7dd admins can now edit user images even when $CFG->disableuserimages = true; see bug #5494 and SC#253; merged from MOODLE_16_STABLE 2006-05-17 18:59:43 +00:00
skodak e0e1cd26fa fixed version number; merged from MOODLE_16_STABLE 2006-05-17 18:16:42 +00:00
skodak 4fb072d942 fixed some warnings and removed ugly hack error_reporting(E_ALL ^ E_NOTICE); that was only hiding warnings in this and other code; merged from MOODLE_16_STABLE 2006-05-17 18:06:33 +00:00
tjhunt 450a0a7db7 Merge from stable branch: Convert tabs to spaces in files where there were only a few rogue tabs. 2006-05-17 16:47:44 +00:00
tjhunt 9bd76b32f3 Merge from 1.6 branch. Fix URL syntax error when slasharguments is off. 2006-05-17 11:40:37 +00:00
tjhunt b1a308bee0 Merge from 1.6 branch. 2006-05-17 11:38:34 +00:00
ethem ddd74daef6 action.php renamed to authorizenetlib.php
Merged from MOODLE_16_STABLE.
2006-05-17 08:18:51 +00:00
martinlanghoff ba838c8d1f moodle16cleanup: mod/quiz correctly sync the constraints and indexes
which was not changed when it was moved from quiz module to question lib
2006-05-17 06:57:03 +00:00
martinlanghoff f470a1c6d5 moodle16cleanup: mod/quiz uniqueid does not exists, taking upgrade script
from mysql.php ver 2005070202. dropping some unused tables during the
transition from quiz to question lib
2006-05-17 06:56:14 +00:00
martinlanghoff 05acf8e974 moodle16cleanup: lib/db correct prefix, patch by Tim Hunt for bug 5515 2006-05-17 06:43:21 +00:00
martinlanghoff 2a0f40e98c mod/choice mod/lesson mod/scorm moodle16cleanup: Added notification
for cleanup that may fail if one is starting fresh from moodle 1.5.3+,
previous cleanup before 1.5.3 is not needed
2006-05-17 06:42:57 +00:00
martinlanghoff dbfc642a87 moodle16cleanup: mod/forum correctly dropping the constraint, so it does
not report an error during upgrade
2006-05-17 06:42:28 +00:00
martinlanghoff ccd218ee4b moodle16cleanup: lib/db correctly put the default values, change the
length of log_display.module which is just 20 chars on postgres7.sql
2006-05-17 06:36:31 +00:00
martinlanghoff aec6df38ac moodle16cleanup: backup/ set the correct column datatype and default value 2006-05-17 06:36:14 +00:00
martinlanghoff 7f8199c253 moodle16cleanup: blocks/rss_client set the correct column default value 2006-05-17 06:35:50 +00:00
martinlanghoff d7d37bcb60 moodle16cleanup: enrol/authorize not null set which is similar to mysql
and that was upgraded on postgres7.php
2006-05-17 06:35:35 +00:00
martinlanghoff 9a2eb087aa moodle16cleanup: mod/hotpot set the correct column datatype and default
value
2006-05-17 06:35:14 +00:00
martinlanghoff 7a3a4cff54 moodle16cleanup: mod/lesson drop unused table lesson_essay, set the
correct column datatype and default value
2006-05-17 06:34:50 +00:00
martinlanghoff f172091567 moodle16cleanup: mod/dialog we need to drop some more dialog module tables 2006-05-17 06:34:19 +00:00
martinlanghoff c89dfcfcf5 moodle16cleanup: mod/scorm version column should not be dropped, it must
exist. it was not upgraded as with mysql.php 2005041600
2006-05-17 06:30:13 +00:00
martinlanghoff 1b58a2f3a0 moodle16cleanup: mod/wiki synch upgrade script and .sql with mysql
counterpart, drop the not null constraint to sync with postgres7.sql
2006-05-17 06:29:45 +00:00
martinlanghoff c4ca8d4596 moodle16cleanup: mod/forum added notification message 2006-05-17 06:29:15 +00:00
martinlanghoff 66c7e47b27 blocklib: cache (and used cached) block instances properly in $pageblocks
Now blocks_have_content() caches instantiated block objects inside $pageblocks
and blocks_print_blocks() uses them if available. This behaviour now matches
the documentation: blocks instances are created only once, get_content()
may be invoked several times.

A better fix would be to cache the _output_ of the block (the ->content
property) but it may bite us if any block is counting on being called twice.

Discussion at: http://moodle.org/mod/forum/discuss.php?d=45867
2006-05-17 04:39:43 +00:00
vyshane 0adf53f6cd Cosmetic fix in print_log_ooo, commented out call to print_log_ooo in
/course/report/log/index.php.
2006-05-17 03:07:11 +00:00
skodak f231e867f0 I hope this is the last patch for header already printed trouble in error() and redirect(); merged from MOODLE_16_STABLE 2006-05-16 20:31:22 +00:00
ethem f9ff6fbd77 confirm_sesskey() implementation for capture,delete,refund and void. I hope it works. :) 2006-05-16 15:34:24 +00:00
ethem 98f6b1eb54 Allow showing error message when insert_record fails.
merged from 16_stable.
2006-05-16 15:02:52 +00:00
nfreear f73e218f40 Merge from STABLE. Fix bug 5477... 2006-05-16 12:27:21 +00:00
ethem e295c6e4c3 Manual capture settings for sending email: cron=enabled, an_review=checked, an_capture_day=0, an_emailexpired=1-5 2006-05-16 11:37:07 +00:00
nfreear 5fc835a533 Merged from STABLE. 2006-05-16 10:59:27 +00:00
ethem 42c4e612db (Manual capture settings: cron=enabled, an_review=checked, an_capture_day=0) 2006-05-16 10:43:02 +00:00
nfreear 49d192fcd6 Merged from STABLE. 2006-05-16 10:35:15 +00:00
thepurpleblob ce4b7b5fbe Added note that export now exports subcategories. 2006-05-16 09:35:03 +00:00
toyomoyo 0376cc2fab merged 2006-05-16 08:22:42 +00:00
toyomoyo 82326fc1d3 merged fix for 5513 2006-05-16 07:58:47 +00:00
vyshane 9b18fc3b83 Commiting merge from 1.6. 2006-05-16 07:07:04 +00:00
vyshane 84bada7dea Fix for Bug #5467. Converted newlines to unix format. Removed extra lines at
the end of php scripts. Converted tabs to spaces in php scripts.
2006-05-16 06:45:14 +00:00
vyshane 04678d8eca Fixed Bug #5354 - Gradebook [DropXLowest and Exclude] 2006-05-16 06:21:49 +00:00
mark-nielsen 74e3524216 [Merged][BugFix] Bug 5485 - problem with regular expressions with simple analysis 2006-05-16 03:06:28 +00:00
stronk7 4a428b5f5c Updated to latest version (1.56). Bug 5165.
(http://moodle.org/bugs/bug.php?op=show&bugid=5165)

Merged from MOODLE_16_STABLE
2006-05-15 23:31:50 +00:00
danmarsden 019c47d6c1 Fixes bug 5464 also makes response clearer to students -see:
http://moodle.org/mod/forum/discuss.php?d=45504

also finishes off Bug 662
2006-05-15 23:24:42 +00:00
mjollnir_ 0c49258b99 mod/quiz/view No-longer display final grade when quiz settings forbid it.
Changed view.php so that it checked if there were any attempts with
concealed grades before printing the student's overall score.
Credit: Peter Bulmer <peter.bulmer@catalyst.net.nz>
Merged from MOODLE_16_STABLE
2006-05-15 21:52:18 +00:00
skodak 2c3432e684 fixed problem when set both loginhttps and https in wwwroot, closes bug #5507 and #3848; merged from MOODLE_16_STABLE 2006-05-15 21:36:46 +00:00
gustav_delius 91d7ead073 Answers to essay questions are now saved correctly when navigating to another page, fixing bug 4478 2006-05-15 20:42:14 +00:00
mark-nielsen a1d0b3eb81 [BugFix] Bug 5505 - function lesson_print_tree now checks for teacher editing priv before printing editing icons. Had to change arguments for this function as well which is the edit in view.php.
lesson.php how checks for teacher editing priv for all actions except for continue.  This is just in case the user hacks the URL.
2006-05-15 19:14:22 +00:00
stronk7 0ec7502bad Avoid [[namesite]] to appear when ADDING site activities.
Merged from MOODLE_16_STABLE

I sent this on May 9th! :-(
2006-05-15 17:54:29 +00:00
stronk7 356183b5bd Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

Merged from MOODLE_16_STABLE

IMPORTANT: I sent this to CVS on May, 8th and changes have dissapear!
           It could be possible than other commits sent near SF crash
           were affected too!
2006-05-15 17:33:38 +00:00
skodak 4ca5b47322 fix my previous incorrect short tag fix, fixed register globals, IP address used as mail user when not logged in; merged from MOODLE_16_STABLE 2006-05-15 15:45:27 +00:00
skodak e7a8d28f57 fixed short php tags; merged from MOODLE_16_STABLE 2006-05-15 15:12:56 +00:00
skodak a536138d02 changed cleaning of entry title, now matches handling of forum post titles; merged from MOODLE_16_STABLE 2006-05-15 15:05:28 +00:00
skodak 3b25960385 better cleaning of post title SC#251 revisited; merged from MOODLE_16_STABLE 2006-05-15 14:48:11 +00:00
skodak 62b504d20b better cleaning of post title SC#251; merged from MOODLE_16_STABLE 2006-05-15 14:32:14 +00:00
exe-cutor 1b8991fd9c Fixed an inconsistent link in the instructions textfield 2006-05-15 12:08:06 +00:00
exe-cutor 14d62a551a Added function get_first_string to better handle multi-valued attributes 2006-05-15 06:55:08 +00:00
vyshane 7ec49125d6 Added language strings for new log functionality (downloading logs as excel or csv) 2006-05-15 05:01:56 +00:00
vyshane 92890025fe Added option to download logs in excel or csv formats. Merged in code contributed by
Daniele Cordella <d.cordella@iss.it>. Originally posted as bug 5024.
2006-05-15 05:01:00 +00:00
toyomoyo 6caa2c52ec merged fix for 5493 2006-05-15 03:00:11 +00:00
toyomoyo 114f81ce09 merged, tidying up constants 2006-05-15 02:57:48 +00:00
toyomoyo b0ef72a6f3 merged fix for 4404 2006-05-15 02:26:54 +00:00
toyomoyo a1e3e9894b merged fix for 5465 2006-05-15 02:03:03 +00:00
skodak 70ed990ed2 fixed secure forms handling when POST url contained GET parameters (cookieless mode and some other forms); merged from MOODLE_16_STABLE 2006-05-14 21:21:35 +00:00
skodak 70cedbfd5d fixed bug #5489 - can not edit file, minor bugfixes and whitespace cleanup; merged from MOODLE_16_STABLE 2006-05-14 19:10:49 +00:00
skodak cc50d6664f I hope final fix for warnings when using error() after print_header() with buffering on, solution was to flush all buffers and reenable SID rewrite when needed; merged from MOODLE_16_STABLE 2006-05-14 17:23:29 +00:00
gustav_delius 38316f63a5 Removing obsolete defaults 2006-05-13 17:06:32 +00:00
gustav_delius 36be25f6e5 Introduce question_attempts table, closing bug 5468
Fixed incorrect check for whether to update state or insert new one in save_question_session()
Deal with manually graded states correctly during regrading
Increase state sequence number during manual grading
Supplied missing userid to quiz_save_best_grade() during manual grading
2006-05-13 16:57:17 +00:00
ethem e81e5c1604 Fix: Redirect to order details page 10 seconds later, not home page. Merged from MOODLE_16_STABLE. 2006-05-13 16:18:38 +00:00
gustav_delius 4377c290c0 Updated comments and made sure teacher preview gets restarted when changes are saved, fixing bug 5478 2006-05-13 10:39:15 +00:00
ethem 6e6c37e2be Language direction is important. Changed as: <b>AVS Result:</b> $a
merged from 16_stable.
2006-05-13 08:53:34 +00:00
thepurpleblob 36e2232e27 Merged from STABLE. 2006-05-13 08:49:46 +00:00
ethem f6a7a35cc9 More readable coding. Now, I understand everything. :)
Merged from MOODLE_16_STABLE.
2006-05-13 08:33:55 +00:00
ethem 8f152c586d Deleting test transactions are not good. They may be in proggress. Let's update WHERE transid<>'0'.
Merged from MOODLE_16_STABLE.
2006-05-13 06:02:06 +00:00
ethem 17dd669149 Fix: Don't show newly created orders prior to 2 minutes.
They may be still in proggress and these aren't test transacions(transid=0).
We check timecreated field to prevent this.
MERGED FROM MOODLE_16_STABLE.
2006-05-12 19:56:02 +00:00
ethem 3335e3f881 Fix: Delete test transactions before update status as AN_STATUS_AUTHCAPTURE.
Merged from MOODLE_16_STABLE.
2006-05-12 18:36:30 +00:00
ethem 431efddc44 Status: 'New' string. 2006-05-12 17:20:39 +00:00
stronk7 297bb00dfe Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

Bump!
2006-05-08 16:40:44 +00:00
stronk7 ef668fcf99 Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

Merged from MOODLE_16_STABLE
2006-05-08 16:39:34 +00:00
thepurpleblob 6cb4910c58 Merged from STABLE 2006-05-08 10:39:14 +00:00
toyomoyo f1f5ec3773 fix for 5438 merged 2006-05-08 07:09:28 +00:00
vyshane 7eaf5045ce Fix for Bug #5441. 2006-05-08 03:56:26 +00:00
vyshane 36914ff6a7 Changed the 'module' field length to 20 in the log_display table (Bug #5419).
Previous commit message in 1.6 stable should read 'log_display table' instead
of 'log' table. Both fixes are identical and carried over to HEAD via a merge.
2006-05-08 03:16:04 +00:00
stronk7 0abbbe296d Initial revision 2006-05-07 23:31:32 +00:00
stronk7 fbaea8f354 glossary print view is now valid XHTML.
Merged from MOODLE_16_STABLE
2006-05-07 10:49:28 +00:00
stronk7 0f5f8363d7 Now, when a single forum is restored and no user data was created,
the initial discussion/post is automatically generated. Bug 5418.
(http://moodle.org/bugs/bug.php?op=show&bugid=5418)

Merged from MOODLE_16_STABLE
2006-05-06 16:58:36 +00:00
ethem 76c16eac35 Admin can setup which credit card types will be accepted.
Merged from MOODLE_16_STABLE.
2006-05-05 18:29:38 +00:00
ethem 4a1e506a35 Admin can setup which credit card types will be accepted.
Merged from MOODLE_16_STABLE.
2006-05-05 18:16:45 +00:00
stronk7 0045d58c69 Now the help link in the admin block points to Docs. Bug 4803.
(http://moodle.org/bugs/bug.php?op=show&bugid=4803)

Merged from MOODLE_16_STABLE
2006-05-05 17:56:56 +00:00
andreabix 3fa299acc6 Minor refinements 2006-05-05 08:56:03 +00:00
vyshane 0aa81bc346 Fix for Bug #5419 - Inconsistency between log_display and log tables. Bumped
version number.
2006-05-05 08:43:00 +00:00
vyshane 7235ae23f1 Fix for Bug #5419 - Inconsistency between log_display and log tables 2006-05-05 08:42:29 +00:00
toyomoyo 78444c8785 merged fix for 4478 2006-05-05 06:44:32 +00:00
toyomoyo 9023bc7f71 merged fix for 5428 2006-05-05 05:15:18 +00:00
thepurpleblob c0724bdce2 Merging from STABLE 2006-05-04 11:17:50 +00:00
stronk7 4bd5bb599c Anything against the ISO-8859-1 word?
Merged from MOODLE_16_STABLE
2006-05-04 10:40:24 +00:00
ethem 5f7a36628f Create transid indexes for backup & restore speed. 2006-05-04 09:42:35 +00:00
toyomoyo e503f30d10 merged fix for 5426 2006-05-04 09:40:33 +00:00
ethem 203003ae8c Enable 'Authorize.net plugin' and setup cron properly; or uncheck an_review again.
Merged from MOODLE_16_STABLE.
2006-05-04 08:18:35 +00:00
ethem 669c58e1a5 First authorize restore library for version 1.7 2006-05-04 07:58:20 +00:00
toyomoyo f009d079ec fix for 3644 merged 2006-05-04 06:56:43 +00:00
vyshane 1db34bf5fb Fix for bug #4805 2006-05-04 04:32:55 +00:00
toyomoyo 11e615412d merged change for the double </a> 2006-05-04 02:32:43 +00:00
stronk7 bdeed966f6 Now more quiz actions are restored properly:
-preview
 -start attempt
 -close attempt
 -continue attempt (too long. See Bug 5419)
Bug 5122
(http://moodle.org/bugs/bug.php?op=show&bugid=5122)
2006-05-03 23:48:28 +00:00
stronk7 543cd3e01d Fixing some non-production values I left after testing.
Thanks James!

Merged from MOODLE_16_STABLE
2006-05-03 22:05:59 +00:00
stronk7 ca3a9e5443 Changing ASCII to ISO-8859-1. Also I've updated Backup FAQ Docs
to show the workaround. Bug 5276.
(http://moodle.org/bugs/bug.php?op=show&bugid=5276)

I'm getting old. Should we send lang files to MOODLE_16_STABLE too?
2006-05-03 19:21:10 +00:00
stronk7 6985c78c6b XHTML validation. Bug 5332.
(http://moodle.org/bugs/bug.php?op=show&bugid=5332)

Merged from MOODLE_16_STABLE
2006-05-03 18:22:21 +00:00
stronk7 02436153e0 Solving some changes in course-view and sections...
Merged from MOODLE_16_STABLE
2006-05-03 17:49:52 +00:00
2838 changed files with 327923 additions and 121442 deletions
-103
View File
@@ -1,103 +0,0 @@
<form name="adminform" id="adminform" method="post" action="admin.php">
<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php
$a->count = count($admins);
$a->items = $strexistingadmins;
print_string('counteditems', '', $a);
?>
</td>
<td></td>
<td valign="top">
<?php
$a->count = $usercount;
$a->items = $strpotentialadmins;
print_string('counteditems', '', $a);
?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.adminform.add.disabled=true;
document.adminform.remove.disabled=false;
document.adminform.addselect.selectedIndex=-1;">
<?php
if (count($admins) == 1) {
$disabled = 'disabled';
$removebuttontype = 'hidden';
} else {
$disabled = '';
$removebuttontype = 'submit';
}
foreach ($admins as $admin) {
$fullname = fullname($admin, true);
echo "<option value=\"$admin->id\" $disabled>".$fullname.", ".$admin->email."</option>\n";
}
?>
</select></td>
<td valign="top">
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="<?php echo $removebuttontype ?>" id="remove" value="&rarr;" />
<br />
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple
onFocus="document.adminform.add.disabled=false;
document.adminform.remove.disabled=true;
document.adminform.removeselect.selectedIndex=-1;">
<?php
if (!empty($searchusers)) {
echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
foreach ($searchusers as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
echo "</optgroup>\n";
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
if (!empty($users)) {
foreach ($users as $user) {
$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 ="document.adminform.add.disabled=true;
document.adminform.remove.disabled=true;
document.adminform.removeselect.selectedIndex=-1;
document.adminform.addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
document.adminform.previoussearch.value=1;
document.adminform.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>
</table>
</form>
-125
View File
@@ -1,125 +0,0 @@
<?PHP // $Id$
// Admin-only script to assign administrative rights to users
require_once('../config.php');
define("MAX_USERS_PER_PAGE", 50);
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$primaryadmin = get_admin();
/// If you want any administrator to have the ability to assign admin
/// rights, then comment out the following if statement
if ($primaryadmin->id != $USER->id) {
error("You must be the primary administrator to use this page.");
}
/// assign all of the configurable language strings
$stringstoload = array (
"assignadmins",
"administration",
"existingadmins",
"potentialadmins",
"search",
"users",
"searchresults",
"showall"
);
foreach ($stringstoload as $stringtoload){
$strstringtoload = "str" . $stringtoload;
$$strstringtoload = get_string($stringtoload);
}
print_header("$site->shortname: $strassignadmins",
"$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> -> $strassignadmins", "adminform.searchtext");
if (!$frm = data_submitted()) {
print_simple_box("<center>".get_string("adminhelpassignadmins")."</center>", "center", "50%");
/// A form was submitted so process the input
} else {
if (!empty($frm->add) and !empty($frm->addselect)) {
foreach ($frm->addselect as $addadmin) {
if (! add_admin($addadmin)) {
error("Could not add admin with user id $addadmin!");
}
}
} else if (!empty($frm->remove) and !empty($frm->removeselect)) {
$admins = get_admins();
if (count($admins) > count($frm->removeselect)) {
foreach ($frm->removeselect as $removeadmin) {
if (! remove_admin($removeadmin)) {
error("Could not remove admin with user id $removeadmin!");
}
}
}
} else if (!empty($frm->showall)) {
unset($frm->searchtext);
$frm->previoussearch = 0;
}
}
/// Is there a current search?
$previoussearch = (!empty($frm->search) or (isset($frm->previoussearch) and $frm->previoussearch == 1)) ;
/// Get all existing admins
$admins = get_admins();
$adminarray = array();
foreach ($admins as $admin) {
$adminarray[] = $admin->id;
}
$adminlist = implode(',', $adminarray);
unset($adminarray);
/// Get search results excluding any current admins
if (!empty($frm->searchtext) and $previoussearch) {
$searchusers = get_users(true, $frm->searchtext, true, $adminlist, 'firstname ASC, lastname ASC',
'', '', 0, 99999, 'id, firstname, lastname, email');
$usercount = get_users(false, '', true, $adminlist);
}
/// If no search results then get potential users excluding current admins
if (empty($searchusers)) {
$usercount = get_users(false, '', true, $adminlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email');
$users = array();
if ($usercount <= MAX_USERS_PER_PAGE) {
if (!$users = get_users(true, '', true, $adminlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email') ) {
$users = array();
}
}
}
$searchtext = (isset($frm->searchtext)) ? $frm->searchtext : "";
$previoussearch = ($previoussearch) ? '1' : '0';
include('./admin.html');
print_footer();
?>
+273 -305
View File
@@ -1,335 +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
*
*/
$auth = optional_param('auth', '', PARAM_SAFEDIR);
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
if (!$site = get_site()) {
redirect("index.php");
}
$action = optional_param('action', '', PARAM_ACTION);
$auth = optional_param('auth', '', PARAM_SAFEDIR);
if (!isadmin()) {
error("Only the admin can use this page");
}
// get currently installed and enabled auth plugins
$authsavailable = get_list_of_plugins('auth');
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
//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);
}
$focus = '';
get_enabled_auth_plugins(true); // fix the list of enabled auths
if (empty($CFG->auth)) {
$authsenabled = array();
} else {
$authsenabled = explode(',', $CFG->auth);
}
/// If data submitted, then process and store.
if (!isset($CFG->registerauth)) {
set_config('registerauth', '');
}
if ($config = data_submitted()) {
if (!isset($CFG->auth_instructions)) {
set_config('auth_instructions', '');
}
$config = (array)$config;
validate_form($config, $err);
if (!empty($auth) and !exists_auth_plugin($auth)) {
error(get_string('pluginnotinstalled', 'auth', $auth), $url);
}
// 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");
}
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";
////////////////////////////////////////////////////////////////////////////////
// process actions
$status = '';
switch ($action) {
case 'save':
if (data_submitted() and confirm_sesskey()) {
// save settings
set_config('guestloginbutton', required_param('guestloginbutton', PARAM_BOOL));
set_config('alternateloginurl', stripslashes(trim(required_param('alternateloginurl', PARAM_RAW))));
set_config('registerauth', required_param('register', PARAM_SAFEDIR));
set_config('auth_instructions', stripslashes(trim(required_param('auth_instructions', PARAM_RAW))));
// enable registerauth in $CFG->auth if needed
if (!empty($CFG->registerauth) and !in_array($CFG->registerauth, $authsenabled)) {
$authsenabled[] = $CFG->registerauth;
set_config('auth', implode(',', $authsenabled));
}
$status = get_string('changessaved');
}
}
break;
/// 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;
case 'disable':
// remove from enabled list
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
set_config('auth', implode(',', $authsenabled));
}
set_config('changepassword','');
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
break;
case 'enable':
// add to enabled list
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
set_config('auth', implode(',', $authsenabled));
}
break;
case 'down':
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
}
// move down the list
if ($key < (count($authsenabled) - 1)) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key + 1];
$authsenabled[$key + 1] = $fsave;
set_config('auth', 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>";
}
$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");
$stradministration = get_string("administration");
$strauthentication = get_string("authentication");
$strauthenticationoptions = get_string("authenticationoptions","auth");
$strsettings = get_string("settings");
$strusers = get_string("users");
print_header("$site->shortname: $strauthenticationoptions", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> -> $strauthenticationoptions", "$focus");
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");
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>";
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>";
// 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;
}
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>";
// settings link
$settings = "<a href=\"auth_config.php?sesskey={$USER->sesskey}&amp;auth=$auth\">{$txt->settings}</a>";
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>";
}
// 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 '<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 '<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 '</table>';
echo '<p align="center"><input type="submit" value="'.get_string('savechanges').'"></p>';
echo '</form>';
echo '</fieldset>';
print_simple_box_end();
print_footer();
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
// if (empty($form->fullname))
// $err["fullname"] = get_string("missingsitename");
return;
}
//
// Good enough for most auth plugins
// but some may want a custom one if they are offering
// 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"} = '';
}
// 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);
}
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"}, "");
}
echo '</td>';
if (!empty($helptext)) {
echo '<td rowspan="' . count($user_fields) . '">' . $helptext . '</td>';
$helptext = '';
}
echo '</tr>';
}
}
////////////////////////////////////////////////////////////////////////////////
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>';
}
}
?>
-132
View File
@@ -1,132 +0,0 @@
<?PHP // $Id$
// backup.php - allows admin to edit all configuration variables for scheduled backups
require_once("../config.php");
require_once("../backup/lib.php");
require_once("../backup/backup_scheduled.php");
require_login();
if (!isadmin()) {
error("Only an admin can use this page");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
//Initialise error variables
$error = false;
$sche_destination_error = "";
/// If data submitted, then process and store.
if (($config = data_submitted()) && confirm_sesskey()) {
//First of all we check that everything is correct
//Check for trailing slash and backslash in backup_sche_destination
if (!empty($backup_sche_destination) and
(substr($backup_sche_destination,-1) == "/" or substr($backup_sche_destination,-1) == "\\")) {
$error = true;
$sche_destination_error = get_string("pathslasherror");
//Now check that backup_sche_destination dir exists
} else if (!empty($backup_sche_destination) and
!is_dir($backup_sche_destination)) {
$error = true;
$sche_destination_error = get_string("pathnotexists");
}
//We need to do some weekdays conversions prior to continue
$i = 0;
$temp = "";
$a_config = (array)$config;
while ($i<7) {
$tocheck = "dayofweek_".$i;
if (isset($a_config[$tocheck])) {
$temp .= "1";
} else {
$temp .= "0";
}
unset($a_config[$tocheck]);
$i++;
}
$a_config['backup_sche_weekdays'] = $temp;
$config = (object)$a_config;
//weekdays conversions done. Continue
foreach ($config as $name => $value) {
backup_set_config($name, $value);
}
//And now, we execute schedule_backup_next_execution() for each course in the server to have the next
//execution time updated automatically everytime it's changed.
$status = true;
//get admin
$admin = get_admin();
if (!$admin) {
$status = false;
}
//get backup config
if (! $backup_config = backup_get_config()) {
$status = false;
}
if ($status) {
//get courses
if ($courses = get_records('course', '', '', '', 'id,shortname')) {
//For each course, we check (insert, update) the backup_course table
//with needed data
foreach ($courses as $course) {
//We check if the course exists in backup_course
$backup_course = get_record("backup_courses","courseid",$course->id);
//If it doesn't exist, create
if (!$backup_course) {
$temp_backup_course->courseid = $course->id;
$newid = insert_record("backup_courses",$temp_backup_course);
//And get it from db
$backup_course = get_record("backup_courses","id",$newid);
}
//Now, calculate next execution of the course
$nextstarttime = schedule_backup_next_execution ($backup_course,$backup_config,time(),$admin->timezone);
//Save it to db
set_field("backup_courses","nextstarttime",$nextstarttime,"courseid",$backup_course->courseid);
}
}
}
if (!$error) {
redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1);
exit;
}
}
/// Otherwise print the form.
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strbackup = get_string("backup");
print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
$strbackup);
echo "<p align=\"right\"><a href=\"../backup/log.php\">".get_string("logs")."</a></p>";
print_heading($strbackup);
print_simple_box("<center>".get_string("adminhelpbackup")."</center>", "center", "50%");
echo "<br />";
print_simple_box_start("center");
//Check for required functions...
if (!function_exists('utf8_encode')) {
notify("You need to add XML support to your PHP installation");
}
include ("$CFG->dirroot/backup/config.html");
print_simple_box_end();
print_footer();
?>
+11 -21
View File
@@ -3,19 +3,13 @@
// block.php - allows admin to edit all local configuration variables for a block
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('manageblocks', $adminroot);
require_once($CFG->libdir.'/blocklib.php');
require_login();
if (!isadmin()) {
error('Only an admin can use this page');
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
$blockid = required_param('block', PARAM_INT);
if(($blockrecord = blocks_get_record($blockid)) === false) {
error('This block does not exist');
}
@@ -53,23 +47,19 @@
/// Otherwise print the form.
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
$strmanageblocks = get_string('manageblocks');
$strblockname = $block->get_title();
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'block/' . $strblockname . '/config';
print_header($site->shortname.': '.$strblockname.": $strconfiguration", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"blocks.php\">$strmanageblocks</a> -> ".$strblockname);
$CFG->pagepath = 'block/' . $block->name() . '/config';
admin_externalpage_print_header($adminroot);
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">';
@@ -80,6 +70,6 @@
echo '</p>';
$block->config_print();
echo '</form>';
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+55 -44
View File
@@ -3,8 +3,13 @@
// Allows the admin to configure blocks (hide/show, delete and configure)
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/ddllib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('manageblocks', $adminroot);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
@@ -12,21 +17,8 @@
$delete = optional_param('delete', 0, PARAM_INT);
$multiple = optional_param('multiple', 0, PARAM_INT);
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strmanageblocks = get_string('manageblocks');
$strdelete = get_string('delete');
$strversion = get_string('version');
@@ -36,10 +28,9 @@
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strmultiple = get_string('blockmultiple', 'admin');
$strshowblockcourse = get_string('showblockcourse');
print_header("$site->shortname: $strmanageblocks", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmanageblocks");
admin_externalpage_print_header($adminroot);
print_heading($strmanageblocks);
@@ -85,34 +76,51 @@
notice_yesno(get_string('blockdeleteconfirm', '', $strblockname),
'blocks.php?delete='.$block->id.'&amp;confirm=1&amp;sesskey='.$USER->sesskey,
'blocks.php');
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
} else {
// Inform block it's about to be deleted
$blockobject = block_instance($block->name);
if ($blockobject) {
$blockobject->before_delete(); //only if we can create instance, block might have been already removed
}
// First delete instances and then block
$instances = get_records('block_instance', 'blockid', $block->id);
if(!empty($instances)) {
foreach($instances as $instance) {
blocks_delete_instance($instance);
blocks_delete_instance($instance, true);
}
}
// Delete block
if (!delete_records('block', 'id', $block->id)) {
notify("Error occurred while deleting the $strblockname record from blocks table");
}
$instances = get_records('block_instance', 'blockid', $block->id);
if(!empty($instances)) {
foreach($instances as $instance) {
blocks_delete_instance($instance);
}
}
// Then the tables themselves
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$block->name;
$prefix2 = $CFG->prefix.'block_'.$block->name;
foreach ($tables as $table) {
if (strpos($table, $prefix) === 0) {
if (!execute_sql("DROP TABLE $table", false)) {
if (strpos($table, $prefix) === 0 || strpos($table, $prefix2) === 0) {
/// If the match has been due to the 1st condition, debug to developers
if (strpos($table, $prefix) === 0) {
debugging('This block has some wrongly named tables. See Moodle Docs coding guidelines (and MDL-6786)', DEBUG_DEVELOPER);
}
/// Strip prefix from $table
$table = preg_replace("/^{$CFG->prefix}/", '', $table);
$xmldb_table = new XMLDBTable($table);
if (!drop_table($xmldb_table, true, false)) {
notify("ERROR: while trying to drop table $table");
}
}
}
}
// Delete the capabilities that were defined by this block
capabilities_cleanup('block/'.$block->name);
$a->block = $strblockname;
$a->directory = $CFG->dirroot.'/blocks/'.$block->name;
@@ -132,7 +140,7 @@
foreach ($blocks as $block) {
if(!block_is_compatible($block->name)) {
notify('Block '. $block->name .' is not compatible with the current version of Mooodle and needs to be updated by a programmer.');
notify('Block '. $block->name .' is not compatible with the current version of Moodle and needs to be updated by a programmer.');
$incompatible[] = $block;
continue;
}
@@ -156,12 +164,9 @@
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/admin/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$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) {
@@ -176,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()) {
@@ -200,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,
@@ -215,15 +227,14 @@
print_heading(get_string('incompatibleblocks', 'admin'));
$table = new flexible_table('admin-blocks-incompatible');
$table->define_columns(array('block', 'delete'));
$table->define_headers(array($strname, $strdelete));
$table->define_baseurl($CFG->wwwroot.'/admin/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('id', 'incompatible');
$table->set_attribute('class', 'generaltable generalbox');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
foreach ($incompatible as $block) {
@@ -235,6 +246,6 @@
$table->print_html();
}
print_footer();
admin_externalpage_print_footer($adminroot);
?>
-68
View File
@@ -1,68 +0,0 @@
<form method="post" action="calendar.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table class="formtable">
<tr>
<th>adminseesall:</th>
<td>
<div><?php print_string('helpadminseesall', 'admin'); ?></div>
<p>
<select name="adminseesallcourses">
<option value="0" <?php if(empty($CFG->calendar_adminseesall)) echo "selected='selected'"; ?>><?php print_string('adminseesownevents', 'admin'); ?></option>
<option value="1" <?php if(!empty($CFG->calendar_adminseesall)) echo "selected='selected'"; ?>><?php print_string('adminseesallevents', 'admin'); ?></option>
</select>
</p>
</td>
</tr>
<tr>
<th>startwday:</th>
<td>
<div><?php print_string('helpstartofweek', 'admin'); ?></div>
<p><?php choose_from_menu($weekdays, 'startwday', empty($CFG->calendar_startwday) ? 0 : $CFG->calendar_startwday, ''); ?></p>
</td>
</tr>
<tr>
<th>weekenddays:</th>
<td>
<div><?php print_string('helpweekenddays', 'admin'); ?></div>
<p>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="1" id="weekend1" <?php if(CALENDAR_WEEKEND & 2) echo 'checked="checked"'; ?> /> <label for="weekend1"><?php print_string('monday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="2" id="weekend2" <?php if(CALENDAR_WEEKEND & 4) echo 'checked="checked"'; ?> /> <label for="weekend2"><?php print_string('tuesday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="3" id="weekend3" <?php if(CALENDAR_WEEKEND & 8) echo 'checked="checked"'; ?> /> <label for="weekend3"><?php print_string('wednesday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="4" id="weekend4" <?php if(CALENDAR_WEEKEND & 16) echo 'checked="checked"'; ?> /> <label for="weekend4"><?php print_string('thursday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="5" id="weekend5" <?php if(CALENDAR_WEEKEND & 32) echo 'checked="checked"'; ?> /> <label for="weekend5"><?php print_string('friday', 'calendar'); ?></label></span>
<br />
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="6" id="weekend6" <?php if(CALENDAR_WEEKEND & 64) echo 'checked="checked"'; ?> /> <label for="weekend6"><?php print_string('saturday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="0" id="weekend0" <?php if(CALENDAR_WEEKEND & 1) echo 'checked="checked"'; ?> /> <label for="weekend0"><?php print_string('sunday', 'calendar'); ?></label></span>
</p>
</td>
</tr>
<tr>
<th>upcoming_lookahead:</th>
<td>
<div><?php print_string('helpupcominglookahead', 'admin'); ?></div>
<p><input type="text" name="lookahead" size="3" value="<?php echo CALENDAR_UPCOMING_DAYS; ?>" /></p>
</td>
</tr>
<tr>
<th>upcoming_maxevents:</th>
<td>
<div><?php print_string('helpupcomingmaxevents', 'admin'); ?></div>
<p><input type="text" name="maxevents" size="3" value="<?php echo CALENDAR_UPCOMING_MAXEVENTS; ?>" /></p>
</td>
</tr>
<tr>
<th>timezones:</th>
<td>
<div><?php print_string('helpforcetimezone', 'admin'); ?></div>
<p><?php choose_from_menu($timezones, 'forcetimezone', $CFG->forcetimezone, get_string('timezonenotforced', 'admin'), '', '99'); ?></p>
<p><a href="timezoneimport.php"><?php print_string('importtimezones', 'admin'); ?>...</a></p>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php print_string('savechanges'); ?>" />
</td>
</tr>
</table>
</form>
-98
View File
@@ -1,98 +0,0 @@
<?PHP // $Id$
// Allows the admin to configure calendar and date/time stuff
require_once('../config.php');
require_login();
if (!isadmin()) {
error('Only administrators can use this page!');
}
if (!$site = get_site()) {
error('Site isn\'t defined!');
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strcalendarsettings = get_string('calendarsettings', 'admin');
print_header("$site->shortname: $strcalendarsettings", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strcalendarsettings");
print_heading($strcalendarsettings);
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if(isset($form->adminseesallcourses)) {
set_config('calendar_adminseesall', intval($form->adminseesallcourses) != 0);
unset($SESSION->cal_courses_shown);
}
if(isset($form->forcetimezone)) {
// To protect from SQL injections ...
$form->timezone = clean_param($form->timezone, PARAM_PATH); //not a path, but it looks like it anyway
set_config('forcetimezone', $form->forcetimezone);
}
if(isset($form->startwday)) {
$startwday = intval($form->startwday);
if($startwday >= 0 && $startwday <= 6) {
set_config('calendar_startwday', $startwday);
}
}
if(isset($form->weekend)) {
if(is_array($form->weekend)) {
// Creating a packed bitfield; look at /calendar/lib.php if you can't figure it out
$bitfield = 0;
foreach($form->weekend as $day) {
$bitfield |= (1 << (intval($day) % 7));
}
if($bitfield > 0) {
set_config('calendar_weekend', $bitfield);
}
}
}
if(isset($form->lookahead)) {
$lookahead = intval($form->lookahead);
if($lookahead > 0) {
set_config('calendar_lookahead', $lookahead);
}
}
if(isset($form->maxevents)) {
$maxevents = intval($form->maxevents);
if($maxevents > 0) {
set_config('calendar_maxevents', $maxevents);
}
}
redirect('index.php');
}
// Include the calendar library AFTER modifying the data, so we read the latest values
require_once($CFG->dirroot.'/calendar/lib.php');
// Populate some variables we 're going to need in calendar.html
$timezones = get_list_of_timezones();
$weekdays = array(
0 => get_string('sunday', 'calendar'),
1 => get_string('monday', 'calendar'),
2 => get_string('tuesday', 'calendar'),
3 => get_string('wednesday', 'calendar'),
4 => get_string('thursday', 'calendar'),
5 => get_string('friday', 'calendar'),
6 => get_string('saturday', 'calendar')
);
// Main display starts here
print_simple_box_start("center", "80%");
include('./calendar.html');
print_simple_box_end();
print_footer();
?>
-187
View File
@@ -1,187 +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();
if (!isadmin()) {
error('Only the admin can use this page');
}
}
/// 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-Z]", "", $value);
}
if ($name == "defaultallowedmodules") {
$value = implode(',',$value);
}
if ($name == 'hiddenuserfields') {
if (in_array('none', $value)) {
$value = '';
} else {
$value = implode(',',$value);
}
}
unset($conf);
$conf->name = $name;
$conf->value = $value;
if ($current = get_record('config', 'name', $name)) {
$conf->id = $current->id;
if (! update_record('config', $conf)) {
notify("Could not update $name to $value");
}
} else {
if (! insert_record('config', $conf)) {
notify("Error: could not add new variable $name !");
}
}
}
redirect('index.php', get_string('changessaved'), 1);
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
if (!$config->locale = get_field('config', 'value', 'name', 'locale')) {
$config->locale = $CFG->lang;
}
}
$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;
}
?>
-56
View File
@@ -1,56 +0,0 @@
<?php // $Id$
require_once('../config.php');
require_login();
if (!isadmin()) {
error('Only admins can access this page');
}
if (!$site = get_site()) {
redirect('index.php');
}
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
print_header("$site->shortname: $stradministration: $strconfiguration", "$site->fullname",
'<a href="index.php">'. "$stradministration</a> -> $strconfiguration");
print_heading($strconfiguration);
$table->align = array ('right', 'left');
$table->data[] = array("<strong><a href=\"config.php\">". get_string('configvariables', 'admin') .'</a></strong>',
get_string('adminhelpconfigvariables'));
$table->data[] = array("<strong><a href=\"site.php\">". get_string('sitesettings') .'</a></strong>',
get_string('adminhelpsitesettings'));
$table->data[] = array("<strong><a href=\"../theme/index.php\">". get_string('themes') .'</a></strong>',
get_string('adminhelpthemes'));
$table->data[] = array("<strong><a href=\"lang.php\">". get_string('language') .'</a></strong>',
get_string('adminhelplanguage'));
$table->data[] = array("<strong><a href=\"modules.php\">".get_string('managemodules'). ' </a></strong>',
get_string('adminhelpmanagemodules'));
$table->data[] = array("<strong><a href=\"blocks.php\">". get_string('manageblocks') .'</a></strong>',
get_string('adminhelpmanageblocks'));
$table->data[] = array("<strong><a href=\"filters.php\">". get_string('managefilters') .'</a></strong>',
get_string('adminhelpmanagefilters'));
if (!isset($CFG->disablescheduledbackups)) {
$table->data[] = array("<strong><a href=\"backup.php\">".get_string("backup")."</a></strong>",
get_string('adminhelpbackup'));
}
$table->data[]= array("<strong><a href=\"editor.php\">". get_string('editorsettings') ."</a></strong>",
get_string('adminhelpeditorsettings'));
$table->data[]= array("<strong><a href=\"calendar.php\">". get_string('calendarsettings', 'admin') ."</a></strong>",
get_string('helpcalendarsettings', 'admin'));
$table->data[]= array("<strong><a href=\"maintenance.php\">". get_string('sitemaintenancemode', 'admin') ."</a></strong>",
get_string('helpsitemaintenance', 'admin'));
print_table($table);
print_footer($site);
?>
-651
View File
@@ -1,651 +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[7] = $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=/pic.jpg";
$options[1] = "file.php/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) );
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="10" 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" />' );
/// 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
$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;
$configvars['stats'] = $stats;
?>
-91
View File
@@ -1,91 +0,0 @@
<form name="creatorsform" id="creatorsform" method="post" action="creators.php">
<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php
$a->count = count($creators);
$a->items = $strexistingcreators;
print_string('counteditems', '', $a);
?>
</td>
<td></td>
<td valign="top">
<?php
$a->count = $usercount;
$a->items = $strpotentialcreators;
print_string('counteditems', '', $a);
?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.creatorsform.add.disabled=true;
document.creatorsform.remove.disabled=false;
document.creatorsform.addselect.selectedIndex=-1;">
<?php
foreach ($creators as $creator) {
$fullname = fullname($creator, true);
echo "<option value=\"$creator->id\">".$fullname.", ".$creator->email."</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
onFocus="document.creatorsform.add.disabled=false;
document.creatorsform.remove.disabled=true;
document.creatorsform.removeselect.selectedIndex=-1;">
<?php
if (!empty($searchusers)) {
echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
foreach ($searchusers as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
echo "</optgroup>\n";
}
if (!empty($users)) {
foreach ($users as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
?>
</select>
<br />
<script type="text/javascript">
function
</script>
<input type="text" name="searchtext" size="30" value="<?php p($searchtext) ?>"
onFocus ="document.creatorsform.add.disabled=true;
document.creatorsform.remove.disabled=true;
document.creatorsform.removeselect.selectedIndex=-1;
document.creatorsform.addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
document.creatorsform.previoussearch.value=1;
document.creatorsform.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>
</table>
</form>
-113
View File
@@ -1,113 +0,0 @@
<?PHP // $Id$
// Admin only script to assign course creator rights to users
require_once('../config.php');
define("MAX_USERS_PER_PAGE", 50);
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$primaryadmin = get_admin();
/// assign all of the configurable language strings
$stringstoload = array (
"assigncreators",
"administration",
"existingcreators",
"potentialcreators",
"search",
"users",
"searchresults",
"showall"
);
foreach ($stringstoload as $stringtoload){
$strstringtoload = "str" . $stringtoload;
$$strstringtoload = get_string($stringtoload);
}
print_header("$site->shortname: $strassigncreators",
"$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> ->
$strassigncreators", "creatorsform.searchtext");
if (!$frm = data_submitted()) {
print_simple_box("<center>".get_string("adminhelpassigncreators")."</center>", "center", "50%");
$frm = new object();
/// A form was submitted so process the input
} else {
if (!empty($frm->add) and !empty($frm->addselect)) {
foreach ($frm->addselect as $addcreator) {
if (! add_creator($addcreator)) {
error("Could not add course creator with user id $addcreator!");
}
}
} else if (!empty($frm->remove) and !empty($frm->removeselect)) {
foreach ($frm->removeselect as $removecreator) {
if (! remove_creator($removecreator)) {
error("Could not remove course creator with user id $removecreator!");
}
}
} else if (!empty($frm->showall)) {
unset($frm->searchtext);
$frm->previoussearch = 0;
}
}
/// Is there a current search?
$previoussearch = (!empty($frm->search) or (isset($frm->previoussearch) && $frm->previoussearch == 1)) ;
/// Get all existing creators
if (! $creators = get_creators()) {
$creators = array();
}
$creatorsarray = array();
foreach ($creators as $creator) {
$creatorsarray[] = $creator->id;
}
$creatorlist = implode(',', $creatorsarray);
unset($creatorarray);
/// Get search results excluding any current admins
if (!empty($frm->searchtext) and $previoussearch) {
$searchusers = get_users(true, $frm->searchtext, true, $creatorlist, 'firstname ASC, lastname ASC',
'', '', 0, 99999, 'id, firstname, lastname, email');
$usercount = get_users(false, '', true, $creatorlist);
}
/// If no search results then get potential users excluding current creators
if (empty($searchusers)) {
if (!$users = get_users(true, '', true, $creatorlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email') ) {
$users = array();
}
$usercount = count($users);
}
$searchtext = (isset($frm->searchtext)) ? $frm->searchtext : "";
$previoussearch = ($previoussearch) ? '1' : '0';
include('./creators.html');
print_footer();
?>
+113 -34
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()
@@ -26,27 +30,61 @@
chdir(dirname($_SERVER['argv'][0]));
}
require_once("../config.php");
require_once($CFG->dirroot.'/lib/adminlib.php');
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir.'/adminlib.php');
if (!$alreadyadmin = isadmin()) {
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, '/');
/// 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 = '';
$USER->theme = '';
course_setup(SITEID);
/// send mime type and encoding
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
$timenow = time();
mtrace("<pre>");
mtrace("Server Time: ".date('r',$timenow)."\n\n");
/// Run all cron jobs for each module
@@ -95,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');
}
@@ -117,10 +169,12 @@
if ($CFG->longtimenosee) { // value in days
$longtime = $timenow - ($CFG->longtimenosee * 3600 * 24);
if ($students = get_users_longtimenosee($longtime)) {
foreach ($students as $student) {
if (unenrol_student($student->userid, $student->course)) {
mtrace("Deleted student enrolment for user $student->userid from course $student->course");
if ($assigns = get_users_longtimenosee($longtime)) {
foreach ($assigns as $assign) {
if ($context = get_context_instance(CONTEXT_COURSE, $assign->courseid)) {
if (role_unassign(0, $assign->id, 0, $context->id)) {
mtrace("Deleted assignment for user $assign->id from course $assign->courseid");
}
}
}
}
@@ -129,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)");
}
}
}
}
@@ -143,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)");
}
}
}
}
@@ -206,11 +264,11 @@
} // End of occasional clean-up tasks
if (!isset($CFG->disablescheduledbackups)) { // Defined in config.php
if (empty($CFG->disablescheduledbackups)) { // Defined in config.php
//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
@@ -262,7 +320,23 @@
unset($enrol);
}
if (!empty($CFG->enablestats)) {
/// 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
$timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today");
@@ -273,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;
@@ -316,4 +390,9 @@
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
/// finishe the IE hack
if (check_browser_version('MSIE')) {
echo "</xmp>";
}
?>
+5 -4
View File
@@ -3,15 +3,16 @@
require_once('../config.php');
// disable moodle specific debug messages that would be breaking the frames
disable_debugging();
$topframe = optional_param('topframe', 0, PARAM_BOOL);
$bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
$do = optional_param('do', '', PARAM_ALPHA);
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$strdatabaseperformance = get_string("databaseperformance");
$stradministration = get_string("administration");
@@ -19,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;
}
+18 -7
View File
@@ -4,25 +4,35 @@
// BE VERY CAREFUL USING THIS!
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('purgemoodledata', $adminroot);
require_login();
$sure = optional_param('sure', 0, PARAM_BOOL);
$reallysure = optional_param('reallysure', 0, PARAM_BOOL);
if (!isadmin()) {
error('You must be admin to use this script!');
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$deletedir = $CFG->dataroot; // The directory to delete!
admin_externalpage_print_header($adminroot);
print_heading('Purge moodledata');
if (empty($sure)) {
notice_yesno ('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', 'delete.php?sure=yes&amp;sesskey='.sesskey(), 'index.php');
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey());
notice_yesno ('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?',
'delete.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
exit;
}
if (empty($reallysure)) {
notice_yesno ('Are you REALLY REALLY completely sure you want to delete everything inside the directory '. $deletedir .' (this includes all user images, and any other course files that have been created) ?', 'delete.php?sure=yes&amp;reallysure=yes&amp;sesskey='.sesskey(), 'index.php');
if (!data_submitted() or empty($reallysure)) {
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey(), 'reallysure'=>'yes');
notice_yesno ('Are you REALLY REALLY completely sure you want to delete everything inside the directory '. $deletedir .' (this includes all user images, and any other course files that have been created) ?',
'delete.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
exit;
}
@@ -36,6 +46,7 @@
echo '<h1 align="center">Done!</h1>';
print_continue($CFG->wwwroot);
admin_externalpage_print_footer($adminroot);
exit;
@@ -66,5 +77,5 @@ function delete_subdirectories($rootdir) {
}
closedir($dir);
}
?>
-331
View File
@@ -1,331 +0,0 @@
<form method="post" action="editor.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="tab" value="<?php p($currentpage) ?>" />
<table border="0" cellpadding="4" cellspacing="2">
<tr>
<td align="right" valign="top">htmleditor:</td>
<td valign="top">
<?php
unset($options);
$options[0] = get_string("allownot");
$options[1] = get_string("allow");
choose_from_menu ($options, "htmleditor", $CFG->htmleditor, "", "", "");
?>
</td>
<td>
<?php print_string('confightmleditor', 'admin') ?>
</td>
</tr>
<?php if ( $currenttab == 'htmlarea' ) { ?>
<tr>
<td align="right" valign="top">editorbackgroundcolor:</td>
<td valign="top"><input type="text" name="backgroundcolor" size="10" value="<?php print($CFG->editorbackgroundcolor);?>" /></td>
<td valign="top"><?php print_string("edhelpbgcolor");?></td>
</tr>
<tr>
<td align="right" valign="top">editorfontfamily:</td>
<td valign="top"><input type="text" name="fontfamily" size="30" value="<?php print($CFG->editorfontfamily);?>" /></td>
<td valign="top"><?php print_string("edhelpfontfamily");?></td>
</tr>
<tr>
<td align="right" valign="top">editorfontsize:</td>
<td valign="top"><input type="text" name="fontsize" size="10" value="<?php print($CFG->editorfontsize);?>" /></td>
<td valign="top"><?php print_string("edhelpfontsize");?></td>
</tr>
<tr>
<td align="right" valign="top">editorkillword:</td>
<td valign="top"><select name="killword">
<option value="1"<?php print(!$CFG->editorkillword)?"":" selected=\"selected\"";?>><?php print_string("yes");?></option>
<option value="0"<?php print(!$CFG->editorkillword)?" selected=\"selected\"":"";?>><?php print_string("no");?></option>
</select></td>
<td valign="top"><?php print_string("edhelpcleanword");?></td>
</tr>
<tr>
<td align="right" valign="top">aspellpath:</td>
<td valign="top"><input onchange="change_state()" id="aspellpath" type="text" name="aspellpath" size="25" value="<?php print($CFG->aspellpath);?>" /></td>
<td valign="top"><?php print_string("edhelpaspellpath");?></td>
</tr>
<tr>
<td align="right" valign="top">editorspelling:</td>
<td valign="top"><select onchange="change_state()" id="spelling" name="spelling"<?php
if (empty($CFG->aspellpath)) {
echo " disabled=\"disabled\"";
$CFG->editorspelling = false;
}
?>>
<option value="1"<?php print(!$CFG->editorspelling)?"":" selected=\"selected\"";?>><?php print_string("yes");?></option>
<option value="0"<?php print(!$CFG->editorspelling)?" selected=\"selected\"":"";?>><?php print_string("no");?></option>
</select>
<select id="dictionary" name="dictionary"<?php
if (empty($CFG->aspellpath)) {
echo " disabled=\"disabled\"";
$CFG->editordictionary = false;
}
?>>
<?php
if (is_array($dicts)) {
foreach ($dicts as $dict) {
echo "<option value=\"$dict\"";
if (!empty($CFG->editordictionary)) {
print ($CFG->editordictionary != $dict) ? "" : " selected=\"selected\"";
}
echo ">$dict</option>\n";
}
} else if (is_string($dicts)) {
echo '<option value="">'. $dicts .'</option>' . "\n";
}
?>
</select>
</td>
<td valign="top"><?php print_string("edhelpenablespelling");?></td>
</tr>
<tr><td colspan="3"><br /><?php print_string("edhelpfontlist");?></td></tr>
<?php
if(is_array($fontlist)) {
foreach($fontlist as $fontkey => $fontvalue) {
?>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input type="text" name="fontname[]" size="15" value="<?php print($fontkey);?>">
<input type="text" name="fontnamevalue[]" size="30" value="<?php print($fontvalue);?>" /></td>
</tr>
<?php
}
}
?>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input type="text" name="fontname[]" size="15" value="" />
<input type="text" name="fontnamevalue[]" size="30" value="" /></td>
</tr>
<tr>
<td valign="top" align="right">editorhidebuttons:</td>
<td colspan="2">
<?php
$buttons = array();
if (!empty($CFG->editorhidebuttons)) {
$buttons = explode(chr(32), $CFG->editorhidebuttons);
}
?>
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td colspan="12"><input type="checkbox" name="buttons[fontname]"<?php print(in_array("fontname", $buttons)) ? " checked=\"checked\"": "";?> /> <?php print_string("fontname","editor");?>
<input type="checkbox" name="buttons[fontsize]"<?php print(in_array("fontsize", $buttons)) ? " checked=\"checked\"": "";?> /> <?php print_string("fontsize","editor");?>
<input type="checkbox" name="buttons[formatblock]"<?php print(in_array("formatblock", $buttons)) ? " checked=\"checked\"": "";?> /> <?php print_string("formatblock","editor");?></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_format_bold.gif" width="18" height="18" alt="<?php print_string("bold","editor");?>" title="<?php print_string("bold","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_format_italic.gif" width="18" height="18" alt="<?php print_string("italic","editor");?>" title="<?php print_string("italic","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_format_underline.gif" width="18" height="18" alt="<?php print_string("underline","editor");?>" title="<?php print_string("underline","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_format_strike.gif" width="18" height="18" alt="<?php print_string("strikethrough","editor");?>" title="<?php print_string("strikethrough","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_format_sub.gif" width="18" height="18" alt="<?php print_string("subscript","editor");?>" title="<?php print_string("subscript","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_format_sup.gif" width="18" height="18" alt="<?php print_string("superscript","editor");?>" title="<?php print_string("superscript","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_copy.gif" width="18" height="18" alt="<?php print_string("copy","editor");?>" title="<?php print_string("copy","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_cut.gif" width="18" height="18" alt="<?php print_string("cut","editor");?>" title="<?php print_string("cut","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_paste.gif" width="18" height="18" alt="<?php print_string("paste","editor");?>" title="<?php print_string("paste","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_wordclean.gif" width="18" height="18" alt="<?php print_string("wordclean","editor");?>" title="<?php print_string("wordclean","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_undo.gif" width="18" height="18" alt="<?php print_string("undo","editor");?>" title="<?php print_string("undo","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_redo.gif" width="18" height="18" alt="<?php print_string("redo","editor");?>" title="<?php print_string("redo","editor");?>" /></td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[bold]"<?php print(in_array("bold", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[italic]"<?php print(in_array("italic", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[underline]"<?php print(in_array("underline", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[strikethrough]"<?php print(in_array("strikethrough", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[subscript]"<?php print(in_array("subscript", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[superscript]"<?php print(in_array("superscript", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[copy]"<?php print(in_array("copy", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[cut]"<?php print(in_array("cut", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[paste]"<?php print(in_array("paste", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[clean]"<?php print(in_array("clean", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[undo]"<?php print(in_array("undo", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[redo]"<?php print(in_array("redo", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_align_left.gif" width="18" height="18" alt="<?php print_string("justifyleft","editor");?>" title="<?php print_string("justifyleft","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_align_center.gif" width="18" height="18" alt="<?php print_string("justifycenter","editor");?>" title="<?php print_string("justifycenter","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_align_right.gif" width="18" height="18" alt="<?php print_string("justifyright","editor");?>" title="<?php print_string("justifyright","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_align_justify.gif" width="18" height="18" alt="<?php print_string("justifyfull","editor");?>" title="<?php print_string("justifyfull","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_left_to_right.gif" width="18" height="18" alt="<?php print_string("lefttoright","editor");?>" title="<?php print_string("lefttoright","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_right_to_left.gif" width="18" height="18" alt="<?php print_string("righttoleft","editor");?>" title="<?php print_string("righttoleft","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_list_num.gif" width="18" height="18" alt="<?php print_string("orderedlist","editor");?>" title="<?php print_string("orderedlist","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_list_bullet.gif" width="18" height="18" alt="<?php print_string("unorderedlist","editor");?>" title="<?php print_string("unorderedlist","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_indent_less.gif" width="18" height="18" alt="<?php print_string("outdent","editor");?>" title="<?php print_string("outdent","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_indent_more.gif" width="18" height="18" alt="<?php print_string("indent","editor");?>" title="<?php print_string("indent","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_color_fg.gif" width="18" height="18" alt="<?php print_string("forecolor","editor");?>" title="<?php print_string("forecolor","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_color_bg.gif" width="18" height="18" alt="<?php print_string("hilitecolor","editor");?>" title="<?php print_string("hilitecolor","editor");?>" /></td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[justifyleft]"<?php print(in_array("justifyleft", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[justifycenter]"<?php print(in_array("justifycenter", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[justifyright]"<?php print(in_array("justifyright", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[justifyfull]"<?php print(in_array("justifyfull", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[lefttoright]"<?php print(in_array("lefttoright", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[righttoleft]"<?php print(in_array("righttoleft", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertorderedlist]"<?php print(in_array("insertorderedlist", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertunorderedlist]"<?php print(in_array("insertunorderedlist", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[outdent]"<?php print(in_array("outdent", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[indent]"<?php print(in_array("indent", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[forecolor]"<?php print(in_array("forecolor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[hilitecolor]"<?php print(in_array("hilitecolor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_hr.gif" width="18" height="18" alt="<?php print_string("horizontalrule","editor");?>" title="<?php print_string("horizontalrule","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_anchor.gif" width="18" height="18" alt="<?php print_string("createanchor","editor");?>" title="<?php print_string("createanchor","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_link.gif" width="18" height="18" alt="<?php print_string("insertlink","editor");?>" title="<?php print_string("insertlink","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_unlink.gif" width="18" height="18" alt="<?php print_string("removelink","editor");?>" title="<?php print_string("removelink","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_image.gif" width="18" height="18" alt="<?php print_string("insertimage","editor");?>" title="<?php print_string("insertimage","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/insert_table.gif" width="18" height="18" alt="<?php print_string("inserttable","editor");?>" title="<?php print_string("inserttable","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/em.icon.smile.gif" width="18" height="18" alt="<?php print_string("insertsmile","editor");?>" title="<?php print_string("insertsmile","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/icon_ins_char.gif" width="18" height="18" alt="<?php print_string("insertchar","editor");?>" title="<?php print_string("insertchar","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/spell-check.gif" width="18" height="18" alt="<?php print_string("spellcheck","editor");?>" title="<?php print_string("spellcheck","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_html.gif" width="18" height="18" alt="<?php print_string("htmlmode","editor");?>" title="<?php print_string("htmlmode","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/fullscreen_maximize.gif" width="18" height="18" alt="<?php print_string("popupeditor","editor");?>" title="<?php print_string("popupeditor","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_replace.gif" width="18" height="18" alt="<?php print_string("popupeditor","editor");?>" title="<?php print_string("searchandreplace","editor");?>" /></td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[inserthorizontalrule]"<?php print(in_array("inserthorizontalrule", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[createanchor]"<?php print(in_array("createanchor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[createlink]"<?php print(in_array("createlink", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[unlink]"<?php print(in_array("unlink", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertimage]"<?php print(in_array("insertimage", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[inserttable]"<?php print(in_array("inserttable", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertsmile]"<?php print(in_array("insertsmile", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertchar]"<?php print(in_array("insertchar", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[spellcheck]"<?php print(in_array("spellcheck", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[htmlmode]"<?php print(in_array("htmlmode", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[popupeditor]"<?php print(in_array("popupeditor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[search_replace]"<?php print(in_array("search_replace", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/ed_nolink.gif" width="18" height="18" alt="<?php print_string("horizontalrule","editor");?>" title="<?php print_string("nolink","editor");?>" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[nolink]"<?php print(in_array("nolink", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<?php
}
else if ( $currenttab == 'tinymce' ) {
?>
<tr>
<td>tinymcetheme:</td>
<td><?php
$options = array('advanced' => 'Advanced','simple' => 'Simple');
choose_from_menu ($options, "tinymcetheme", $CFG->tinymcetheme, "", "", "");
?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top">tinymceplugins:</td>
<td nowrap="nowrap"><?php
$pluginsdir = $CFG->libdir .'/editor/tinymce/jscripts/tiny_mce/plugins';
$plugins = editor_get_tiny_plugins();
$pluginsinuse = explode(",", $CFG->tinymceplugins);
sort($plugins);
$cnt = 0;
echo '<table border="0" cellpadding="2">';
foreach ( $plugins as $plugin ) {
$num = ($cnt % 2);
if ( $num < 1 ) {
echo '<tr>';
}
echo '<td><input type="checkbox" name="tinymceplugins[]" value="'. s($plugin) .'"';
if ( in_array($plugin, $pluginsinuse) ) {
echo ' checked="checked"';
}
echo ' /> '. $plugin .'</td>'."\n";
if ( $num > 0 ) {
echo '</tr>';
}
$cnt++;
}
echo '</table>';
?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>tinymcecontentcss:</td>
<td><input type="text" name="tinymcecontentcss" value="<?php
!empty($CFG->tinymcecontentcss) ? p($CFG->tinymcecontentcss) : ''; ?>" size="40" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>tinymcepopupcss:</td>
<td><input type="text" name="tinymcepopupcss" value="<?php
!empty($CFG->tinymcepopupcss) ? p($CFG->tinymcepopupcss) : ''; ?>" size="40" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>tinymceeditorcss:</td>
<td><input type="text" name="tinymceeditorcss" value="<?php
!empty($CFG->tinymceeditorcss) ? p($CFG->tinymceeditorcss) : ''; ?>" size="40" /></td>
<td>&nbsp;</td>
</tr>
<?php
}
?>
<tr>
<td colspan="3" align="center"><input type="submit" value="<?php print_string("savechanges");?>" /></td>
</tr>
</table>
</form>
<form method="post" action="<?php print($GLOBALS['ME']);?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="tab" value="<?php p($currentpage) ?>" />
<center>
<input type="submit" name="resettodefaults" value="<?php print_string('editorresettodefaults') ?>" />
</center>
</form>
<script language="javascript" type="text/javascript">
<!--
function change_state () {
var choice = document.forms[0].spelling;
var speller = choice.options[choice.selectedIndex].value;
var spellpath = document.forms[0].aspellpath.value;
if (spellpath == '') {
document.forms[0].spelling.disabled = true;
} else {
document.forms[0].spelling.disabled = false;
}
if (speller != 1) {
document.forms[0].dictionary.disabled = true;
} else {
document.forms[0].dictionary.disabled = false;
}
}
document.onload = change_state();
-->
</script>
-306
View File
@@ -1,306 +0,0 @@
<?php // $Id$
/// configuration routines for HTMLArea editor
require_once('../config.php');
$currentpage = optional_param('tab', 1, PARAM_INT);
require_login();
if (!isadmin()) {
error("Only admins can access this page");
}
if (($data = data_submitted()) && confirm_sesskey()) {
// do we want default values?
if (isset($data->resettodefaults)) {
if (!(reset_to_defaults($currentpage))) {
error("Editor settings could not be restored!");
}
} else {
if (!(editor_update_config($data, $currentpage))) {
error("Editor settings could not be updated!");
}
}
redirect("$CFG->wwwroot/$CFG->admin/editor.php?tab=$currentpage", get_string("changessaved"), 1);
} else {
// Generate edit form
$inactive = array();
switch ( $currentpage ) {
case 1:
$currenttab = 'htmlarea';
break;
case 2:
$currenttab = 'tinymce';
break;
default:
error("Unknown currentpage: $currentpage");
}
//$url = 'editor.php?tab=';
//$tabrow = array();
//$tabrow[] = new tabobject('htmlarea',$url . '1', 'HTMLArea');
//$tabrow[] = new tabobject('tinymce',$url . '2', 'TinyMCE');
//$tabs = array($tabrow);
$fontlist = editor_convert_to_array($CFG->editorfontlist);
$dicts = editor_get_dictionaries();
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$streditorsettings = get_string("editorsettings");
$streditorsettingshelp = get_string("adminhelpeditorsettings");
print_header("Editor settings","Editor settings",
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $streditorsettings");
print_heading($streditorsettings);
print_simple_box("<center>$streditorsettingshelp</center>","center","50%");
print("<br />\n");
//print_tabs($tabs, $currenttab, $inactive);
print_simple_box_start("center");
include("editor.html");
print_simple_box_end();
print_footer();
}
/// FUNCTIONS
function editor_convert_to_array ($string) {
/// Converts $CFG->editorfontlist to array
if (empty($string) || !is_string($string)) {
return false;
}
$fonts = array();
$lines = explode(";", $string);
foreach ($lines as $line) {
if (!empty($line)) {
list($fontkey, $fontvalue) = explode(":", $line);
$fonts[$fontkey] = $fontvalue;
}
}
return $fonts;
}
function editor_update_config ($data, $editor) {
/// Updates the editor config values.
if (!is_object($data)) {
return false;
}
switch($editor) {
case 1: // HTMLArea.
// Make array for unwanted characters.
$nochars = array(chr(33),chr(34),chr(35),chr(36),chr(37),
chr(38),chr(39),chr(40),chr(41),chr(42),
chr(43),chr(46),chr(47),chr(58),chr(59),
chr(60),chr(61),chr(62),chr(63),chr(64),
chr(91),chr(92),chr(93),chr(94),chr(95),
chr(96),chr(123),chr(124),chr(125),chr(126));
$fontlist = '';
// make font string
$cnt = count($data->fontname);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($data->fontname[$i])) {
$fontlist .= str_replace($nochars, "", $data->fontname[$i]) .":";
$fontlist .= str_replace($nochars, "", $data->fontnamevalue[$i]) .";";
}
}
// strip last semicolon
$fontlist = substr($fontlist, 0, strlen($fontlist) - 1);
// make array of values to update
$updatedata = array();
$updatedata['htmleditor'] = !empty($data->htmleditor) ? $data->htmleditor : 0;
$updatedata['editorbackgroundcolor'] = !empty($data->backgroundcolor) ? $data->backgroundcolor : "#ffffff";
$updatedata['editorfontfamily'] = !empty($data->fontfamily) ? str_replace($nochars,"",$data->fontfamily) : "Times New Roman, Times";
$updatedata['editorfontsize'] = !empty($data->fontsize) ? $data->fontsize : "";
$updatedata['editorkillword'] = !empty($data->killword) ? $data->killword : 0;
$updatedata['editorspelling'] = !empty($data->spelling) ? $data->spelling : 0;
$updatedata['editorfontlist'] = $fontlist;
$updatedata['editordictionary'] = !empty($data->dictionary) ? $data->dictionary : '';
$updatedata['aspellpath'] = !empty($data->aspellpath) ? $data->aspellpath : '';
$hidebuttons = '';
if (!empty($data->buttons) && is_array($data->buttons)) {
foreach ($data->buttons as $key => $value) {
$hidebuttons .= $key . " ";
}
}
$updatedata['editorhidebuttons'] = trim($hidebuttons);
break;
case 2: // TinyMCE.
$updatedata = array();
$updatedata['htmleditor'] = !empty($data->htmleditor) ? $data->htmleditor : 0;
// Process plugins
if ( !empty($data->tinymceplugins) ) {
foreach ( $data->tinymceplugins as $key => $value ) {
$value = stripslashes(clean_param($value, PARAM_ALPHA));
$data->tinymceplugins[$key] = addslashes($value);
}
}
$updatedata['tinymceplugins'] = !empty($data->tinymceplugins) ? implode(",", $data->tinymceplugins) : '';
$updatedata['tinymcetheme'] = !empty($data->tinymcetheme) ?
clean_param($data->tinymcetheme, PARAM_ALPHA) : '';
$updatedata['tinymcecontentcss'] = !empty($data->tinymcecontentcss) ?
clean_param($data->tinymcecontentcss, PARAM_URL) : '';
$updatedata['tinymcepopupcss'] = !empty($data->tinymcepopupcss) ?
clean_param($data->tinymcepopupcss, PARAM_URL) : '';
$updatedata['tinymceeditorcss'] = !empty($data->tinymceeditorcss) ?
clean_param($data->tinymceeditorcss, PARAM_URL) : '';
break;
}
foreach ($updatedata as $name => $value) {
if (!(set_config($name, $value))) {
return false;
}
}
return true;
}
function reset_to_defaults ($editor) {
/// Reset the values to default
global $CFG;
include_once($CFG->dirroot .'/lib/defaults.php');
$updatedata = array();
switch ( $editor ) {
case 1: // HTMLArea.
$updatedata['editorbackgroundcolor'] = $defaults['editorbackgroundcolor'];
$updatedata['editorfontfamily'] = $defaults['editorfontfamily'];
$updatedata['editorfontsize'] = $defaults['editorfontsize'];
$updatedata['editorkillword'] = $defaults['editorkillword'];
$updatedata['editorspelling'] = $defaults['editorspelling'];
$updatedata['editorfontlist'] = $defaults['editorfontlist'];
$updatedata['editorhidebuttons'] = $defaults['editorhidebuttons'];
$updatedata['editordictionary'] = '';
break;
case 2: // TinyMCE.
$updatedata['tinymceplugins'] = $defaults['tinymceplugins'];
$updatedata['tinymcetheme'] = $defaults['tinymcetheme'];
$updatedata['tinymcecontentcss'] = $defaults['tinymcecontentcss'];
$updatedata['tinymcepopupcss'] = $defaults['tinymcepopupcss'];
$updatedata['tinymceeditorcss'] = $defaults['tinymceeditorcss'];
break;
}
foreach ($updatedata as $name => $value) {
if (!(set_config($name, $value))) {
return false;
}
}
return true;
}
function editor_get_dictionaries () {
/// Get all installed dictionaries in the system
global $CFG;
error_reporting(E_ALL); // for debug, final version shouldn't have this...
clearstatcache();
$strerror = '';
// If aspellpath isn't set don't even bother ;-)
if (empty($CFG->aspellpath)) {
return $strerror = 'Empty aspell path!';
}
// Do we have access to popen function?
if (!function_exists('popen')) {
return $strerror = "Popen function disabled!";
exit;
}
global $CFG;
$cmd = $CFG->aspellpath;
$output = '';
$dictionaries = array();
$dicts = array();
if(!($handle = @popen(escapeshellarg($cmd) .' dump dicts', 'r'))) {
return $strerror = "Couldn't create handle!";
exit;
}
while(!feof($handle)) {
$output .= fread($handle, 1024);
}
@pclose($handle);
$dictionaries = explode(chr(10), $output);
// Get rid of possible empty values
if (is_array($dictionaries)) {
$cnt = count($dictionaries);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($dictionaries[$i])) {
$dicts[] = $dictionaries[$i];
}
}
}
if (count($dicts) >= 1) {
return $dicts;
}
$strerror = "Error! Check your aspell installation!";
return $strerror;
}
function editor_get_tiny_plugins() {
global $CFG;
$plugins = array();
$plugindir = $CFG->libdir .'/editor/tinymce/jscripts/tiny_mce/plugins';
if ( !$fp = opendir($plugindir) ) {
return $plugins;
exit;
}
while ( ($file = readdir($fp)) !== false ) {
if ( preg_match("/^\.+/", $file) ) {
continue;
}
if ( is_dir($plugindir .'/'. $file) ) {
array_push($plugins, $file);
}
}
if ( $fp ) {
closedir($fp);
}
return $plugins;
}
?>
+17 -21
View File
@@ -3,29 +3,24 @@
// Yes, enrol is correct English spelling.
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$enrol = optional_param('enrol', $CFG->enrol, PARAM_SAFEDIR);
$CFG->pagepath = 'enrol';
require_login();
if (!$site = get_site()) {
redirect("index.php");
}
$adminroot = admin_get_root();
admin_externalpage_setup('enrolment', $adminroot);
if (!isadmin()) {
error("Only the admin can use this page");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
/// Save settings
if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if (empty($frm->enable)) {
$frm->enable = array();
}
@@ -39,16 +34,14 @@
$frm->enable = array_merge(array('manual'), $frm->enable); // make sure manual plugin is called first
set_config('enrol_plugins_enabled', implode(',', $frm->enable));
set_config('enrol', $frm->default);
redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
redirect("enrol.php", get_string("changessaved"), 1);
}
/// Print the form
$str = get_strings(array('enrolmentplugins', 'users', 'administration', 'settings', 'edit'));
print_header("$site->shortname: $str->enrolmentplugins", "$site->fullname",
"<a href=\"index.php\">$str->administration</a> ->
<a href=\"users.php\">$str->users</a> -> $str->enrolmentplugins");
admin_externalpage_print_header($adminroot);
$modules = get_list_of_plugins("enrol");
$options = array();
@@ -59,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);
@@ -70,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
@@ -80,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') {
@@ -97,15 +92,16 @@
$default = '';
}
$table->data[$name] = array($name, $enable, $default,
'<a href="enrol_config.php?sesskey='.$USER->sesskey.'&amp;enrol='.$module.'">'.$str->edit.'</a>');
'<a href="enrol_config.php?enrol='.$module.'">'.$str->edit.'</a>');
}
asort($table->data);
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>";
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+19 -35
View File
@@ -3,23 +3,14 @@
// Yes, enrol is correct English spelling.
require_once("../config.php");
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('enrolment', $adminroot);
$enrol = required_param('enrol', PARAM_ALPHA);
$CFG->pagepath = 'enrol/' . $enrol;
require_login();
if (!$site = get_site()) {
redirect("index.php");
}
if (!isadmin()) {
error("Only the admin can use this page");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
@@ -28,6 +19,9 @@
/// If data submitted, then process and store.
if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if ($enrolment->process_config($frm)) {
redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
}
@@ -40,6 +34,7 @@
/// get language strings
$str = get_strings(array('enrolmentplugins', 'configuration', 'users', 'administration'));
unset($options);
$modules = get_list_of_plugins("enrol");
foreach ($modules as $module) {
@@ -47,25 +42,14 @@
}
asort($options);
print_header("$site->shortname: $str->enrolmentplugins", "$site->fullname",
"<a href=\"index.php\">$str->administration</a> ->
<a href=\"users.php\">$str->users</a> ->
<a href=\"enrol.php?sesskey=$USER->sesskey\">$str->enrolmentplugins</a> ->
$str->configuration");
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>";
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."\" />";
/// Choose an enrolment method
echo get_string('chooseenrolmethod').': ';
choose_from_menu ($options, "enrol", $enrol, "",
"document.location='enrol_config.php?sesskey=$USER->sesskey&enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", "");
echo "</b></p></div>";
/// Print current enrolment type description
/// Print current enrolment type description
print_simple_box_start("center", "80%");
print_heading($options[$enrol]);
@@ -74,15 +58,15 @@
print_simple_box_end();
echo "<hr />";
$enrolment->config_form($frm);
echo "<center><p><input type=\"submit\" value=\"".get_string("savechanges")."\"></p></center>\n";
echo "<p class=\"centerpara\"><input type=\"submit\" value=\"".get_string("savechanges")."\" /></p>\n";
print_simple_box_end();
echo "</div>";
echo "</form>";
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
?>
+12 -24
View File
@@ -30,24 +30,17 @@
// from moodle.org be able to check more and more versions.
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/environmentlib.php');
require_once($CFG->libdir.'/componentlib.class.php');
$adminroot = admin_get_root();
admin_externalpage_setup('environment', $adminroot);
/// Parameters
$action = optional_param('action', '', PARAM_ACTION);
$version = optional_param('version', '', PARAM_FILE); //
/// Security checks
require_login();
if (!isadmin()) {
error('You need to be admin to use this page');
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Get some strings
$stradmin = get_string('administration');
@@ -57,10 +50,10 @@
$strmoodleversion = get_string('moodleversion');
$strupdate = get_string('updatecomponent', 'admin');
$strupwards = get_string('upwards', 'admin');
$strmisc = get_string('miscellaneous');
/// Print the header stuff
print_header("$SITE->shortname: $strenvironment", $SITE->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".$strenvironment);
admin_externalpage_print_header($adminroot);
/// Print the component download link
echo '<div class="reportlink"><a href="environment.php?action=updatecomponent&amp;sesskey='.$USER->sesskey.'">'.$strupdate.'</a></div>';
@@ -98,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;
@@ -128,22 +121,17 @@
}
/// 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();
/// Gather and show results
$status = check_moodle_environment($version, $environment_results);
/// Other links
echo '<div align="center">';
print_single_button('phpinfo.php', NULL, get_string('phpinfo'));
echo '</div>';
/// Print footer
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+85
View File
@@ -34,4 +34,89 @@
</PHP_EXTENSION>
</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>
<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_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>
+13 -23
View File
@@ -3,16 +3,11 @@
// Edit text filter settings
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// check for allowed access
require_login();
if (!isadmin()) {
error( 'Only administrators can use the filters administration page' );
}
if (!$site = get_site()) {
error( 'Site is not defined in filters administration page' );
}
$adminroot = admin_get_root();
admin_externalpage_setup('managefilters', $adminroot);
// get parameters
$param = new Object;
@@ -26,7 +21,7 @@
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'filter/' . $filtername . '/config';
// get translated strings for use on page
$txt = new Object;
$txt->managefilters = get_string( 'managefilters' );
@@ -64,45 +59,40 @@
// 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;
}
//==============================
// Display logic
//==============================
$filtername = ucfirst($filtername);
print_header( "$site->shortname: $txt->managefilters", "$site->fullname",
"<a href=\"index.php\">$txt->administration</a> -> <a href=\"configure.php\">$txt->configuration</a> " .
"-> <a href=\"filters.php\">$txt->managefilters</a> -> $filtername" );
admin_externalpage_print_header($adminroot);
print_heading( $filtername );
print_heading( $txt->managefilters );
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();
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+15 -67
View File
@@ -3,20 +3,14 @@
// Edit list of available text filters
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// defines
define('FILTER_TABLE','filter_administration_table');
// check for allowed access
require_login();
if (!isadmin()) {
error('Only administrators can use the filters administration page');
}
if (!$site = get_site()) {
error('Site is not defined in filters administration page');
}
$adminroot = admin_get_root();
admin_externalpage_setup('managefilters', $adminroot);
// get values from page
$params = new object();
@@ -189,9 +183,9 @@
$table = new flexible_table(FILTER_TABLE);
$table->define_columns(array('name', 'hideshow', 'order', 'settings'));
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
$table->define_baseurl("$CFG->wwwroot/admin/filters.php");
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'flexible generaltable generalbox');
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
$table->set_attribute('id', 'filters');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// iterate through filters adding to display table
@@ -202,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=\"$img/hide.gif\" 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=\"$img/show.gif\" 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>";
}
@@ -218,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;
}
@@ -269,61 +263,15 @@
// Display logic
//==============================
print_header("$site->shortname: $txt->managefilters", "$site->fullname",
"<a href=\"index.php\">$txt->administration</a> -> <a href=\"configure.php\">$txt->configuration</a> " .
"-> $txt->managefilters");
admin_externalpage_print_header($adminroot);
print_heading_with_help($txt->managefilters, 'filters');
// print the table of all the filters
$table->print_html();
// print the table for the cache controls
print_heading($txt->cachecontrols);
print_simple_box_start('center');
?>
// cache control table has been removed
<form name="options" id="options" method="post" action="<?php echo $url; ?>" >
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<input type="hidden" name="action" value="config" />
<table cellpadding="20">
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->cachetext; ?></td>
<td><?php choose_from_menu($options, "cachetext", $CFG->cachetext, "", "", ""); ?></td>
<td><?php echo $txt->configcachetext; ?></td>
</tr>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filteruploadedfiles; ?></td>
<td><?php choose_from_menu(array($txt->none,$txt->allfiles,$txt->htmlfilesonly),
"filteruploadedfiles", $CFG->filteruploadedfiles,"","",""); ?></td>
<td><?php echo $txt->configfilteruploadedfiles; ?></td>
</tr>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filtermatchoneperpage; ?></td>
<td><?php choose_from_menu(array($txt->no,$txt->yes), "filtermatchoneperpage", $CFG->filtermatchoneperpage,"","",""); ?></td>
<td><?php echo $txt->configfiltermatchoneperpage; ?></td>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filtermatchonepertext; ?></td>
<td><?php choose_from_menu(array($txt->no,$txt->yes), "filtermatchonepertext", $CFG->filtermatchonepertext,"","",""); ?></td>
<td><?php echo $txt->configfiltermatchonepertext; ?></td>
</tr>
</tr>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filterall; ?></td>
<td><?php choose_from_menu(array($txt->no,$txt->yes), "filterall", $CFG->filterall,"","",""); ?></td>
<td><?php echo $txt->configfilterall; ?></td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
<td><input type="submit" value="<?php print_string('savechanges'); ?>" /></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
<?php
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+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);
+63 -42
View File
@@ -1,26 +1,34 @@
<?php // $Id$
ob_start(); //for whitespace test
require_once('../config.php');
// extra whitespace test - intentionally breaks cookieless mode
$extraws = '';
while (true) {
$extraws .= ob_get_contents();
if (!@ob_end_clean()) {
break;
}
}
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('healthcenter', $adminroot);
define('SEVERITY_NOTICE', 'notice');
define('SEVERITY_ANNOYANCE', 'annoyance');
define('SEVERITY_SIGNIFICANT', 'significant');
define('SEVERITY_CRITICAL', 'critical');
$resetsesserrorcounter = optional_param('resetsesserrorcounter', 0, PARAM_BOOL);
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
require_login();
if (!isadmin()) {
error('Only the admin can use this page');
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$site = get_site();
$stradmin = get_string('administration');
$strhealthcenter = get_string('healthcenter');
print_header($site->shortname.': '.$strhealthcenter, $site->fullname,
'<a href="index.php">'.$stradmin.'</a> -> '.$strhealthcenter);
admin_externalpage_print_header($adminroot);
echo <<<STYLES
<style type="text/css">
@@ -92,7 +100,7 @@ STYLES;
}
print_footer();
admin_externalpage_print_footer($adminroot);
function health_find_problems() {
@@ -216,18 +224,13 @@ class problem_000001 extends problem_base {
class problem_000002 extends problem_base {
function title() {
return 'Extra characters at the end of config.php';
return 'Extra characters at the end of config.php or other library function';
}
function exists() {
// [pj] When the requirements are raised to PHP 4.3.0 this will be file_get_contents()
if($fp = @fopen('../config.php', 'r')) {
$contents = fread($fp, 16384); // 16K should be enough
$ending = substr($contents, -2);
unset($contents);
if($ending == '?>') {
return false;
}
fclose($fp);
global $extraws;
if($extraws === '') {
return false;
}
return true;
}
@@ -235,11 +238,11 @@ class problem_000002 extends problem_base {
return SEVERITY_SIGNIFICANT;
}
function description() {
return 'Your Moodle configuration file, config.php, contains some characters after the closing PHP tag (?>). This could cause Moodle to exhibit several kinds of problems and should be fixed.';
return 'Your Moodle configuration file config.php or another library file, contains some characters after the closing PHP tag (?>). This causes Moodle to exhibit several kinds of problems (such as broken downloaded files) and must be fixed.';
}
function solution() {
global $CFG;
return 'You need to edit <strong>'.$CFG->dirroot.'/config.php</strong> and remove all characters (including spaces and returns) after the ending ?> tag. These two characters should be the very last in that file.';
return 'You need to edit <strong>'.$CFG->dirroot.'/config.php</strong> and remove all characters (including spaces and returns) after the ending ?> tag. These two characters should be the very last in that file. The extra trailing whitespace may be also present in other PHP files that are included from lib/setup.php.';
}
}
@@ -350,24 +353,41 @@ class problem_000008 extends problem_base {
return 'PHP: memory_limit cannot be controlled by Moodle';
}
function exists() {
$memlimit = @ini_get('memory_limit');
if(empty($memlimit)) {
$oldmemlimit = @ini_get('memory_limit');
if(empty($oldmemlimit)) {
// PHP not compiled with memory limits, this means that it's
// probably limited to 8M so we have a problem...
return true;
// probably limited to 8M or in case of Windows not at all.
// We can ignore it for now - there is not much to test anyway
// TODO: add manual test that fills memory??
return false;
}
// Otherwise, raise_memory_limit in setup.php will do the trick
$oldmemlimit = get_real_size($oldmemlimit);
//now lets change the memory limit to something unique below 128M==134217728
@ini_set('memory_limit', 134217720);
$testmemlimit = get_real_size(@ini_get('memory_limit'));
//verify the change had any effect at all
if ($oldmemlimit == $testmemlimit) {
//memory limit can not be changed - is it big enough then?
if ($oldmemlimit < get_real_size('128M')) {
return true;
} else {
return false;
}
}
@ini_set('memory_limit', $oldmemlimit);
return false;
}
function severity() {
return SEVERITY_ANNOYANCE;
return SEVERITY_NOTICE;
}
function description() {
return 'The settings for PHP on your server do not allow a script to request more memory during its execution. This means that most likely there is a hard limit of 8MB for each script. It is possible that certain operations within Moodle will require more than this amount in order to complete successfully, especially if there are lots of data to be processed. Therefore, it is recommended that you contact your server administrator to address this issue.';
return 'The settings for PHP on your server do not allow a script to request more memory during its execution. '.
'This means that there is a hard limit of '.@ini_get('memory_limit').' for each script. '.
'It is possible that certain operations within Moodle will require more than this amount in order '.
'to complete successfully, especially if there are lots of data to be processed.';
}
function solution() {
global $CFG;
return 'We need a good solution here. Enabling memory limit control means recompiling PHP... maybe this should be SEVERITY_NOTICE instead of SEVERITY_ANNOYANCE?';
return 'It is recommended that you contact your web server administrator to address this issue.';
}
}
@@ -398,7 +418,7 @@ class problem_000010 extends problem_base {
}
function exists() {
if (!$this->is_enabled()) {
return true;
return true;
}
if ($this->status() < 1) {
return true;
@@ -408,7 +428,7 @@ class problem_000010 extends problem_base {
function severity() {
if ($this->is_enabled() and $this->status() == 0) {
return SEVERITY_SIGNIFICANT;
} else {
} else {
return SEVERITY_ANNOYANCE;
}
}
@@ -416,12 +436,12 @@ class problem_000010 extends problem_base {
global $CFG;
$desc = 'Slasharguments are needed for relative linking in uploaded resources:<ul>';
if (!$this->is_enabled()) {
$desc .= '<li>slasharguments are <strong>disabled</strong> in Moodle configuration</li>';
$desc .= '<li>slasharguments are <strong>disabled</strong> in Moodle configuration</li>';
} else {
$desc .= '<li>slasharguments are enabled in Moodle configuration</li>';
$desc .= '<li>slasharguments are enabled in Moodle configuration</li>';
}
if ($this->status() == -1) {
$desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a></li>';
$desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a> manually</li>';
} else if ($this->status() == 0) {
$desc .= '<li>slashargument test <strong>failed</strong>, please check server configuration</li>';
} else {
@@ -449,9 +469,9 @@ class problem_000010 extends problem_base {
$solution .= 'Congratulations - everything seems OK now :-D';
}
if ($status < 1) {
$solution .= '<p>IIS:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li><li>do NOT enable AllowPathInfoForScriptMappings !!!</li><li>slasharguments may not work when using ISAPI and PHP 4.3.10 and older</li></ul></p>';
$solution .= '<p>Apache 1:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
$solution .= '<p>Apache 2:<ul><li>you must add <code>AcceptPathInfo on</code> to php.ini or .htaccess</li><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
$solution .= '<p>IIS:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li><li>do NOT enable AllowPathInfoForScriptMappings !!!</li><li>slasharguments may not work when using ISAPI and PHP 4.3.10 and older</li></ul></p>';
$solution .= '<p>Apache 1:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
$solution .= '<p>Apache 2:<ul><li>you must add <code>AcceptPathInfo on</code> to php.ini or .htaccess</li><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
}
return $solution;
}
@@ -462,13 +482,13 @@ class problem_000010 extends problem_base {
function status() {
global $CFG;
$handle = @fopen($CFG->wwwroot.'/file.php?file=/testslasharguments', "r");
$contents = trim(@fread($handle, 7));
$contents = @trim(fread($handle, 10));
@fclose($handle);
if ($contents != 'test -1') {
return -1;
}
$handle = @fopen($CFG->wwwroot.'/file.php/testslasharguments', "r");
$contents = trim(@fread($handle, 6));
$contents = trim(@fread($handle, 10));
@fclose($handle);
switch ($contents) {
case 'test 1': return 1;
@@ -499,7 +519,7 @@ class problem_000011 extends problem_base {
}
function solution() {
global $CFG;
if (!empty($resetsesserrorcounter)) {
if (optional_param('resetsesserrorcounter', 0, PARAM_BOOL)) {
if (get_field('config', 'name', 'name', 'session_error_counter')) {
delete_records('config', 'name', 'session_error_counter');
}
@@ -535,6 +555,7 @@ class problem_00000x extends problem_base {
TODO:
session.save_path -- it doesn't really matter because we are already IN a session, right?
detect unsupported characters in $CFG->wwwroot - see bug Bug #6091 - relative vs absolute path during backup/restore process
*/
+367 -228
View File
@@ -5,25 +5,47 @@
header('Location: ../install.php');
die;
}
require_once('../config.php');
include_once($CFG->dirroot.'/lib/adminlib.php'); // Contains various admin-only functions
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$agreelicence = optional_param('agreelicence',0, PARAM_BOOL);
/// Check that PHP is of a sufficient version
if (!check_php_version("4.1.0")) { //TODO: should we bump it up to 4.3.0??
/// Moved here because older versions do not allow while(@ob_end_clean());
if (version_compare(phpversion(), "4.3.0") < 0) {
$phpversion = phpversion();
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $phpversion)");
echo "Sorry, Moodle requires PHP 4.3.0 or later (currently using version $phpversion)";
die;
}
/// Turn off time limits and try to flush everything all the time, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_clean()); // ob_end_flush prevents sending of headers
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
$autopilot = optional_param('autopilot', 0, PARAM_BOOL);
$ignoreupgradewarning = optional_param('ignoreupgradewarning', 0, PARAM_BOOL);
/// check upgrade status first
if ($ignoreupgradewarning and !empty($_SESSION['upgraderunning'])) {
$_SESSION['upgraderunning'] = 0;
}
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 = "please read the <a href=\"../doc/?frame=install.html&amp;sub=webserver\">install documentation</a>";
$documentationlink = '<a href="http://docs.moodle.org/en/Installation">Installation docs</a>';
if (ini_get_bool('session.auto_start')) {
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
@@ -37,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
@@ -68,12 +97,13 @@
$CFG->version = "";
}
/// Turn off time limits and try to flush everything all the time, sometimes upgrades can be slow.
if (is_readable("$CFG->dirroot/version.php")) {
include_once("$CFG->dirroot/version.php"); # defines $version
}
@set_time_limit(0);
@ob_implicit_flush(true);
@ob_end_flush();
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.
@@ -84,7 +114,7 @@
$maintables = true;
$mtables = array("config", "course", "course_categories", "course_modules",
"course_sections", "log", "log_display", "modules",
"user", "user_admins", "user_students", "user_teachers");
"user");
foreach ($mtables as $mtable) {
if (!in_array($CFG->prefix.$mtable, $tables)) {
$maintables = false;
@@ -92,38 +122,110 @@
}
}
}
if (! $maintables) {
if (empty($agreelicence)) {
$strlicense = get_string("license");
/// hide errors from headers in case debug enabled in config.php
$origdebug = $CFG->debug;
$CFG->debug = DEBUG_MINIMAL;
error_reporting($CFG->debug);
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, "", "", false, "&nbsp;", "&nbsp;");
if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = true;
if (modify_database("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = false;
notify($strdatabasesuccess, "green");
} else {
$db->debug = false;
error("Error: Main databases NOT set up successfully");
}
} else {
error("Error: Your database ($CFG->dbtype) is not yet fully supported by Moodle. See the lib/db directory.");
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
"", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
/// return to original debugging level
$CFG->debug = $origdebug;
error_reporting($CFG->debug);
upgrade_log_start();
$db->debug = true;
/// 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');
}
print_continue("index.php");
$status = false;
if (file_exists("$CFG->libdir/db/install.xml")) {
$status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
} else if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
$status = modify_database("$CFG->libdir/db/$CFG->dbtype.sql"); //Old method
} else {
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();
$adminroot->prune('backups'); // backup settings table not created yet
apply_default_settings($adminroot);
/// This is used to handle any settings that must exist in $CFG but which do not exist in
/// admin_get_root()/$ADMIN as admin_setting objects (there are some exceptions).
apply_default_exception_settings(array('alternateloginurl' => '',
'auth' => 'email',
'auth_pop3mailbox' => 'INBOX',
'changepassword' => '',
'enrol' => 'manual',
'enrol_plugins_enabled' => 'manual',
'guestloginbutton' => 1,
'registerauth' => 'email',
'style' => 'default',
'template' => 'default',
'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;
}
@@ -131,133 +233,257 @@
/// Check version of Moodle code on disk compared with database
/// and upgrade if possible.
include_once("$CFG->dirroot/version.php"); # defines $version
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines upgrades
if (file_exists("$CFG->dirroot/lib/db/$CFG->dbtype.php")) {
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines old upgrades
}
if (file_exists("$CFG->dirroot/lib/db/upgrade.php")) {
include_once("$CFG->dirroot/lib/db/upgrade.php"); # defines new upgrades
}
$stradministration = get_string("administration");
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);
// hide errors from headers in case debug is enabled
$origdebug = $CFG->debug;
$CFG->debug = DEBUG_MINIMAL;
error_reporting($CFG->debug);
// logout in case we are upgrading from pre 1.7 version - prevention of weird session problems
if ($CFG->version < 2006050600) {
require_logout();
}
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,
"", "", 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;
if (main_upgrade($CFG->version)) {
$db->debug=false;
/// Launch the old main upgrade (if exists)
$status = true;
if (function_exists('main_upgrade')) {
$status = main_upgrade($CFG->version);
}
/// If succesful and exists launch the new main upgrade (XMLDB), called xmldb_main_upgrade
if ($status && function_exists('xmldb_main_upgrade')) {
$status = xmldb_main_upgrade($CFG->version);
}
$db->debug=false;
/// 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);
} else if (!update_capabilities()) {
error('Had trouble upgrading the core capabilities for the Roles System');
}
require_once($CFG->libdir.'/statslib.php');
if (!stats_upgrade_for_roles_wrapper()) {
notify('Couldn\'t upgrade the stats tables to use the new roles system');
}
if (set_config("version", $version)) {
remove_dir($CFG->dataroot . '/cache', true); // flush cache
notify($strdatabasesuccess, "green");
print_continue("index.php");
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 {
$db->debug=false;
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();
}
} else if ($version < $CFG->version) {
upgrade_log_start();
notify("WARNING!!! The code you are using is OLDER than the version that made these databases!");
upgrade_log_finish();
}
} else {
$strcurrentversion = get_string("currentversion");
print_header($strcurrentversion, $stradministration, $strcurrentversion,
"", "", false, "&nbsp;", "&nbsp;");
if (!set_config("version", $version)) {
$db->debug=true;
if (main_upgrade(0)) {
print_continue("index.php");
} else {
error("A problem occurred inserting current version into databases");
}
$db->debug=false;
error("A problem occurred inserting current version into databases");
}
}
/// 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!!");
}
notice(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'index.php');
exit;
}
/// Insert default values for any important configuration variables
include_once("$CFG->dirroot/lib/defaults.php");
foreach ($defaults as $name => $value) {
if (!isset($CFG->$name)) {
$CFG->$name = $value;
set_config($name, $value);
$configchange = true;
error("ERROR: Could not update release version in database!!");
}
}
/// Send $CFG->unicodedb to DB to have it available for next requests
set_config('unicodedb', $CFG->unicodedb);
/// 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
/// If any new configurations were found then send to the config page to check
if (!empty($configchange)) {
redirect("config.php");
}
/// 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
/// Check all questiontype plugins and upgrade if necessary
// It is important that this is done AFTER the quiz module has been upgraded
/// first old *.php update and then the new upgrade.php script
/// It is important that this is done AFTER the quiz module has been upgraded
upgrade_plugins('qtype', 'question/type', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Upgrade backup/restore system if necessary
/// first old *.php update and then the new upgrade.php script
require_once("$CFG->dirroot/backup/lib.php");
upgrade_backup_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Upgrade blocks system if necessary
/// first old *.php update and then the new upgrade.php script
require_once("$CFG->dirroot/lib/blocklib.php");
upgrade_blocks_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all blocks and load (or upgrade them if necessary)
/// first old *.php update and then the new upgrade.php script
upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all enrolment plugins and upgrade if necessary
/// 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
/// Set up the overall site name etc.
/// 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()) {
redirect("site.php");
// We are about to create the site "course"
require_once($CFG->libdir.'/blocklib.php');
$newsite = new Object();
$newsite->fullname = "";
$newsite->shortname = "";
$newsite->summary = "";
$newsite->newsitems = 3;
$newsite->numsections = 0;
$newsite->category = 0;
$newsite->format = 'site'; // Only for this course
$newsite->teacher = get_string("defaultcourseteacher");
$newsite->teachers = get_string("defaultcourseteachers");
$newsite->student = get_string("defaultcoursestudent");
$newsite->students = get_string("defaultcoursestudents");
$newsite->timemodified = time();
if ($newid = insert_record('course', $newsite)) {
// Site created, add blocks for it
$page = page_create_object(PAGE_COURSE_VIEW, $newid);
blocks_repopulate_page($page); // Return value not checked because you can always edit later
$cat = new Object();
$cat->name = get_string('miscellaneous');
if (insert_record('course_categories', $cat)) {
redirect('index.php');
} else {
error("Serious Error! Could not set up a default course category!");
}
} else {
error("Serious Error! Could not set up the site!");
}
}
// initialise default blocks on admin and site page if needed
if (empty($CFG->adminblocks_initialised)) {
require_once("$CFG->dirroot/$CFG->admin/pagelib.php");
require_once($CFG->libdir.'/blocklib.php');
page_map_class(PAGE_ADMIN, 'page_admin');
$page = page_create_object(PAGE_ADMIN, 0); // there must be some id number
blocks_repopulate_page($page);
//add admin_tree block to site if not already present
if ($admintree = get_record('block', 'name', 'admin_tree')) {
$page = page_create_object(PAGE_COURSE_VIEW, SITEID);
blocks_execute_action($page, blocks_get_by_page($page), 'add', (int)$admintree->id, false, false);
if ($admintreeinstance = get_record('block_instance', 'pagetype', $page->type, 'pageid', SITEID, 'blockid', $admintree->id)) {
blocks_execute_action($page, blocks_get_by_page($page), 'moveleft', $admintreeinstance, false, false);
}
}
set_config('adminblocks_initialised', 1);
}
/// 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.
@@ -269,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();
@@ -278,16 +505,22 @@
}
}
/// Set up the admin user
if (! record_exists("user_admins")) { // No admin user yet
redirect("user.php");
if (empty($CFG->rolesactive)) {
create_admin_user();
}
/// Check for valid admin user
require_login();
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/site:config', $context);
/// check that site is properly customized
if (empty($site->shortname) or empty($site->shortname)) {
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
@@ -298,185 +531,91 @@
}
}
/// At this point everything is set up and the user is an admin, so print menu
/// Everything should now be set up, and the user is an admin
$stradministration = get_string("administration");
print_header("$site->shortname: $stradministration","$site->fullname", "$stradministration");
print_simple_box_start('center', '100%', '', 20);
print_heading($stradministration);
/// Print default admin page with notifications.
$adminroot = admin_get_root();
admin_externalpage_setup('adminnotifications', $adminroot);
admin_externalpage_print_header($adminroot);
/// 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');
}
if (!empty($CFG->upgrade)) { // Print notice about extra upgrading that needs to be done
print_simple_box(get_string("upgrade$CFG->upgrade", "admin",
"$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"), "center", '60%');
print_spacer(10,10);
/// Check for any special upgrades that might need to be run
if (!empty($CFG->upgrade)) {
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_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
}
/// If no recently cron run
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
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 if we are currently in maintenance mode
if (empty($CFG->unicodedb)) {
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
/// You can set the "registered" variable to something far in the future
/// if you really want to prevent this. eg 9999999999
if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_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;
}
$table->tablealign = "center";
$table->align = array ("right", "left");
$table->wrap = array ("nowrap", "nowrap");
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '40%';
$configdata = '<div class="adminlink"><a href="config.php">'.get_string('configvariables', 'admin').
'</a> - <span class="explanation">'.get_string('adminhelpconfigvariables').'</span></div>';
$configdata .= '<div class="adminlink"><a href="site.php">'.get_string('sitesettings').
'</a> - <span class="explanation">'.get_string('adminhelpsitesettings').'</span></div>';
$configdata .= '<div class="adminlink"><a href="../theme/index.php">'.get_string('themes').
'</a> - <span class="explanation">'.get_string('adminhelpthemes').'</span></div>';
$configdata .= '<div class="adminlink"><a href="lang.php">'.get_string('language').
'</a> - <span class="explanation">'.get_string('adminhelplanguage').'</span></div>';
$configdata .= '<div class="adminlink"><a href="modules.php">'.get_string('managemodules').
'</a> - <span class="explanation">'.get_string('adminhelpmanagemodules').'</span></div>';
$configdata .= '<div class="adminlink"><a href="blocks.php">'.get_string('manageblocks').
'</a> - <span class="explanation">'.get_string('adminhelpmanageblocks').'</span></div>';
$configdata .= '<div class="adminlink"><a href="filters.php">'.get_string('managefilters').
'</a> - <span class="explanation">'.get_string('adminhelpmanagefilters').'</span></div>';
if (!isset($CFG->disablescheduledbackups)) {
$configdata .= '<div class="adminlink"><a href="backup.php">'.get_string('backup').
'</a> - <span class="explanation">'.get_string('adminhelpbackup').'</span></div>';
}
$configdata .= '<div class="adminlink"><a href="editor.php">'.get_string('editorsettings').
'</a> - <span class="explanation">'.get_string('adminhelpeditorsettings').'</span></div>';
$configdata .= '<div class="adminlink"><a href="calendar.php">'.get_string('calendarsettings', 'admin').
'</a> - <span class="explanation">'.get_string('helpcalendarsettings', 'admin').'</span></div>';
$configdata .= '<div class="adminlink"><a href="maintenance.php">'.get_string('sitemaintenancemode', 'admin').
'</a> - <span class="explanation">'.get_string('helpsitemaintenance', 'admin').'</span></div>';
$table->data[] = array('<strong><a href="configure.php">'.get_string('configuration').'</a></strong>', $configdata);
$userdata = '<div class="adminlink"><a href="auth.php?sesskey='.$USER->sesskey.'">'.get_string("authentication").
'</a> - <span class="explanation">'.get_string('adminhelpauthentication').'</span></div>';
$userdata .= '<div class="adminlink"><a href="user.php">'.get_string('edituser').
'</a> - <span class="explanation">'.get_string('adminhelpedituser').'</span></div>';
$userdata .= '<div class="adminlink"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/user.php?newuser=true&amp;sesskey='.$USER->sesskey.'">'.
get_string('addnewuser').'</a> - <span class="explanation">'.get_string('adminhelpaddnewuser').'</span></div>';
$userdata .= '<div class="adminlink"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/uploaduser.php?sesskey='.$USER->sesskey.'">'.
get_string('uploadusers').'</a> - <span class="explanation">'.get_string('adminhelpuploadusers').'</span></div>';
$userdata .= '<hr /><div class="adminlink"><a href="enrol.php?sesskey='.$USER->sesskey.'">'.get_string('enrolmentplugins').
'</a> - <span class="explanation">'.get_string('adminhelpenrolments').'</span></div>';
$userdata .= '<div class="adminlink"><a href="../course/index.php?edit=off&amp;sesskey='.$USER->sesskey.'">'.
get_string('assignstudents').'</a> - <span class="explanation">'.get_string('adminhelpassignstudents').'</span></div>';
$userdata .= '<div class="adminlink"><a href="../course/index.php?edit=on&amp;sesskey='.$USER->sesskey.'">'.
get_string('assignteachers').'</a> - <span class="explanation">'.get_string('adminhelpassignteachers').
' <img src="../pix/t/user.gif" height="11" width="11" alt="" /></span></div>';
$userdata .= '<div class="adminlink"><a href="creators.php?sesskey='.$USER->sesskey.'">'.get_string('assigncreators').
'</a> - <span class="explanation">'.get_string('adminhelpassigncreators').'</span></div>';
$userdata .= '<div class="adminlink"><a href="admin.php?sesskey='.$USER->sesskey.'">'.get_string('assignadmins').
'</a> - <span class="explanation">'.get_string('adminhelpassignadmins').'</span></div>';
$table->data[] = array('<strong><a href="users.php">'.get_string('users').'</a></strong>', $userdata);
$table->data[] = array('<strong><a href="../course/index.php?edit=on&amp;sesskey='.$USER->sesskey.'">'.get_string('courses').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpcourses').'</div>');
$table->data[] = array('<strong><a href="../files/index.php?id='.$site->id.'">'.get_string('sitefiles').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpsitefiles').'</div>');
$table->data[] = array('<strong><a href="stickyblocks.php">'.get_string('stickyblocks','admin').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpstickyblocks').'</div>');
$table->data[] = array('<strong><a href="report.php">'.get_string('reports').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpreports').'</div>');
$table->data[] = array('<strong><a href="environment.php">'.get_string('environment','admin').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpenvironment').'</div>');
/// Optional stuff
if (file_exists("$CFG->dirroot/$CFG->admin/$CFG->dbtype")) {
$table->data[] = array("<strong><a href=\"$CFG->dbtype/frame.php\">".get_string('managedatabase').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpmanagedatabase').'</div>');
}
/// Hooks for Matt Oquists contrib code for repositories and portfolio.
/// The eventual official versions may not look like this
if (isset($CFG->portfolio) && file_exists("$CFG->dirroot/$CFG->portfolio")) {
$table->data[] = array("<strong><a href=\"../portfolio/\">".get_string('portfolio','portfolio').'</a></
trong>',
'<div class="explanation">'.get_string('adminhelpportfolio','portfolio').'</div>');
}
if (isset($CFG->repo) && file_exists("$CFG->dirroot/$CFG->repo")) {
$table->data[] = array("<strong><a href=\"../repository/?repoid=1&action=list\">".get_string('repository','
epository').'</a></strong>',
'<div class="explanation">'.get_string('adminhelprepository','repository').'</div>');
}
print_table($table);
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO REMOVE OR MODIFY THE COPYRIGHT NOTICE BELOW ////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/en/Release">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
'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');
//////////////////////////////////////////////////////////////////////////////////////////////////
echo '<div align="center">';
$options = array();
$options['sesskey'] = $USER->sesskey;
print_single_button('register.php', $options, get_string('registration'));
echo '</div>';
print_simple_box_end();
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_simple_box_start('center','60%');
require_once($CFG->dirroot.'/admin/utfdbmigrate.php');
db_migrate2utf8();
print_simple_box_end();
if (empty($registrationbuttonshown)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_single_button('register.php', $options, get_string('registration'));
}
print_footer($site);
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_box_start();
require_once($CFG->dirroot.'/'.$CFG->admin.'/utfdbmigrate.php');
db_migrate2utf8();
print_box_end();
}
admin_externalpage_print_footer($adminroot);
?>
+21 -10
View File
@@ -1,32 +1,43 @@
<?php
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('toinodb', $adminroot);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
require_login();
if (!isadmin()) {
error('Admin only');
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
admin_externalpage_print_header($adminroot);
print_heading('Convert all MySQL tables from MYISAM to InnoDB');
if ($CFG->dbfamily != 'mysql') {
notice('This function is for MySQL databases only!', 'index.php');
}
print_header("Convert all tables from MYISAM to InnoDB", "Convert all tables from MYISAM to InnoDB",
"Convert all tables from MYISAM to InnoDB");
if (data_submitted() and $confirm and confirm_sesskey()) {
if ($confirm and confirm_sesskey()) {
print_heading("Please be patient and wait for this to complete...");
notify('Please be patient and wait for this to complete...', 'notifysuccess');
if ($tables = $db->MetaTables()) {
$db->debug = true;
foreach ($tables as $table) {
execute_sql("ALTER TABLE $table TYPE=INNODB; ");
}
$db->debug = false;
}
notify('... done.', 'notifysuccess');
print_continue('index.php');
admin_externalpage_print_footer($adminroot);
} else {
notice_yesno("Are you sure you want convert all your tables to the InnoDB format?",
"innodb.php?confirm=1&sesskey=".sesskey(), "index.php");
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
notice_yesno('Are you sure you want convert all your tables to the InnoDB format?',
'innodb.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
}
?>
+515 -178
View File
@@ -1,43 +1,73 @@
<?PHP // $Id$
/**
* Display the admin/language menu and process strings translation.
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('langedit', $adminroot);
define('LANG_SUBMIT_REPEAT', 1); // repeat displaying submit button?
define('LANG_SUBMIT_REPEAT_EVERY', 20); // if so, after how many lines?
define('LANG_DISPLAY_MISSING_LINKS', 1); // display "go to first/next missing string" links?
define('LANG_DEFAULT_FILE', ''); // default file to translate. Empty allowed
define('LANG_LINK_MISSING_STRINGS', 1); // create links from "missing" page to "compare" page?
define('LANG_DEFAULT_USELOCAL', 0); // should *_utf8_local be used by default?
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', 'moodle.php', PARAM_FILE);
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
$uselocal = optional_param('uselocal', -1, PARAM_INT);
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
if (! $site = get_site()) {
error("Site not defined!");
if ($uselocal == -1) {
if (isset($SESSION->langtranslateintolocal)) {
$uselocal = $SESSION->langtranslateintolocal;
} else {
$uselocal = LANG_DEFAULT_USELOCAL;
}
} else {
$SESSION->langtranslateintolocal = $uselocal;
}
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strcurrentlanguage = get_string("currentlanguage");
$strmissingstrings = get_string("missingstrings");
$streditstrings = get_string("editstrings", 'admin');
$stredithelpdocs = get_string("edithelpdocs", 'admin');
$strthislanguage = get_string("thislanguage");
$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('filecreated', 'admin');
$strprev = get_string('previous');
$strnext = get_string('next');
$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;
@@ -46,46 +76,32 @@
break;
}
$currentlang = current_language();
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $navigation",
'', '', true, $button);
admin_externalpage_print_header($adminroot);
if (!$mode) {
print_simple_box_start('center','80%');
echo '<table align="center" width="100%"><tr><td width="50%" align="center">';
print_string('managelang','admin');
echo '</td><td align="center" width="50%">';
print_string('editlang','admin');
echo '</td></tr><tr><td>';
print_string('lang16notify','admin');
echo '<p /><a href="langimport.php">'.get_string('langimport','admin').'</a>';
echo '</td><td>';
print_box_start();
$currlang = current_language();
$langs = get_list_of_languages();
echo "<table align=\"center\"><tr><td align=\"right\">";
echo "<b>$strcurrentlanguage:</b>";
echo "</td><td>";
echo popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
echo '</td></tr><tr><td colspan="2">';
$options["lang"] = $currentlang;
//print_single_button("http://moodle.org/download/lang/", $options, get_string("latestlanguagepack"));
echo "</td></tr></table>";
$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 '</td></tr></table>';
print_simple_box_end();
print_footer();
print_box_end();
admin_externalpage_print_footer($adminroot);
exit;
}
// Get a list of all the root files in the English directory
$langdir = "$CFG->dataroot/lang/$currentlang";
$langbase = $CFG->dataroot . '/lang';
$enlangdir = "$CFG->dirroot/lang/en_utf8";
if ($currentlang == 'en_utf8') {
$langdir = $enlangdir;
} else {
$langdir = "$langbase/$currentlang";
}
$locallangdir = "$langbase/{$currentlang}_local";
if (! $stringfiles = get_directory_list($enlangdir, "", false)) {
error("Could not find English language pack!");
@@ -105,20 +121,31 @@
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
}
// Following variables store the HTML output to be echo-ed
$m = '';
$o = '';
// For each file, check that a counterpart exists, then check all the strings
foreach ($stringfiles as $file) {
unset($string);
include("$enlangdir/$file");
$enstring = $string;
ksort($enstring);
unset($string);
if (file_exists("$langdir/$file")) {
include("$langdir/$file");
$fileismissing = 0;
} else {
notify(get_string("filemissing", "", "$langdir/$file"));
$fileismissing = 1;
// notify(get_string("filemissing", "", "$langdir/$file"));
$o .= '<div class="notifyproblem">'.get_string("filemissing", "", "$langdir/$file").'</div><br />';
$string = array();
}
$missingcounter = 0;
$first = true;
foreach ($enstring as $key => $value) {
@@ -127,18 +154,37 @@
$value = str_replace("$"."a", "\\$"."a", $value);
$value = str_replace("%%","%",$value);
if ($first) {
echo "<p><b>".get_string("stringsnotset","","$langdir/$file")."</b></p><pre>";
$m .= "<a href=\"lang.php?mode=missing#$file\">$file";
$m .= $fileismissing ? '*' : '';
$m .= '</a> &nbsp; ';
$o .= "<p><a name=\"$file\"></a><b>".get_string("stringsnotset","","$langdir/$file")."</b></p><pre>";
$first = false;
$somethingfound = true;
}
echo "$"."string['$key'] = \"$value\";<br />";
$missingcounter++;
if (LANG_LINK_MISSING_STRINGS) {
$missinglinkstart = "<a href=\"lang.php?mode=compare&amp;currentfile=$file#missing$missingcounter\">";
$missinglinkend = '</a>';
} else {
$missinglinkstart = '';
$missinglinkend = '';
}
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 />";
}
}
if (!$first) {
echo '</pre><hr />';
$o .= '</pre><hr />';
}
}
if ($m <> '') {
print_box($m, 'filenames');
}
echo $o;
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/help", "CVS")) {
error("Could not find English language help files!");
}
@@ -165,16 +211,38 @@
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($langdir)) {
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
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">Created directory '.
$langdir .'</div>'."<br />\n";
}
}
if ($uselocal && !file_exists($locallangdir)) {
if (!lang_make_directory($locallangdir)) {
echo '<div class="notifyproblem">ERROR: Could not create directory '.
$locallangdir .'</div>'."<br />\n";
$uselocal = 0;
} else {
echo '<div class="notifysuccess">Created directory '.
$locallangdir .'</div>'."<br />\n";
}
}
if (isset($_POST['currentfile'])){ // Save a file
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
@@ -188,17 +256,32 @@
}
unset($newstrings['currentfile']);
if (lang_save_file($langdir, $currentfile, $newstrings)) {
notify(get_string("changessaved")." ($langdir/$currentfile)", "green");
if ($uselocal) {
include("$langdir/$currentfile");
if (isset($string)) {
$packstring = $string;
} else {
$packstring = array();
}
unset($string);
$saveinto = $locallangdir;
} else {
error("Could not save the file '$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
$packstring = array();
$saveinto = $langdir;
}
}
if (lang_save_file($saveinto, $currentfile, $newstrings, $uselocal, $packstring)) {
notify(get_string("changessaved")." ($saveinto/$currentfile)", "green");
} else {
error("Could not save the file '$saveinto/$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
}
unset($packstring);
}
print_heading_with_help($streditstrings, "langedit");
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; ";
@@ -206,166 +289,420 @@
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_box_start();
echo $strfilestoredin;
echo $uselocal ? "{$currentlang}_local" : $currentlang;
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
print_heading("$currentfile", "center", 4);
if (!file_exists("$langdir/$currentfile")) {
if (!touch("$langdir/$currentfile")) {
echo "<p><font color=\"red\">".get_string("filemissing", "", "$langdir/$currentfile")."</font></p>";
continue;
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="'.$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"), '', 4, 'error');
} else {
print_heading($strfilecreated, '', 4, 'notifysuccess');
}
}
if ($currentlang == "en_utf8" && !$uselocal) {
$editable = false;
print_heading($streditennotallowed, '', 4);
} elseif ($f = fopen("$saveto/$currentfile","r+")) {
$editable = true;
fclose($f);
} else {
$editable = false;
echo "<p><font size=\"1\">".get_string("makeeditable", "", "$saveto/$currentfile")."</font></p>";
}
error_reporting($CFG->debug);
print_heading("$currentfile", "", 4);
if (LANG_DISPLAY_MISSING_LINKS && $editable) {
print_heading('<a href="#missing1">'.$strgotofirst.'</a>', "", 4);
}
}
error_reporting(0);
if ($f = fopen("$langdir/$currentfile","r+") && ($currentlang != "en_utf8")) {
$editable = true;
fclose($f);
} else {
$editable = false;
echo "<p><font size=\"1\">".get_string("makeeditable", "", "$langdir/$currentfile")."</font></p>";
}
///added code here to prevent en_utf8 being edited
error_reporting(7);
unset($string);
include("$enlangdir/$currentfile");
$enstring = $string;
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
$enstring['thischarset'] = "<< TRANSLATORS: 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 >>";
}
ksort($enstring);
unset($string);
unset($string);
include("$enlangdir/$currentfile");
$enstring = $string;
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
$enstring['thischarset'] = "<< TRANSLATORS: Specify the character set of your language here. Note that all text created while this language is active will be stored using this character set, so don't change it once you have set it. Example: iso-8859-1 >>";
$enstring['thisdirection'] = "<< TRANSLATORS: This string specifies the direction of your text, either left-to-right or right-to-left. Insert either 'ltr' or 'rtl' here. >>";
$enstring['parentlanguage'] = "<< TRANSLATORS: If your language has a Parent Language that Moodle should use when strings are missing from your language pack, then specify the code for it here. If you leave this blank then English will be used. Example: nl >>";
}
ksort($enstring);
unset($string);
include("$langdir/$currentfile");
if ($editable) {
echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
}
echo "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
foreach ($enstring as $key => $envalue) {
$envalue = nl2br(htmlspecialchars($envalue));
$envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue); // Make variables bold.
$envalue = str_replace("%%","%",$envalue);
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "\n\n".'<tr>';
echo '<td dir="ltr" lang="en" width="20%" nowrap="nowrap" valign="top">'.$key.'</td>'."\n";
echo '<td dir="ltr" lang="en" width="40%" valign="top">'.$envalue.'</td>'."\n";
$value = $string[$key];
$value = str_replace("\r","",$value); // Bad character caused by Windows
$value = preg_replace("/\n{3,}/", "\n\n", $value); // Collapse runs of blank lines
$value = trim($value, "\n"); // Delete leading/trailing lines
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
$cellcolour = $value ? '': 'class="highlight"';
@include("$locallangdir/$currentfile");
$localstring = isset($string) ? $string : array();
unset($string);
@include("$langdir/$currentfile");
if ($editable) {
echo '<td width="40%" '.$cellcolour.' valign="top">'."\n";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
$valuelen = strlen($envalue);
}
$cols=50;
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
echo '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
} else {
if ($valuelen) {
$cols = $valuelen + 2;
}
echo '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" />';
}
echo '</td>';
} else {
echo '<td width="40%" bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
echo "<form id=\"$currentfile\" action=\"lang.php\" method=\"post\">";
echo '<div>';
}
}
if ($editable) {
echo '<tr><td colspan="2">&nbsp;<td><br />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo ' <input type="hidden" name="currentfile" value="'.$currentfile.'" />';
echo ' <input type="hidden" name="mode" value="compare" />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '</td></tr>';
}
echo '</table>';
echo '</form>';
echo "<table summary=\"\" width=\"100%\" 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>&nbsp;</td><td><br />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '<br />&nbsp;</td></tr>';
}
$envalue = nl2br(htmlspecialchars($envalue));
$envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue); // Make variables bold.
$envalue = str_replace("%%","%",$envalue);
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "\n\n".'<tr 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);
if ($uselocal) {
$value = lang_fix_value_from_file($localstring[$key]);
$value2 = lang_fix_value_from_file($string[$key]);
if ($value == '') {
$value = $value2;
}
} else {
$value = lang_fix_value_from_file($string[$key]);
$value2 = lang_fix_value_from_file($localstring[$key]);
}
error_reporting($CFG->debug);
// Color highlighting:
// red #ef6868 - translation missing in both system and local pack
// yellow #feff7f - translation missing in system pack but is translated in local
// green #AAFFAA - translation present in both system and local but is different
if (!$value) {
if (!$value2) {
$cellcolour = 'class="bothmissing"';
} else {
$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" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
} else {
$missingtarget = '';
$missingnext = '';
$missingprev = '';
}
} else {
if ($value <> $value2 && $value2 <> '') {
$cellcolour = 'class="localdifferent"';
} else {
$cellcolour = '';
}
$missingtarget = '';
$missingnext = '';
$missingprev = '';
}
if ($editable) {
echo '<td '.$cellcolour.' valign="top">'. $missingprev . $missingtarget."\n";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
$valuelen = strlen($envalue);
}
$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";
} else {
if ($valuelen) {
$cols = $valuelen + 5;
}
echo '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" />';
}
if ($value2 <> '' && $value <> $value2) {
echo '<br /><span style="font-size:small">'.$value2.'</span>';
}
echo $missingnext . '</td>';
} else {
echo '<td '.$cellcolour.' valign="top">'.$value.'</td>';
}
echo '</tr>'."\n";
}
if ($editable) {
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" />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '</td></tr>';
}
echo '</table>';
if ($editable) {
echo '</div>';
echo '</form>';
}
} else {
// no $currentfile specified
print_heading($strchoosefiletoedit, "", 4);
}
}
print_footer();
admin_externalpage_print_footer($adminroot);
//////////////////////////////////////////////////////////////////////
function lang_save_file($path, $file, $strings) {
// Thanks to Petri Asikainen for the original version of code
// used to save language files.
//
// $path is a full pathname to the file
// $file is the file to overwrite.
// $strings is an array of strings to write
/**
* Save language translation file.
*
* Thanks to Petri Asikainen for the original version of code
* used to save language files.
*
* @uses $CFG
* @uses $USER
* @param string $path Full pathname to the directory to use
* @param string $file File to overwrite
* @param array $strings Array of strings to write
* @param bool $local Should *_local version be saved?
* @param array $packstrings Array of default langpack strings (needed if $local)
* @return bool Created successfully?
*/
function lang_save_file($path, $file, $strings, $local, $packstrings) {
global $CFG, $USER;
error_reporting(0);
if (!$f = fopen("$path/$file","w")) {
if (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;
}
error_reporting(7);
fwrite($f, "<?PHP // \$Id\$ \n");
fwrite($f, " // $file - created with Moodle $CFG->release ($CFG->version)\n\n\n");
fwrite($f, " // $file - created with Moodle $CFG->release ($CFG->version)\n");
if ($local) {
fwrite($f, " // local modifications from $CFG->wwwroot\n");
}
fwrite($f, "\n\n");
ksort($strings);
foreach ($strings as $key => $value) {
list($id, $stringname) = explode('XXX',$key);
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
@list($id, $stringname) = explode('XXX',$key);
$value = lang_fix_value_before_save($value);
if ($id == "string" and $value != ""){
fwrite($f,"\$string['$stringname'] = '$value';\n");
if ((!$local) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) {
// 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");
fclose($f);
return true;
}
/**
* 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
*/
function lang_fix_value_from_file($value='') {
$value = str_replace("\r","",$value); // Bad character caused by Windows
$value = preg_replace("/\n{3,}/", "\n\n", $value); // Collapse runs of blank lines
$value = trim($value); // Delete leading/trailing white space
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("&","&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;
}
/// Following functions are required because '.' in form input names
/// get replaced by '_' by PHP.
/**
* Try and create a new language directory.
*
* @uses $CFG
* @param string $directory full path to the directory under $langbase
* @return string|false Returns full path to directory if successful, false if not
*/
function lang_make_directory($dir, $shownotices=true) {
global $CFG;
umask(0000);
if (! file_exists($dir)) {
if (! @mkdir($dir, $CFG->directorypermissions)) {
return false;
}
//@chmod($dir, $CFG->directorypermissions); // Just in case mkdir didn't do it
}
return $dir;
}
/**
* 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);
}
}
?>
+52 -52
View File
@@ -1,15 +1,18 @@
<?php // $Id$
/**
This script enables Moodle translators to edit /docs and /help language
files directly via WWW interface.
Author: mudrd8mz@uxit.pedf.cuni.cz (http://moodle.cz)
Based on: lang.php in 1.4.3+ release
Thanks: Jaime Villate for important bug fixing, koen roggemans for his job and all moodlers
for intensive testing of this my first contribution
*/
* This script enables Moodle translators to edit /docs and /help language
* files directly via WWW interface.
*
* Author: mudrd8mz@uxit.pedf.cuni.cz (http://moodle.cz)
* Based on: lang.php in 1.4.3+ release
* Thanks: Jaime Villate for important bug fixing, koen roggemans for his job and all moodlers
* for intensive testing of this my first contribution
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('langedit', $adminroot);
//
// Some local configuration
@@ -24,28 +27,12 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
$currentfile = optional_param('currentfile', 'docs/README.txt', PARAM_PATH);
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
if (! $site = get_site()) {
error("Site not defined!");
}
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strcurrentlanguage = get_string("currentlanguage");
$strthislanguage = get_string("thislanguage");
$stredithelpdocs = get_string('edithelpdocs', 'admin');
print_header("$site->shortname: $stredithelpdocs: $currentfile", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> ->
<a href=\"lang.php\">$strlanguage</a> -> $stredithelpdocs",
'choosefile.popup', '', true);
admin_externalpage_print_header($adminroot);
$currentlang = current_language();
$langdir = "$CFG->dataroot/lang/$currentlang";
@@ -53,7 +40,7 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
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?
@@ -62,7 +49,7 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
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);
}
}
}
@@ -74,7 +61,7 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
// 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();
@@ -94,7 +81,7 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
// 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.
@@ -171,7 +158,10 @@ $langdir/$currentfile")."</font></p>";
echo htmlspecialchars(file_get_contents("$enlangdir/$currentfile"));
echo "</textarea>\n";
//link_to_popup_window("/lang/en_utf8/$currentfile", "popup", get_string("preview"));
link_to_popup_window(help_preview_url($currentfile).'&amp;forcelang=en_utf8', 'popup', get_string('preview'));
$preview_url = langdoc_preview_url($currentfile);
if ($preview_url) {
link_to_popup_window($preview_url.'&amp;forcelang=en_utf8', 'popup', get_string('preview'));
}
echo "</td>\n";
if ($fileeditorinline == 1) {
echo "</tr>\n<tr valign=\"center\">\n";
@@ -179,30 +169,32 @@ $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.'" />';
}
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">\n";
if (file_exists("$langdir/$currentfile")) {
echo htmlspecialchars(file_get_contents("$langdir/$currentfile"));
} else {
echo ($filetemplate);
}
echo "</textarea>\n";
link_to_popup_window(help_preview_url($currentfile), 'popup', get_string('preview'));
echo "</td>\n</tr>\n</table>";
if ($editable) {
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">\n";
if (file_exists("$langdir/$currentfile")) {
echo htmlspecialchars(file_get_contents("$langdir/$currentfile"));
} else {
echo ($filetemplate);
}
echo "</textarea>\n";
$preview_url = langdoc_preview_url($currentfile);
if ($preview_url) {
link_to_popup_window($preview_url, 'popup', get_string('preview'));
}
echo '<div align="center"><input type="submit" value="'.get_string('savechanges').': lang/'.$currentlang.'/'.$currentfile.'" /></div>';
echo '</form>';
}
echo "</td>\n</tr>\n</table>";
error_reporting($CFG->debug);
}
print_footer();
admin_externalpage_print_footer($adminroot);
//////////////////////////////////////////////////////////////////////
@@ -240,18 +232,26 @@ function langdoc_save_file($path, $file, $content) {
return true;
}
function help_preview_url($currentfile) {
/**
* Return a preview URL for the file, if available.
*
* Documentation will be moved into moodle.org wiki and current version 1.6 does not
* seem to be able to display local documentation. Thus, return empty URL for doc files.
* See lib/moodlelib.php document_file() - it still relies on old pre-UTF8 lang/ location.
*/
function langdoc_preview_url($currentfile) {
if (substr($currentfile, 0, 5) == 'help/') {
$currentfile = substr($currentfile, 5);
}
$currentpathexp = explode('/', $currentfile);
if (count($currentpathexp) > 1) {
$url = '/help.php?module='.$currentpathexp[0].'&amp;file='.$currentpathexp[1];
$currentpathexp = explode('/', $currentfile);
if (count($currentpathexp) > 1) {
$url = '/help.php?module='.$currentpathexp[0].'&amp;file='.$currentpathexp[1];
} else {
$url = '/help.php?module=moodle&amp;file='.$currentfile;
}
} else {
$url = '/help.php?module=moodle&amp;file='.$currentfile;
$url = '';
}
return $url;
}
?>
?>
+66 -91
View File
@@ -5,6 +5,9 @@
///This helps to avoid confusion.
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('langimport', $adminroot);
$mode = optional_param('mode', 0, PARAM_INT); //phase
$pack = optional_param('pack', '', PARAM_FILE); //pack to install
@@ -18,50 +21,39 @@
define('DELETION_OF_SELECTED_LANG', 4);
define('UPDATE_ALL_LANG', 5);
require_login();
if (!isadmin()) {
error('You must be an admin');
}
if (!$site = get_site()) {
error("Site not defined!");
}
$strlang = get_string('langimport','admin');
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strthislanguage = get_string("thislanguage");
$title = $strlang;
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"lang.php\">$strlanguage</a> -> $strlang",
'', '', true, '');
print_heading('');
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 {
@@ -70,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:
@@ -100,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()) {
@@ -117,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,
@@ -134,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
@@ -199,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 {
@@ -222,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';
@@ -250,70 +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
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) {
@@ -328,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();
@@ -354,8 +326,8 @@
} //close of main switch
print_footer();
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
@@ -372,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
@@ -387,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) {
@@ -400,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);
+19 -27
View File
@@ -2,14 +2,12 @@
// Enables/disables maintenance mode
require('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$action = optional_param('action', '', PARAM_ALPHA);
require_login();
if (!isadmin()) {
error('You need to be admin to use this page');
}
$adminroot = admin_get_root();
admin_externalpage_setup('maintenancemode', $adminroot);
//Check folder exists
if (! make_upload_directory(SITEID)) { // Site folder
@@ -22,57 +20,51 @@
if (confirm_sesskey()) {
if ($form->action == "disable") {
unlink($filename);
redirect('index.php', get_string('sitemaintenanceoff','admin'));
redirect('maintenance.php', get_string('sitemaintenanceoff','admin'));
} else {
$file = fopen($filename, 'w');
fwrite($file, stripslashes($form->text));
fclose($file);
redirect('index.php', get_string('sitemaintenanceon', 'admin'));
redirect('maintenance.php', get_string('sitemaintenanceon', 'admin'));
}
}
}
/// Print the header stuff
$strmaintenance = get_string('sitemaintenancemode', 'admin');
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
print_header("$SITE->shortname: $strmaintenance", $SITE->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmaintenance");
print_heading($strmaintenance);
admin_externalpage_print_header($adminroot);
/// 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();
}
}
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+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');
?>
+8 -21
View File
@@ -2,16 +2,9 @@
// module.php - allows admin to edit all local configuration variables for a module
require_once('../config.php');
require_login();
if (!isadmin()) {
error("Only an admin can use this page");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('managemodules', $adminroot);
/// If data submitted, then process and store.
@@ -52,29 +45,23 @@
$module = required_param('module', PARAM_SAFEDIR);
require_once("$CFG->dirroot/mod/$module/lib.php");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strmanagemodules = get_string("managemodules");
$strmodulename = get_string("modulename", $module);
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'mod/' . $module . '/config';
print_header("$site->shortname: $strmodulename: $strconfiguration", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"modules.php\">$strmanagemodules</a> -> $strmodulename");
admin_externalpage_print_header($adminroot);
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", "");
include("$CFG->dirroot/mod/$module/config.html");
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+62 -48
View File
@@ -3,28 +3,24 @@
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);
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
$delete = optional_param('delete', '', PARAM_SAFEDIR);
$confirm = optional_param('confirm', '', PARAM_BOOL);
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Print headings
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strmanagemodules = get_string("managemodules");
$stractivities = get_string("activities");
$strdelete = get_string("delete");
$strversion = get_string("version");
$strhide = get_string("hide");
@@ -32,15 +28,14 @@
$strsettings = get_string("settings");
$stractivities = get_string("activities");
$stractivitymodule = get_string("activitymodule");
$strshowmodulecourse = get_string('showmodulecourse');
print_header("$site->shortname: $strmanagemodules", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmanagemodules");
admin_externalpage_print_header($adminroot);
print_heading($stractivities);
$coursesaffected = false;
print_heading($strmanagemodules);
$courseaffected = false;
/// If data submitted, then process and store.
@@ -65,14 +60,14 @@
}
if (!empty($delete) and confirm_sesskey()) {
$strmodulename = get_string("modulename", "$delete");
if (!$confirm) {
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&amp;confirm=1&amp;sesskey=$USER->sesskey",
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&amp;confirm=1&amp;sesskey=$USER->sesskey",
"modules.php");
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
} else { // Delete everything!!
@@ -99,7 +94,7 @@
notify("Error occurred while deleting all $strmodulename records in course_modules table");
}
// Then delete all the logs
// Then delete all the logs
if (!delete_records("log", "module", $module->name)) {
notify("Error occurred while deleting all $strmodulename records in log table");
}
@@ -125,9 +120,11 @@
}
}
}
}
}
// Delete the capabilities that were defined by this module
capabilities_cleanup('mod/'.$module->name);
//rebuild_course_cache(); // Because things have changed
// rebuild_course_cache(); // Because things have changed
$coursesaffected = true;
$a->module = $strmodulename;
@@ -135,11 +132,11 @@
notice(get_string("moduledeletefiles", "", $a), "modules.php");
}
}
if ($coursesaffected) {
rebuild_course_cache(); // Because things have changed
}
/// Get and sort the existing modules
@@ -149,25 +146,28 @@
foreach ($modules as $module) {
$strmodulename = get_string("modulename", "$module->name");
// Deal with modules which are lacking the language string
if ($strmodulename == '[[modulename]]') {
$strmodulename = $module->name;
}
// Deal with modules which are lacking the language string
if ($strmodulename == '[[modulename]]') {
$strmodulename = $module->name;
}
$modulebyname[$strmodulename] = $module;
}
ksort($modulebyname);
/// 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>";
@@ -177,28 +177,42 @@
$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);
$table->add_data(array(
'<span'.$class.'>'.$icon.' '.$modulename.'</span>',
$countlink,
'<span'.$class.'>'.$module->version.'</span>',
$visible,
$delete,
$settings
));
}
print_table($table);
echo "<br /><br />";
$table->print_html();
print_footer();
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;
}
?>
+10 -12
View File
@@ -3,19 +3,17 @@
if (!isset($CFG)) {
require('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('oacleanup', $adminroot);
require_login();
if (!isadmin()) {
error('You must be an admin to use this script');
exit;
}
print_header_simple('Online Assignment Cleanup','Online Assignment Cleanup', 'Admin');
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
admin_externalpage_print_header($adminroot);
online_assignment_cleanup(true);
print_footer();
admin_externalpage_print_footer($adminroot);
}
@@ -48,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) {
@@ -75,7 +73,7 @@ function online_assignment_cleanup($output=false) {
/// cycle through the instances
foreach ($instances as $instance) {
/// is this an instance of an online assignment
$sql = "SELECT a.id
$sql = "SELECT a.id
FROM {$CFG->prefix}course_modules cm,
{$CFG->prefix}assignment a
WHERE cm.id = '$instance' AND
@@ -101,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;
}
@@ -140,7 +138,7 @@ function online_assignment_cleanup($output=false) {
set_field('course_sections', 'sequence', $section->sequence, 'id', $section->id);
if ($output) echo 'Online Assignment (instance '.$instance.') moved from section '.$section->id.': to section '.$newsection.'<br />';
}
+138
View File
@@ -0,0 +1,138 @@
<?php // $Id$
require_once($CFG->libdir.'/pagelib.php');
define('PAGE_ADMIN', 'admin');
// 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 {
var $section;
var $pathtosection;
var $visiblepathtosection;
// hack alert!
// this function works around the inability to store the section name
// in default block, maybe we should "improve" the blocks a bit?
function init_extra($section) {
global $CFG;
if($this->full_init_done) {
return;
}
$adminroot = admin_get_root();
// fetch the path parameter
$this->section = $section;
$this->visiblepathtosection = array();
// this part is (potentially) processor-intensive... there's gotta be a better way
// of handling this
if ($this->pathtosection = $adminroot->path($this->section)) {
foreach($this->pathtosection as $element) {
if ($pointer = $adminroot->locate($element)) {
array_push($this->visiblepathtosection, $pointer->visiblename);
}
}
}
// all done
$this->full_init_done = true;
}
function blocks_get_default() {
return 'admin_tree,admin_bookmarks';
}
// seems reasonable that the only people that can edit blocks on the admin pages
// are the admins... but maybe we want a role for this?
function user_allowed_editing() {
return has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
}
// has to be fixed. i know there's a "proper" way to do this
function user_is_editing() {
global $USER;
return $USER->adminediting;
}
function url_get_path() {
global $CFG;
$adminroot = admin_get_root();
$root = $adminroot->locate($this->section);
if (is_a($root, 'admin_externalpage')) {
return $root->url;
} else {
return ($CFG->wwwroot . '/' . $CFG->admin . '/settings.php');
}
}
function url_get_parameters() { // only handles parameters relevant to the admin pagetype
return array('section' => (isset($this->section) ? $this->section : ''));
}
function blocks_get_positions() {
return array(BLOCK_POS_LEFT, BLOCK_POS_RIGHT);
}
function blocks_default_position() {
return BLOCK_POS_LEFT;
}
function blocks_move_position(&$instance, $move) {
if($instance->position == BLOCK_POS_LEFT && $move == BLOCK_MOVE_RIGHT) {
return BLOCK_POS_RIGHT;
} else if ($instance->position == BLOCK_POS_RIGHT && $move == BLOCK_MOVE_LEFT) {
return BLOCK_POS_LEFT;
}
return $instance->position;
}
// does anything need to be done here?
function init_quick($data) {
parent::init_quick($data);
}
function print_header($section = '') {
global $USER, $CFG, $SITE;
$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
// 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').'" /></div></form></div>';
} else {
$buttons = '&nbsp;';
}
print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname,
implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, '');
}
function get_type() {
return PAGE_ADMIN;
}
}
?>
+24 -25
View File
@@ -2,38 +2,37 @@
// phpinfo.php - shows phpinfo for the current server
require_once("../config.php");
require_once($CFG->libdir.'/adminlib.php');
$topframe = optional_param('topframe', false, PARAM_BOOL);
$bottomframe = optional_param('bottomframe', false, PARAM_BOOL);
$adminroot = admin_get_root();
admin_externalpage_setup('phpinfo', $adminroot);
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (!$topframe && !$bottomframe) {
?>
admin_externalpage_print_header($adminroot);
<head>
<title>PHP info</title>
</head>
echo '<div class="phpinfo">';
<frameset rows="80,*">
<frame src="phpinfo.php?topframe=true&amp;sesskey=<?php echo $USER->sesskey ?>">
<frame src="phpinfo.php?bottomframe=true&amp;sesskey=<?php echo $USER->sesskey ?>">
</frameset>
ob_start();
phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES);
$html = ob_get_contents();
ob_end_clean();
<?php
} else if ($topframe && confirm_sesskey()) {
$stradministration = get_string("administration");
$site = get_site();
/// 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;
echo '</div>';
admin_externalpage_print_footer($adminroot);
print_header("$site->shortname: phpinfo", "$site->fullname",
"<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> PHP info");
exit;
} else if ($bottomframe && confirm_sesskey()) {
phpinfo();
exit;
}
?>
+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) {
-171
View File
@@ -1,171 +0,0 @@
<?PHP // $Id$
// Allows the admin to manage questiontypes
// This page is adapted from modules.php
// This page is not yet in service, the whole plug-in architecture
// for question types is still under construction.
require_once('../config.php');
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
$delete = optional_param('delete', '', PARAM_SAFEDIR);
$confirm = optional_param('confirm', '', PARAM_BOOL);
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Print headings
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strdelete = get_string("delete");
$strversion = get_string("version");
$strhide = get_string("hide");
$strshow = get_string("show");
$strsettings = get_string("settings");
$strquestions = get_string("questions");
$strquestiontype = get_string("questiontype", 'quiz');
print_header("$site->shortname: $strquestions", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strquestions");
print_heading($strquestions);
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
if (!$qtype = get_record("question_types", "name", $hide)) {
error("Question type doesn't exist!");
}
set_field("question_types", "visible", "0", "id", $qtype->id); // Hide question type
}
if (!empty($show) and confirm_sesskey()) {
if (!$qtype = get_record("question_types", "name", $show)) {
error("Question type doesn't exist!");
}
set_field("question_types", "visible", "1", "id", $qtype->id); // Show question type
}
if (!empty($delete) and confirm_sesskey()) {
$strqtypename = get_string("qtypename", "qtype_$delete");
if (!$confirm) {
notice_yesno(get_string("qtypedeleteconfirm", "admin", $strqtypename),
"questiontypes.php?delete=$delete&amp;confirm=1&amp;sesskey=$USER->sesskey",
"questiontypes.php");
print_footer();
exit;
} else { // Delete everything!!
if ($delete == "random") {
error("You can not delete the random question type!!");
}
if (!$qtype = get_record("question_types", "name", $delete)) {
error("Question type doesn't exist!");
}
// OK, first delete all the questions
if ($questions = get_records("quiz_questions", "qtype", $qtype->id)) {
foreach ($questions as $question) {
if (! quiz_delete_question($coursemod->id, $coursemod->section)) {
notify("Could not delete the $strqtypename with id = $question->id");
}
}
}
// And the qtype entry itself
if (!delete_records("question_types", "name", $qtype->name)) {
notify("Error occurred while deleting the $strqtypename record from question_types table");
}
// Then the tables themselves
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$qtype->name;
foreach ($tables as $table) {
if (strpos($table, $prefix) === 0) {
if (!execute_sql("DROP TABLE $table", false)) {
notify("ERROR: while trying to drop table $table");
}
}
}
}
$a->qtype = $strqtypename;
$a->directory = "$CFG->dirroot/qtype/$delete";
notice(get_string("qtypedeletefiles", "", $a), "questiontypes.php");
}
}
/// Get and sort the existing questiontypes
if (!$qtypes = get_records("question_types")) {
error("No question types found!!"); // Should never happen
}
foreach ($qtypes as $qtype) {
$strqtypename = get_string("qtypename", "qtype_$qtype->name");
$qtypebyname[$strqtypename] = $qtype;
}
ksort($qtypebyname);
/// Print the table of all questiontypes
$table->head = array ($strquestiontype, $strquestions, $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";
foreach ($qtypebyname as $qtypename => $qtype) {
$icon = "<img src=\"$CFG->dirroot/mod/quiz/questiontypes/$qtype->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
if (file_exists("$CFG->dirroot/mod/quiz/questiontypes/$qtype->name/config.html")) {
$settings = "<a href=\"questiontype.php?qtype=$qtype->name\">$strsettings</a>";
} else {
$settings = "";
}
$count = count_records('quiz_questions', 'qtype', $qtype->id);
$delete = $count ? '' : "<a href=\"questiontypes.php?delete=$qtype->name&amp;sesskey=$USER->sesskey\">$strdelete</a>";
if ($qtype->visible) {
$visible = "<a href=\"questiontypes.php?hide=$qtype->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
"<img src=\"$CFG->pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
$class = "";
} else {
$visible = "<a href=\"questiontypes.php?show=$qtype->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\"";
}
if ($qtype->name == "random") {
$delete = "";
$visible = "";
$class = "";
}
$table->data[] = array ("<span $class>$icon $qtypename</span>", $count, $qtype->version, $visible, $delete, $settings);
}
print_table($table);
echo "<br /><br />";
print_footer();
?>
+91 -95
View File
@@ -5,9 +5,7 @@
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (!$site = get_site()) {
redirect("index.php");
@@ -26,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']);
}
@@ -36,159 +34,157 @@
$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')-1;
$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 />';
$count = count_records('user_students');
echo get_string("enrolments").": ".$count;
echo "<input type=\"hidden\" name=\"enrolments\" value=\"$count\">\n";
// 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 '<br />';
$count = count_records('user_teachers');
// first find all distinct roles with mod/course:update
// please change the name and strings to something appropriate to reflect the new data collected
$sql = "SELECT COUNT(DISTINCT u.id)
FROM {$CFG->prefix}role_capabilities rc,
{$CFG->prefix}role_assignments ra,
{$CFG->prefix}user u
WHERE (rc.capability = 'moodle/course:update' or rc.capability='moodle/site:doanything')
AND rc.roleid = ra.roleid
AND u.id = ra.userid";
$count = count_records_sql($sql);
echo get_string("teachers").": ".$count;
echo "<input type=\"hidden\" name=\"teachers\" 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();
?>
+30 -10
View File
@@ -2,32 +2,37 @@
/// 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('replace', $adminroot);
$search = optional_param('search', '', PARAM_RAW);
$replace = optional_param('replace', '', PARAM_RAW);
require_login();
if (!isadmin()) {
error("Admins only");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
###################################################################
print_header('Search and replace throughout the whole database', 'Replace text within the whole database');
admin_externalpage_print_header($adminroot);
print_heading('Search and replace text throughout the whole database');
if (!$search or !$replace or !confirm_sesskey()) { /// Print a form
if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Print a form
print_simple_box_start('center');
echo '<div align="center">';
echo '<form action="replace.php">';
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 '<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 />';
echo '<input type="submit" value="Yes, do it now" /><br />';
echo '</form>';
echo '</div>';
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
die;
}
@@ -37,6 +42,13 @@ if (!$tables = $db->Metatables() ) { // No tables yet at all.
}
print_simple_box_start('center');
/// Turn off time limits, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_flush());
foreach ($tables as $table) {
if (in_array($table, array($CFG->prefix.'config'))) { // Don't process these
continue;
@@ -51,8 +63,16 @@ foreach ($tables as $table) {
}
}
}
print_simple_box_end();
/// Rebuild course cache which might be incorrect now
notify('Rebuilding course cache...');
rebuild_course_cache();
notify('...finished');
print_continue('index.php');
admin_externalpage_print_footer($adminroot);
?>
-26
View File
@@ -1,26 +0,0 @@
<?php // $Id$
// Display all the reports available in admin/report
require_once('../config.php');
if (!isadmin()) {
error("You are not allowed to look at this page");
}
$stradmin = get_string('administration');
$strreports = get_string('reports');
print_header($strreports, $strreports,
'<a href="index.php">'.$stradmin.'</a> -> '.$strreports);
$directories = get_list_of_plugins('admin/report');
foreach ($directories as $directory) {
echo '<div class="plugin '.$directory.'">';
include_once($CFG->dirroot.'/admin/report/'.$directory.'/mod.php'); // Fragment for listing
echo '</div>';
}
print_footer();
?>
+61 -59
View File
@@ -2,20 +2,24 @@
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportcourseoverview', $adminroot);
admin_externalpage_print_header($adminroot);
$report = optional_param('report', STATS_REPORT_ACTIVE_COURSES, PARAM_INT);
$time = optional_param('time', 0, PARAM_INT);
$numcourses = optional_param('numcourses', 20, PARAM_INT);
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID)); // needed?
if (empty($CFG->enablestats)) {
error("Stats is not enabled.");
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3, $adminroot);
}
require_login();
if (!isadmin()) {
error("This page is for admins only");
}
$course = get_site();
stats_check_uptodate($course->id);
@@ -23,16 +27,14 @@
$strreports = get_string('reports');
$strcourseoverview = get_string('courseoverview');
$strnav = '<a href="'.$CFG->wwwroot.'/admin/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/admin/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
$tableprefix = $CFG->prefix.'stats_';
$earliestday = get_field_sql('SELECT timeend FROM '.$tableprefix.'daily ORDER BY timeend LIMIT 1');
$earliestweek = get_field_sql('SELECT timeend FROM '.$tableprefix.'weekly ORDER BY timeend LIMIT 1');
$earliestmonth = get_field_sql('SELECT timeend FROM '.$tableprefix.'monthly ORDER BY timeend LIMIT 1');
$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();
if (empty($earliestmonth)) $earliestmonth = time();
@@ -44,15 +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);
}
print_header($strcourseoverview, $strcourseoverview, $strnav,'','',true,'&nbsp');
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,59 +60,61 @@
'<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);
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
$courses = get_records_sql($sql);
if (!empty($param->sql)) {
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby;
}
error_log($sql);
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/courseoverview/index.php');
}
notify(get_string('statsnodata'));echo '</td></tr></table>';echo '<p>after notify</p>';
echo '<center><img src="'.$CFG->wwwroot.'/admin/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
$table = new object();
$table->align = array('left','center','center','center');
$table->head = array(get_string('course'),$param->line1);
if (!empty($param->line2)) {
$table->head[] = $param->line2;
}
if (!empty($param->line3)) {
$table->head[] = $param->line3;
}
foreach ($courses as $c) {
$a = array();
$a[] = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$c->courseid.'">'.get_field('course','shortname','id',$c->courseid).'</a>';
$a[] = print_numeric_value($c->line1);
if (isset($c->line2)) {
$a[] = print_numeric_value($c->line2);
} else {
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>';
}
if (isset($c->line3)) {
$a[] = print_numeric_value($c->line3);
$table = new StdClass;
$table->align = array('left','center','center','center');
$table->head = array(get_string('course'),$param->line1);
if (!empty($param->line2)) {
$table->head[] = $param->line2;
}
$table->data[] = $a;
if (!empty($param->line3)) {
$table->head[] = $param->line3;
}
foreach ($courses as $c) {
$a = array();
$a[] = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$c->courseid.'">'.get_field('course','shortname','id',$c->courseid).'</a>';
$a[] = $c->line1;
if (isset($c->line2)) {
$a[] = $c->line2;
}
if (isset($c->line3)) {
$a[] = round($c->line3,2);
}
$table->data[] = $a;
}
print_table($table);
}
print_table($table);
}
print_footer();
function print_numeric_value($value) {
list($whole, $decimals) = split ('[.,]', $value, 2);
if (intval($decimals) > 0)
return number_format($value,2,".",",");
else
return $value;
}
admin_externalpage_print_footer($adminroot);
?>
-11
View File
@@ -1,11 +0,0 @@
<?php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
if (!empty($CFG->enablestats)) {
echo '<a href="'.$CFG->wwwroot.'/admin/report/courseoverview/index.php">'.get_string('courseoverview').'</a>';
}
?>
+19 -16
View File
@@ -10,27 +10,28 @@
require_login();
if (!isadmin()) {
error("You must be an admin to use this page");
}
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID));
stats_check_uptodate($course->id);
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
$courses = get_records_sql($sql);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/course/index.php');
if (!empty($param->sql)) {
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby;
}
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
}
$graph = new graph(750,400);
@@ -38,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;
}
@@ -50,5 +53,5 @@
$graph->y_format['bar1'] = array('colour' => 'blue','bar' => 'fill','legend' => $param->{$param->graphline});
$graph->draw_stack();
?>
+33
View File
@@ -0,0 +1,33 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/course/report/log/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportlog', $adminroot);
admin_externalpage_print_header($adminroot);
$course = get_site();
print_heading(get_string('chooselogs') .':');
print_mnet_log_selector_form($CFG->mnet_localhost_id, $course);
echo '<br />';
print_heading(get_string('chooselivelogs') .':');
$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);
?>
-23
View File
@@ -1,23 +0,0 @@
<?php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/course/report/log/lib.php');
$course = get_site();
print_heading(get_string('chooselogs') .':');
print_log_selector_form($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>';
?>
+195
View File
@@ -0,0 +1,195 @@
<?php
/**
* A SimpleTest report format for Moodle.
*
* @copyright &copy; 2006 The Open University
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @version $Id$
* @package SimpleTestEx
*/
/** */
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/moodlelib.php');
require_once($CFG->libdir . '/simpletestlib/reporter.php');
/**
* Extended in-browser test displayer. HtmlReporter generates
* only failure messages and a pass count. ExHtmlReporter also
* generates pass messages and a time-stamp.
*
* @package SimpleTestEx
*/
class ExHtmlReporter extends HtmlReporter {
// Options set when the class is created.
var $showpasses;
// Lang strings. Set in the constructor.
var $strrunonlyfolder;
var $strrunonlyfile;
var $strseparator;
/**
* Constructor.
*
* @param bool $showpasses Whether this reporter should output anything for passes.
*/
function ExHtmlReporter($showpasses) {
global $CFG, $THEME;
$this->HtmlReporter();
$this->showpasses = $showpasses;
$this->strrunonlyfolder = $this->get_string('runonlyfolder');
$this->strrunonlyfile = $this->get_string('runonlyfile');
$this->strseparator = get_separator();
}
/**
* Called when a pass needs to be output.
*/
function paintPass($message) {
//(Implicitly call grandparent, as parent not implemented.)
parent::paintPass($message);
if ($this->showpasses) {
$this->_paintPassFail('pass', $message);
}
}
/**
* Called when a fail needs to be output.
*/
function paintFail($message) {
// Explicitly call grandparent, not parent::paintFail.
SimpleScorer::paintFail($message);
$this->_paintPassFail('fail', $message);
}
/**
* Called when an error (uncaught exception or PHP error) needs to be output.
*/
function paintError($message) {
// Explicitly call grandparent, not parent::paintFail.
SimpleScorer::paintError($message);
$this->_paintPassFail('exception', $message);
}
/**
* Private method. Used by printPass/Fail/Error.
*/
function _paintPassFail($passorfail, $message) {
global $FULLME, $CFG;
print_simple_box_start('', '100%', '', 5, $passorfail . ' generalbox');
$url = $this->_htmlEntities($this->_stripParameterFromUrl($FULLME, 'path'));
echo '<b class="', $passorfail, '">', $this->get_string($passorfail), '</b>: ';
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$file = array_shift($breadcrumb);
$pathbits = preg_split('/\/|\\\\/', substr($file, strlen($CFG->dirroot) + 1));
$file = array_pop($pathbits);
$folder = '';
foreach ($pathbits as $pathbit) {
$folder .= $pathbit . '/';
echo "<a href=\"{$url}path=$folder\" title=\"$this->strrunonlyfolder\">$pathbit</a>/";
}
echo "<a href=\"{$url}path=$folder$file\" title=\"$this->strrunonlyfile\">$file</a>";
echo $this->strseparator, implode($this->strseparator, $breadcrumb);
echo $this->strseparator, '<br />', $this->_htmlEntities($message), "\n\n";
print_simple_box_end();
flush();
}
/**
* Called when a notice needs to be output.
*/
function paintNotice($message) {
$this->paintMessage($this->_htmlEntities($message));
}
/**
* Paints a simple supplementary message.
* @param string $message Text to display.
*/
function paintMessage($message) {
if ($this->showpasses) {
print_simple_box_start('', '100%');
echo '<span class="notice">', $this->get_string('notice'), '</span>: ';
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
echo implode($this->strseparator, $breadcrumb);
echo $this->strseparator, '<br />', $message, "\n";
print_simple_box_end();
flush();
}
}
/**
* Output anything that should appear above all the test output.
*/
function paintHeader($test_name) {
// We do this the moodle way instead.
}
/**
* Output anything that should appear below all the test output, e.g. summary information.
*/
function paintFooter($test_name) {
$summarydata = new stdClass;
$summarydata->run = $this->getTestCaseProgress();
$summarydata->total = $this->getTestCaseCount();
$summarydata->passes = $this->getPassCount();
$summarydata->fails = $this->getFailCount();
$summarydata->exceptions = $this->getExceptionCount();
if ($summarydata->fails == 0 && $summarydata->exceptions == 0) {
$status = "pass";
} else {
$status = "fail";
}
echo '<div class="unittestsummary ', $status, '">';
echo $this->get_string('summary', $summarydata);
echo '</div>';
echo '<div class="performanceinfo">',
$this->get_string('runat', date('<b>d-m-Y H:i T</b>')),
$this->get_string('version', SimpleTestOptions::getVersion()),
'</div>';
}
/**
* Strip a specified parameter from the query string of a URL, if present.
* Adds a separator to the end of the URL, so that a new parameter
* can easily be appended. For example (assuming $param = 'frog'):
*
* http://example.com/index.php -> http://example.com/index.php?
* http://example.com/index.php?frog=1 -> http://example.com/index.php?
* http://example.com/index.php?toad=1 -> http://example.com/index.php?toad=1&
* http://example.com/index.php?frog=1&toad=1 -> http://example.com/index.php?toad=1&
*
* @param string $url the URL to modify.
* @param string $param the parameter to strip from the URL, if present.
*
* @return string The modified URL.
*/
function _stripParameterFromUrl($url, $param) {
$url = preg_replace('/(\?|&)' . $param . '=[^&]*&?/', '$1', $url);
if (strpos($url, '?') === false) {
$url = $url . '?';
} else {
$url = $url . '&';
}
return $url;
}
/**
* Look up a lang string in the appropriate file.
*/
function get_string($identifier, $a = NULL) {
return get_string($identifier, 'simpletest', $a);
}
}
?>
+208
View File
@@ -0,0 +1,208 @@
<?php
/**
* A SimpleTest GroupTest that automatically finds all the
* test files in a directory tree according to certain rules.
*
* @copyright &copy; 2006 The Open University
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @version $Id$
* @package SimpleTestEx
*/
/** */
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/simpletestlib/test_case.php');
/**
* This is a composite test class for finding test cases and
* other RunnableTest classes in a directory tree and combining
* them into a group test.
* @package SimpleTestEx
*/
class AutoGroupTest extends GroupTest {
var $thorough;
var $showsearch;
function AutoGroupTest($showsearch, $thorough, $test_name = null) {
$this->GroupTest($test_name);
$this->showsearch = $showsearch;
$this->thorough = $thorough;
}
function setLabel($test_name) {
//:HACK: there is no GroupTest::setLabel, so access parent::_label.
$this->_label = $test_name;
}
function addIgnoreFolder($ignorefolder) {
$this->ignorefolders[]=$ignorefolder;
}
function _recurseFolders($path) {
if ($this->showsearch) {
echo '<li>' . basename(realpath($path)) . '<ul>';
}
$files = scandir($path);
static $s_count = 0;
foreach ($files as $file) {
if ($file == '.' || $file == '..') {
continue;
}
$file_path = $path . '/' . $file;
if (is_dir($file_path)) {
if ($file != 'CVS' && !in_array($file_path, $this->ignorefolders)) {
$this->_recurseFolders($file_path);
}
} elseif (preg_match('/simpletest(\/|\\\\)test.*\.php$/', $file_path) ||
($this->thorough && preg_match('/simpletest(\/|\\\\)slowtest.*\.php$/', $file_path))) {
$s_count++;
// OK, found: this shows as a 'Notice' for any 'simpletest/test*.php' file.
$this->addTestCase(new FindFileNotice($file_path, 'Found unit test file, '. $s_count));
// addTestFile: Unfortunately this doesn't return fail/success (bool).
$this->addTestFile($file_path, true);
}
}
if ($this->showsearch) {
echo '</ul></li>';
}
return $s_count;
}
function findTestFiles($dir) {
if ($this->showsearch) {
echo '<p>Searching folder: ' . realpath($dir) . '</p><ul>';
}
$path = $dir;
$count = $this->_recurseFolders($path);
if ($count <= 0) {
$this->addTestCase(new BadAutoGroupTest($path, 'Search complete. No unit test files found'));
} else {
$this->addTestCase(new AutoGroupTestNotice($path, 'Search complete. Total unit test files found: '. $count));
}
if ($this->showsearch) {
echo '</ul>';
}
return $count;
}
function addTestFile($file, $internalcall = false) {
if ($this->showsearch) {
if ($internalcall) {
echo '<li><b>' . basename($file) . '</b></li>';
} else {
echo '<p>Adding test file: ' . realpath($file) . '</p>';
}
// Make sure that syntax errors show up suring the search, otherwise you often
// get blank screens because evil people turn down error_reporting elsewhere.
error_reporting(E_ALL);
}
if(!is_file($file) ){
parent::addTestCase(new BadTest($file, 'Not a file or does not exist'));
}
parent::addTestFile($file);
}
}
/* ======================================================================= */
// get_class_ex: Insert spaces to prettify the class-name.
function get_class_ex($object) {
return preg_replace('/(.?)([A-Z])/', '${1} ${2}', get_class($object));
}
/**
* A failing test base-class for when a test suite has NOT loaded properly.
* See class, simple_test.php: BadGroupTest.
* @package SimpleTestEx
*/
class BadTest {
var $label;
var $error;
function BadTest($label, $error) {
$this->label = $label;
$this->error = $error;
}
function getLabel() {
return $this->label;
}
function run(&$reporter) {
$reporter->paintGroupStart(basename(__FILE__), $this->getSize());
$reporter->paintFail(get_class_ex($this) .' [' . $this->getLabel() .
'] with error [' . $this->error . ']');
$reporter->paintGroupEnd($this->getLabel());
return $reporter->getStatus();
}
/**
* @return int the number of test cases starting.
*/
function getSize() {
return 0;
}
}
/**
* An informational notice base-class for when a test suite is being processed.
* See class, simple_test.php: BadGroupTest.
* @package SimpleTestEx
*/
class Notice {
var $label;
var $status;
function Notice($label, $error) {
$this->label = $label;
$this->status = $error;
}
function getLabel() {
return $this->label;
}
function run(&$reporter) {
$reporter->paintGroupStart(basename(__FILE__), $this->getSize());
$reporter->paintNotice(get_class_ex($this) .
' ['. $this->getLabel() .'] with status [' . $this->status . ']');
$reporter->paintGroupEnd($this->getLabel());
return $reporter->getStatus();
}
function getSize() {
return 0;
}
}
/**
* A failing folder test for when the test-user specifies an invalid directory
* (run.php?folder=woops).
* @package SimpleTestEx
*/
class BadFolderTest extends BadTest { }
/**
* A failing auto test for when no unit test files are found.
* @package SimpleTestEx
*/
class BadAutoGroupTest extends BadTest { }
/**
* Auto group test notices - 1. Search complete. 2. A test file has been found.
* @package SimpleTestEx
*/
class AutoGroupTestNotice extends Notice { }
class FindFileNotice extends Notice { }
?>
+111
View File
@@ -0,0 +1,111 @@
<?php
/**
* Run the unit tests.
*
* @copyright &copy; 2006 The Open University
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @version $Id$
* @package SimpleTestEx
*/
/** */
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/moodlelib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once('ex_simple_test.php');
require_once('ex_reporter.php');
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
/* The UNITTEST constant can be checked elsewhere if you need to know
* when your code is being run as part of a unit test. */
define('UNITTEST', true);
$langfile = 'simpletest';
// CGI arguments
$path = optional_param('path', null, PARAM_PATH);
$showpasses = optional_param('showpasses', false, PARAM_BOOL);
$showsearch = optional_param('showsearch', false, PARAM_BOOL);
$thorough = optional_param('thorough', false, PARAM_BOOL);
// Print the header.
$adminroot = admin_get_root();
admin_externalpage_setup('reportsimpletest', $adminroot);
$strtitle = get_string('unittests', $langfile);
admin_externalpage_print_header($adminroot);
if (!is_null($path)) {
// Create the group of tests.
$test =& new AutoGroupTest($showsearch, $thorough);
// OU specific. We use the _nonproject folder for stuff we want to
// keep in CVS, but which is not really relevant. It does no harm
// to leave this here.
$test->addIgnoreFolder($CFG->dirroot . '/_nonproject');
// Make the reporter, which is what displays the results.
$reporter = new ExHtmlReporter($showpasses);
if ($showsearch) {
print_heading('Searching for test cases');
}
flush();
// Work out what to test.
if (substr($path, 0, 1) == '/') {
$path = substr($path, 1);
}
$path = $CFG->dirroot . '/' . $path;
if (substr($path, -1) == '/') {
$path = substr($path, 0, -1);
}
$displaypath = substr($path, strlen($CFG->dirroot) + 1);
$ok = true;
if (is_file($path)) {
$test->addTestFile($path);
} else if (is_dir($path)){
$test->findTestFiles($path);
} else {
print_simple_box(get_string('pathdoesnotexist', $langfile, $path), '', '', '', '', 'errorbox');
$ok = false;
}
// If we have something to test, do it.
if ($ok) {
if ($path == $CFG->dirroot) {
$title = get_string('moodleunittests', $langfile, get_string('all', $langfile));
} else {
$title = get_string('moodleunittests', $langfile, $displaypath);
}
print_heading($title);
$test->run($reporter);
}
$formheader = get_string('retest', $langfile);
} else {
$displaypath = '';
$formheader = get_string('rununittests', $langfile);
}
// Print the form for adjusting options.
print_simple_box_start('center', '70%');
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="40" />';
echo '</p>';
echo '<input type="submit" value="' . get_string('runtests', $langfile) . '" />';
echo '</fieldset>';
echo '</form>';
print_simple_box_end();
// Footer.
admin_externalpage_print_footer($adminroot);
?>
+77
View File
@@ -0,0 +1,77 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->dirroot.'/course/report/stats/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportstats', $adminroot);
admin_externalpage_print_header($adminroot);
$courseid = optional_param('course', SITEID, PARAM_INT);
$report = optional_param('report', 0, PARAM_INT);
$time = optional_param('time', 0, PARAM_INT);
$mode = optional_param('mode', STATS_MODE_GENERAL, PARAM_INT);
$userid = optional_param('userid', 0, PARAM_INT);
$roleid = 0;
if ($report > 50) {
$roleid = substr($report,1);
$report = 5;
}
if ($report == STATS_REPORT_USER_LOGINS) {
$courseid = SITEID; //override
}
if ($mode == STATS_MODE_RANKED) {
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?time='.$time, '', 3, $adminroot);
}
if (!$course = get_record("course","id",$courseid)) {
error("That's an invalid course id");
}
if (!empty($userid)) {
if (!$user = get_record('user','id',$userid)) {
error("That's an invalid user id");
}
}
require_login();
if (empty($CFG->enablestats)) {
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));
add_to_log($course->id, "course", "report stats", "report/stats/index.php?course=$course->id", $course->id);
stats_check_uptodate($course->id);
// $strreports = get_string("reports");
// $strstats = get_string('stats');
//
// $menu = report_stats_mode_menu($course, $mode, $time); // add 4th $url parameter if uncommented!
//
//
// $crumb = "<a href=\"{$CFG->wwwroot}/admin\">".get_string('administration')."</a> ->
// <a href=\"{$CFG->wwwroot}/admin/report.php\">$strreports</a> ->
// $strstats";
// print_header("$course->shortname: $strstats", "$course->fullname",
// $crumb, '', '', true, '&nbsp;', $menu);
require_once($CFG->dirroot.'/course/report/stats/report.php');
admin_externalpage_print_footer($adminroot);
?>
+102
View File
@@ -0,0 +1,102 @@
<?php
/**
* this page defines what roles can access (grant user that role and override that roles'
* capabilities in different context. For example, we can say that Teachers can only grant
* student role or modify student role's capabilities. Note that you need both the right
* capability moodle/role:assign or moodle/role:manage and this database table roles_deny_grant
* to be able to grant roles. If a user has moodle/role:manage at site level assignment
* then he can modify the roles_allow_assign table via this interface.
*/
require_once('../../config.php');
/// check capabilities here
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('defineroles', $adminroot);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/role:manage', $sitecontext);
/// form processiong here
/// get all roles
$roles = get_all_roles();
if ($grant = data_submitted()) {
foreach ($grant as $grole => $val) {
if ($grole == 'dummy') {
continue;
}
$string = explode('_', $grole);
$temp[$string[1]][$string[2]] = 1; // if set, means can access
}
// if current assignment is in data_submitted, ignore, else, write deny into db
foreach ($roles as $srole) {
foreach ($roles as $trole) {
if (isset($temp[$srole->id][$trole->id])) { // if set, need to write to db
if (!$record = get_record('role_allow_assign', 'roleid', $srole->id, 'allowassign', $trole->id)) {
allow_assign($srole->id, $trole->id);
}
} else { //if set, means can access, attempt to remove it from db
delete_records('role_allow_assign', 'roleid', $srole->id, 'allowassign', $trole->id);
}
}
}
}
/// displaying form here
admin_externalpage_print_header($adminroot);
$currenttab='allowassign';
require_once('managetabs.php');
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->align[] = 'right';
/// get all the roles identifier
foreach ($roles as $role) {
$rolesname[] = format_string($role->name);
$roleids[] = $role->id;
$table->align[] = 'center';
$table->wrap[] = 'nowrap';
}
$table->head = array_merge(array(''), $rolesname);
foreach ($roles as $role) {
$beta = get_box_list($role->id, $roleids);
$table->data[] = array_merge(array(format_string($role->name)), $beta);
}
print_simple_box(get_string('configallowassign', 'admin'), 'center');
echo '<form action="allowassign.php" method="post">';
print_table($table);
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 '</div></form>';
admin_externalpage_print_footer($adminroot);
function get_box_list($roleid, $arraylist){
foreach ($arraylist as $targetid) {
if (get_record('role_allow_assign', 'roleid', $roleid, 'allowassign', $targetid)) {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" checked="checked"/>';
} else {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" />';
}
}
return $array;
}
?>
+99
View File
@@ -0,0 +1,99 @@
<?php
/**
* this page defines what roles can override (override roles in different context. For example,
* we can say that Admin can override teacher roles in a course
* To be able to override roles. If a user has moodle/role:override at context level
* and be in the roles_allow_override table.
*/
require_once('../../config.php');
/// check capabilities here
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('defineroles', $adminroot);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/role:manage', $sitecontext);
/// form processiong here
/// get all roles
$roles = get_all_roles();
if ($grant = data_submitted()) {
foreach ($grant as $grole => $val) {
if ($grole == 'dummy') {
continue;
}
$string = explode('_', $grole);
$temp[$string[1]][$string[2]] = 1; // if set, means can access
}
// if current assignment is in data_submitted, ignore, else, write deny into db
foreach ($roles as $srole) {
foreach ($roles as $trole) {
if (isset($temp[$srole->id][$trole->id])) { // if set, need to write to db
if (!$record = get_record('role_allow_override', 'roleid', $srole->id, 'allowoverride', $trole->id)) {
allow_override($srole->id, $trole->id);
}
} else { //if set, means can access, attempt to remove it from db
delete_records('role_allow_override', 'roleid', $srole->id, 'allowoverride', $trole->id);
}
}
}
}
/// displaying form here
admin_externalpage_print_header($adminroot);
$currenttab='allowoverride';
require_once('managetabs.php');
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->align[] = 'right';
/// get all the roles identifier
foreach ($roles as $role) {
$rolesname[] = format_string($role->name);
$roleids[] = $role->id;
$table->align[] = 'center';
$table->wrap[] = 'nowrap';
}
$table->head = array_merge(array(''), $rolesname);
foreach ($roles as $role) {
$beta = get_box_list($role->id, $roleids);
$table->data[] = array_merge(array(format_string($role->name)), $beta);
}
print_simple_box(get_string('configallowoverride', 'admin'), 'center');
echo '<form action="allowoverride.php" method="post">';
print_table($table);
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 '</div></form>';
admin_externalpage_print_footer($adminroot);
// returns array
function get_box_list($roleid, $arraylist){
foreach ($arraylist as $targetid) {
if (get_record('role_allow_override', 'roleid', $roleid, 'allowoverride', $targetid)) {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" checked="checked"/>';
} else {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" />';
}
}
return $array;
}
?>
+114
View File
@@ -0,0 +1,114 @@
<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 summary="" style="margin-left:auto;margin-right:auto" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<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 />
<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">
<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";
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
}
}
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select>
<br />
<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) {
getElementById('assignform').previoussearch.value=1;
getElementById('assignform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
if (!empty($searchtext)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
</table>
</div>
</form>
+297
View File
@@ -0,0 +1,297 @@
<?php // $Id$
// Script to assign users to contexts
require_once('../../config.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
require_once($CFG->libdir.'/adminlib.php');
define("MAX_USERS_PER_PAGE", 5000);
$contextid = required_param('contextid',PARAM_INT); // context id
$roleid = optional_param('roleid', 0, PARAM_INT); // required role id
$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);
$hidden = optional_param('hidden', 0, PARAM_BOOL); // whether this assignment is hidden
$timestart = optional_param('timestart', 0, PARAM_INT);
$timeend = optional_param('timened', 0, PARAM_INT);
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tabs
$errors = array();
$previoussearch = ($searchtext != '') or ($previoussearch) ? 1:0;
$baseurl = 'assign.php?contextid='.$contextid;
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
if (!empty($courseid)) {
$baseurl .= '&amp;courseid='.$courseid;
}
if (! $context = get_context_instance_by_id($contextid)) {
error("Context ID was incorrect (can't find it)");
}
$inmeta = 0;
if ($context->contextlevel == CONTEXT_COURSE) {
$courseid = $context->instanceid;
if ($course = get_record('course', 'id', $courseid)) {
$inmeta = $course->metacourse;
} else {
error('Invalid course id');
}
} else if (!empty($courseid)){ // we need this for user tabs in user context
if (!$course = get_record('course', 'id', $courseid)) {
error('Invalid course id');
}
} else {
$courseid = SITEID;
$course = clone($SITE);
}
require_login($course);
if ($context->contextlevel == CONTEXT_COURSE) {
require_login($context->instanceid);
} else {
require_login();
}
require_capability('moodle/role:assign', $context);
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
/// 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');
/// Make sure this user can assign that role
if ($roleid) {
if (!user_can_assign($context, $roleid)) {
error ('you can not override this role in this context');
}
}
if ($userid) {
$user = get_record('user', 'id', $userid);
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
}
/// Print the header and tabs
if ($context->contextlevel == CONTEXT_USER) {
/// course header
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&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&amp;course=$courseid\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
$showroles = 1;
$currenttab = 'assign';
include_once($CFG->dirroot.'/user/tabs.php');
} else if ($context->contextlevel == CONTEXT_SYSTEM) {
$adminroot = admin_get_root();
admin_externalpage_setup('assignroles', $adminroot);
admin_externalpage_print_header($adminroot);
} 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()) {
if ($add and !empty($frm->addselect) and confirm_sesskey()) {
$timemodified = time();
foreach ($frm->addselect as $adduser) {
if (!$adduser = clean_param($adduser, PARAM_INT)) {
continue;
}
$allow = true;
if ($inmeta) {
if (has_capability('moodle/course:managemetacourse', $context, $adduser)) {
//ok
} else {
$managerroles = get_roles_with_capability('moodle/course:managemetacourse', CAP_ALLOW, $context);
if (!empty($managerroles) and !array_key_exists($roleid, $managerroles)) {
$erruser = get_record('user', 'id', $adduser, '','','','', 'id, firstname, lastname');
$errors[] = get_string('metaassignerror', 'role', fullname($erruser));
$allow = false;
}
}
}
if ($allow) {
if (! role_assign($roleid, $adduser, 0, $context->id, $timestart, $timeend, $hidden)) {
$errors[] = "Could not add user with id $adduser to this role!";
}
}
}
} 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) {
sync_metacourse($courseid);
$newroles = get_user_roles($context, $removeuser, false);
if (!empty($newroles) and !array_key_exists($roleid, $newroles)) {
$erruser = get_record('user', 'id', $removeuser, '','','','', 'id, firstname, lastname');
$errors[] = get_string('metaunassignerror', 'role', fullname($erruser));
$allow = false;
}
}
}
} else if ($showall) {
$searchtext = '';
$previoussearch = 0;
}
}
if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
print_heading_with_help(get_string('frontpageroles', 'admin'), 'assignroles');
} else {
print_heading_with_help(get_string('assignroles', 'role'), 'assignroles');
}
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, r.hidden')) {
$contextusers = array();
}
$select = "username <> 'guest' AND deleted = 0 AND confirmed = 1";
$usercount = count_records_select('user', $select) - count($contextusers);
$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%') ";
}
$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 '<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');
print_simple_box_end();
if (!empty($errors)) {
$msg = '<p>';
foreach ($errors as $e) {
$msg .= $e.'<br />';
}
$msg .= '</p>';
print_simple_box_start('center');
notify($msg);
print_simple_box_end();
}
} else { // Print overview table
// sync metacourse enrolments if needed
if ($inmeta) {
sync_metacourse($course);
}
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$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);
$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 or ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID)) {
admin_externalpage_print_footer($adminroot);
} else {
print_footer($course);
}
?>
+217
View File
@@ -0,0 +1,217 @@
<?php //$Id$
switch ($action) {
case 'add':
$submitlabel = get_string('addrole', 'role');
break;
case 'edit':
default:
$submitlabel = get_string('savechanges');
}
if ($action == 'view') {
?>
<?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); } ?>" />
</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_with_help(get_string('permissions','role'), 'permissions');
$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" 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
// init these 2
$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="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
$contextlevel = $capability->contextlevel;
$component = $capability->component;
if (empty($errors)) {
// check the capability override for this cap, this role in this context
$localoverride = get_local_override($roleid, $sitecontext->id, $capability->name);
} else {
$localoverride = new object();
$localoverride->permission = $role->{$capability->name};
}
$disabled = ($action != 'edit' and $action != 'add') ? ' disabled="disabled" ' : '';
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$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 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 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 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 onclick="this.target=\'docspopup\'" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_spam.gif" alt="'.get_string('riskspamshort', 'admin').'" /></a>';
$rowclasses .= ' riskspam';
}
$riskinfo .= '</td>';
$isinherit = (!isset($defaultcaps[$capability->name]) or $defaultcaps[$capability->name] == CAP_INHERIT) ? 'capdefault' : '';
$isallow = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_ALLOW) ? 'capdefault' : '';
$isprevent = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PREVENT) ? 'capdefault' : '';
$isprohibit = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PROHIBIT) ? 'capdefault' : '';
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name"><span class="cap-desc"><a 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>
<?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') ?>" />
</div>
<?php } ?>
</form>
+592
View File
@@ -0,0 +1,592 @@
<?php //$Id$
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('defineroles', $adminroot);
$roleid = optional_param('roleid', 0, PARAM_INT); // if set, we are editing a role
$name = optional_param('name', '', PARAM_MULTILANG); // new role name
$shortname = optional_param('shortname', '', PARAM_RAW); // new role shortname, special cleaning before storage
$description = optional_param('description', '', PARAM_CLEAN); // new role desc
$action = optional_param('action', '', PARAM_ALPHA);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$cancel = optional_param('cancel', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/role:manage', $sitecontext);
if ($cancel) {
redirect('manage.php');
}
$errors = array();
$newrole = false;
$roles = get_all_roles();
$rolescount = count($roles);
/// fix sort order if needed
$rolesort = array();
$i = 0;
foreach ($roles as $rolex) {
$rolesort[$i] = $rolex->id;
if ($rolex->sortorder != $i) {
$r = new object();
$r->id = $rolex->id;
$r->sortorder = $i;
update_record('role', $r);
$roles[$rolex->id]->sortorder = $i;
}
$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) {
case 'add':
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');
} else if (count_records('role', 'name', $name)) {
$errors['name'] = get_string('errorexistsrolename', 'role');
}
if (empty($shortname)) {
$errors['shortname'] = get_string('errorbadroleshortname', 'role');
} else if (count_records('role', 'shortname', $shortname)) {
$errors['shortname'] = get_string('errorexistsroleshortname', 'role');
}
if (empty($errors)) {
$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->description = $description;
$newrole->legacytype = $legacytype;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($sitecontext); // capabilities applicable in this context
foreach ($capabilities as $cap) {
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)) {
continue;
}
if (empty($errors)) {
assign_capability($capname, $value, $newroleid, $sitecontext->id);
} else {
$newrole->$capname = $value;
}
}
if (empty($errors)) {
redirect('manage.php');
}
}
break;
case 'edit':
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
$legacyroles = get_legacy_roles();
if (!array_key_exists($legacytype, $legacyroles)) {
$legacytype = '';
}
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
} else if ($rs = get_records('role', 'name', $name)) {
unset($rs[$roleid]);
if (!empty($rs)) {
$errors['name'] = get_string('errorexistsrolename', 'role');
}
}
if (empty($shortname)) {
$errors['shortname'] = get_string('errorbadroleshortname', 'role');
} else if ($rs = get_records('role', 'shortname', $shortname)) {
unset($rs[$roleid]);
if (!empty($rs)) {
$errors['shortname'] = get_string('errorexistsroleshortname', 'role');
}
}
if (!empty($errors)) {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
$newrole->legacytype = $legacytype;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($sitecontext); // capabilities applicable in this context
foreach ($capabilities as $cap) {
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)) {
continue;
}
if (!empty($errors)) {
$newrole->$capname = $value;
continue;
}
// edit default caps
$SQL = "SELECT * FROM {$CFG->prefix}role_capabilities
WHERE roleid = $roleid AND capability = '$capname'
AND contextid = $sitecontext->id";
$localoverride = get_record_sql($SQL);
if ($localoverride) { // update current overrides
if ($value == CAP_INHERIT) { // inherit = delete
unassign_capability($capname, $roleid, $sitecontext->id);
} else {
$localoverride->permission = $value;
$localoverride->timemodified = time();
$localoverride->modifierid = $USER->id;
update_record('role_capabilities', $localoverride);
}
} else { // insert a record
if ($value != CAP_INHERIT) {
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);
}
} else if (confirm_sesskey()){
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = (int)count_records('role_assignments', 'roleid', $roleid);
notice_yesno(get_string('deleterolesure', 'role', $a), 'manage.php', 'manage.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
redirect('manage.php');
break;
case 'moveup':
if (array_key_exists($roleid, $roles) and confirm_sesskey()) {
$role = $roles[$roleid];
if ($role->sortorder > 0) {
$above = $roles[$rolesort[$role->sortorder - 1]];
if (!switch_roles($role, $above)) {
error("Cannot move role with ID $roleid");
}
}
}
redirect('manage.php');
break;
case 'movedown':
if (array_key_exists($roleid, $roles) and confirm_sesskey()) {
$role = $roles[$roleid];
if ($role->sortorder + 1 < $rolescount) {
$below = $roles[$rolesort[$role->sortorder + 1]];
if (!switch_roles($role, $below)) {
error("Cannot move role with ID $roleid");
}
}
}
redirect('manage.php');
break;
case 'duplicate':
if (!array_key_exists($roleid, $roles)) {
redirect('manage.php');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
//ok - lets duplicate!
} else {
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'duplicate', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$optionsno = array('action'=>'view', 'roleid'=>$roleid);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
notice_yesno(get_string('duplicaterolesure', 'role', $a), 'manage.php', 'manage.php', $optionsyes, $optionsno, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
// duplicate current role
$sourcerole = get_record('role','id',$roleid);
$fullname = $sourcerole->name;
$shortname = $sourcerole->shortname;
$currentfullname = "";
$currentshortname = "";
$counter = 0;
// find a name for the duplicated role
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
admin_externalpage_print_header($adminroot);
$currenttab = 'manage';
include_once('managetabs.php');
if (($roleid and ($action == 'view' or $action == 'edit')) or $action == 'add') { // view or edit role details
if ($action == 'add') {
$roleid = 0;
if (empty($errors) or empty($newrole)) {
$role = new object();
$role->name = '';
$role->shortname = '';
$role->description = '';
$role->legacytype = '';
} else {
$role = stripslashes_safe($newrole);
}
} else if ($action == 'edit' and !empty($errors) and !empty($newrole)) {
$role = stripslashes_safe($newrole);
} else {
if(!$role = get_record('role', 'id', $roleid)) {
error('Incorrect role ID!');
}
$role->legacytype = get_legacy_type($role->id);
}
foreach ($roles as $rolex) {
$roleoptions[$rolex->id] = strip_tags(format_string($rolex->name));
}
// this is the array holding capabilities of this role sorted till this context
$r_caps = role_context_capabilities($roleid, $sitecontext);
// this is the available capabilities assignable in this context
$capabilities = fetch_context_capabilities($sitecontext);
$usehtmleditor = can_use_html_editor();
switch ($action) {
case 'add':
print_heading_with_help(get_string('addrole', 'role'), 'roles');
break;
case 'view':
print_heading_with_help(get_string('viewrole', 'role'), 'roles');
break;
case 'edit':
print_heading_with_help(get_string('editrole', 'role'), 'roles');
break;
}
echo '<div class="selector">';
if ($action == 'view') {
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>';
$lang = str_replace('_utf8', '', current_language());
print_simple_box_start('center');
include_once('manage.html');
print_simple_box_end();
if ($usehtmleditor) {
use_html_editor('description');
}
} else {
print_heading_with_help(get_string('roles', 'role'), 'roles');
$table = new object;
$table->tablealign = 'center';
$table->align = array('right', 'left', 'left', 'left');
$table->wrap = array('nowrap', '', 'nowrap','nowrap');
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->data = array();
$table->head = array(get_string('name'),
get_string('description'),
get_string('shortname'),
get_string('edit'));
/*************************
* List all current roles *
**************************/
foreach ($roles as $role) {
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
$row = array();
$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&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] .= '<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&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" class="iconsmall" alt="" /> ';
}
$table->data[] = $row;
}
print_table($table);
$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);
die;
/// ================ some internal functions ====================////
function switch_roles($first, $second) {
$status = true;
//first find temorary sortorder number
$tempsort = count_records('role') + 3;
while (get_record('role','sortorder', $tempsort)) {
$tempsort += 3;
}
$r1 = new object();
$r1->id = $first->id;
$r1->sortorder = $tempsort;
$r2 = new object();
$r2->id = $second->id;
$r2->sortorder = $first->sortorder;
if (!update_record('role', $r1)) {
debugging("Can not update role with ID $r1->id!");
$status = false;
}
if (!update_record('role', $r2)) {
debugging("Can not update role with ID $r2->id!");
$status = false;
}
$r1->sortorder = $second->sortorder;
if (!update_record('role', $r1)) {
debugging("Can not update role with ID $r1->id!");
$status = false;
}
return $status;
}
// duplicates all the base definitions of a role
function role_cap_duplicate($sourcerole, $targetrole) {
global $CFG;
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$caps = get_records_sql("SELECT * FROM {$CFG->prefix}role_capabilities
WHERE roleid = $sourcerole->id
AND contextid = $systemcontext->id");
// adding capabilities
foreach ($caps as $cap) {
unset($cap->id);
$cap->roleid = $targetrole;
insert_record('role_capabilities', $cap);
}
}
?>
+20
View File
@@ -0,0 +1,20 @@
<?php
// this page deals with the 2 tabs for manage.php and grant.php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
$toprow = array();
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'),'', true);
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowassign.php', get_string('allowassign', 'role'));
$toprow[] = new tabobject('allowoverride', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowoverride.php', get_string('allowoverride', 'role'));
$tabs = array($toprow);
print_tabs($tabs, $currenttab);
?>
+145
View File
@@ -0,0 +1,145 @@
<?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" 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
// init these 2
$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="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
$contextlevel = $capability->contextlevel;
$component = $capability->component;
// check the capability override for this cap, this role in this context
if (isset($localoverrides[$capability->name])) {
$localpermission = $localoverrides[$capability->name]->permission;
} else {
$localpermission = 0; // Just inherit
}
if (isset($r_caps[$capability->name])) {
$isallow = $r_caps[$capability->name] > 0;
$isprevent = $r_caps[$capability->name] < 0 && $r_caps[$capability->name] > -500;
$isprohibit = $r_caps[$capability->name] <= -500;
} else {
$isallow = 0;
$isprevent = 0;
$isprohibit = 0;
}
$isdisabled = $isprohibit;
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$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 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 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 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 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"><span class="cap-desc"><a onclick="this.target='docspopup'" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></span></td>
<td class="inherit">
<input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="0"
<?php
if ($localpermission == CAP_INHERIT) {echo 'checked="checked" ';}
if ($isdisabled) {echo 'disabled="disabled"';}?> />
</td>
<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 ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="prevent <?php if ($isprevent) {echo ' capcurrent';} ?>">
<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 ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="prohibit <?php if ($isprohibit) {echo ' capcurrent';} ?>">
<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 ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
</table>
<div class="submit buttons">
<input type="submit" value="<?php print_string('savechanges') ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
</div>
</form>
+233
View File
@@ -0,0 +1,233 @@
<?php //$Id$
require_once('../../config.php');
$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
$cancel = optional_param('cancel', 0, PARAM_BOOL);
if (!$context = get_record('context', 'id', $contextid)) {
error('Bad context ID');
}
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM)) {
error('No site ID');
}
if ($context->id == $sitecontext->id) {
error('Can not override base role capabilities');
}
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 = clone($SITE);
$courseid = SITEID;
}
require_login($course);
$baseurl = 'override.php?contextid='.$context->id;
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
if ($courseid != SITEID) {
$baseurl .= '&amp;courseid='.$courseid;
}
if ($cancel) {
redirect($baseurl);
}
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
/// Get some language strings
$strroletooverride = get_string('roletooverride', 'role');
$stroverrideusers = get_string('overrideusers', 'role');
$straction = get_string('overrideroles', 'role');
$strcurrentrole = get_string('currentrole', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strparticipants = get_string('participants');
/// Make sure this user can override that role
if ($roleid) {
if (!user_can_override($context, $roleid)) {
error ('you can not override this role in this context');
}
}
if ($userid) {
$user = get_record('user', 'id', $userid);
$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);
$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)) {
continue;
}
if (isset($localoverrides[$capname])) { // Something exists, so update it
if ($value == CAP_INHERIT) { // inherit = delete
delete_records('role_capabilities', 'roleid', $roleid, 'contextid', $context->id,
'capability', $capname);
} else {
$localoverride = new object();
$localoverride->id = $localoverrides[$capname]->id;
$localoverride->permission = $value;
$localoverride->timemodified = time();
$localoverride->modifierid = $USER->id;
if (!update_record('role_capabilities', $localoverride)) {
error('Could not update a capability!');
}
}
} else { // insert a record
if ($value != CAP_INHERIT) { // Ignore inherits
$localoverride = new object();
$localoverride->capability = $capname;
$localoverride->contextid = $context->id;
$localoverride->roleid = $roleid;
$localoverride->permission = $value;
$localoverride->timemodified = time();
$localoverride->modifierid = $USER->id;
if (!insert_record('role_capabilities', $localoverride)) {
error('Could not insert a capability!');
}
}
}
}
redirect($baseurl);
}
/// Print the header and tabs
if ($context->contextlevel == CONTEXT_USER) {
/// course header
if ($course->id != 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&amp;course=$course->id\">$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&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');
}
print_heading_with_help(get_string('overrides', 'role'), 'overrides');
if ($roleid) {
/// prints a form to swap roles
echo '<div class="selector">';
echo $strcurrentcontext.': '.print_context_name($context).'<br/>';
$overridableroles = array('0'=>get_string('listallroles', 'role').'...') + $overridableroles;
popup_form("$CFG->wwwroot/$CFG->admin/roles/override.php?userid=$userid&amp;courseid=$courseid&amp;contextid=$contextid&amp;roleid=",
$overridableroles, 'switchrole', $roleid, '', '', '', false, 'self', $strroletooverride);
echo '</div>';
$parentcontexts = get_parent_contexts($context);
if (!empty($parentcontexts)) {
$parentcontext = array_shift($parentcontexts);
$parentcontext = get_context_instance_by_id($parentcontext);
} else {
$parentcontext = $context; // site level in override??
}
$r_caps = role_context_capabilities($roleid, $parentcontext);
$localoverrides = get_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id",
'', 'capability, permission, id');
$lang = str_replace('_utf8', '', current_language());
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);
}
} else { // Print overview table
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$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");
$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);
}
if ($context->contextlevel == CONTEXT_SYSTEM or ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID)) {
admin_externalpage_print_footer($adminroot);
} else {
print_footer($course);
}
?>
+193
View File
@@ -0,0 +1,193 @@
<?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) {
case CONTEXT_SYSTEM:
$stradministration = get_string('administration');
print_header($SITE->fullname, "$SITE->fullname","<a href=\"../index.php\">$stradministration</a> -> $straction");
break;
case CONTEXT_PERSONAL:
break;
case CONTEXT_USER:
print_header();
break;
case CONTEXT_COURSECAT:
$category = get_record('course_categories', 'id', $context->instanceid);
$strcategories = get_string("categories");
$strcategory = get_string("category");
$strcourses = get_string("courses");
print_header("$SITE->shortname: $category->name", "$SITE->fullname: $strcourses",
"<a href=\"$CFG->wwwroot/course/index.php\">$strcategories</a> -> <a href=\"$CFG->wwwroot/course/category.php?id=$category->id\">$category->name</a> -> $straction", "", "", true);
break;
case CONTEXT_COURSE:
if ($context->instanceid != SITEID) {
$streditcoursesettings = get_string("editcoursesettings");
$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:
break;
case CONTEXT_MODULE:
// get module type?
if (!$cm = get_record('course_modules','id',$context->instanceid)) {
error('Bad course module ID');
}
if (!$module = get_record('modules','id',$cm->module)) { //$module->name;
error('Bad module ID');
}
if (!$course = get_record('course','id',$cm->course)) {
error('Bad course ID');
}
if (!$instance = get_record($module->name, 'id', $cm->instance)) {
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);
$strmodulenameplural = get_string("modulenameplural", $module->name);
if ($module->name == "label") {
$focuscursor = "";
} else {
$focuscursor = "form.name";
}
print_header_simple($streditinga, '',
"<a href=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</a> ->
$strnav <a href=\"$CFG->wwwroot/course/mod.php?update=$cm->id&amp;sesskey=".sesskey()."\">$streditinga</a> -> $straction", $focuscursor, "", false);
break;
case CONTEXT_BLOCK:
if ($blockinstance = get_record('block_instance', 'id', $context->instanceid)) {
if ($block = get_record('block', 'id', $blockinstance->blockid)) {
$blockname = print_context_name($context);
$navigation = $blockname. ' -> '.$straction;
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";
}
print_header("$straction: $blockname", $course->fullname, $navigation);
}
break;
case 'blog-view':
$strblogs = get_string('blogs','blog');
$navigation = '<a href="'.$CFG->wwwroot.'/blog/index.php">'.
$strblogs.'</a> -> '.$navigation;
print_header("$straction: $strblogs", $SITE->fullname, $navigation);
break;
default:
print_header("$straction: $blockname", $SITE->fullname, $navigation);
break;
}
}
}
break;
default:
error ('This is an unknown context (' . $context->contextlevel . ') in admin/roles/tabs.php!');
return false;
}
}
if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything except SYSTEM context
if ($context->contextlevel == CONTEXT_MODULE) { // only show update button if module?
$toprow[] = new tabobject('update', $CFG->wwwroot.'/course/mod.php?update='.
$context->instanceid.'&amp;return=true&amp;sesskey='.sesskey(), get_string('update'));
}
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
$context->id, get_string('roles'));
if (!empty($tabsmode)) {
if (!empty($assignableroles)) {
$secondrow[] = new tabobject('assign',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id,
get_string('assignroles', 'role'),
get_string('showallroles', 'role'),
true);
}
if (!empty($overridableroles)) {
$secondrow[] = new tabobject('override',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$context->id,
get_string('overrideroles', 'role'),
get_string('showallroles', 'role'),
true);
}
$inactive[] = 'roles';
$activetwo = array('roles');
$currenttab = $tabsmode;
} else {
$inactive[] = '';
$activetwo = array();
}
/// Here other core tabs should go (always calling tabs.php files)
/// All the logic to decide what to show must be self-cointained in the tabs file
/// ej.:
/// include_once($CFG->dirroot . '/grades/tabs.php');
/// Finally, we support adding some 'on-the-fly' tabs here
/// All the logic to decide what to show must be self-cointained in the tabs file
if (isset($CFG->extratabs) && !empty($CFG->extratabs)) {
if ($extratabs = explode(',', $CFG->extratabs)) {
asort($extratabs);
foreach($extratabs as $extratab) {
/// Each extra tab mus be one $CFG->dirroot relative file
if (file_exists($CFG->dirroot . '/' . $extratab)) {
include_once($CFG->dirroot . '/' . $extratab);
}
}
}
}
if (!empty($secondrow)) {
$tabs = array($toprow, $secondrow);
} else {
$tabs = array($toprow);
}
print_tabs($tabs, $currenttab, $inactive, $activetwo);
}
?>
+157
View File
@@ -0,0 +1,157 @@
<?php // $Id$
// searches for admin settings
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$query = trim(stripslashes_safe(required_param('query', PARAM_NOTAGS))); // Search string
$adminroot = admin_get_root();
admin_externalpage_setup('search', $adminroot); // now hidden page
$CFG->adminsearchquery = $query; // So we can reference it in search boxes later in this invocation
// now we'll deal with the case that the admin has submitted the form with changed settings
$statusmsg = '';
if ($data = data_submitted()) {
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$changedsettings = search_settings(admin_get_root(), $query);
$errors = '';
foreach($changedsettings as $changedsetting) {
if (!isset($unslashed['s_' . $changedsetting->name])) {
$unslashed['s_' . $changedsetting->name] = ''; // needed for checkboxes
}
$errors .= $changedsetting->write_setting($unslashed['s_' . $changedsetting->name]);
}
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
}
if (empty($errors)) {
$statusmsg = get_string('changessaved');
} else {
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
}
// 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);
if ($statusmsg != '') {
notify ($statusmsg);
}
$resultshtml = search_settings_html(admin_get_root(), $query);
echo '<form action="search.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<input type="hidden" name="query" value="' . s($query) . '" />';
echo '</div>';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
if ($resultshtml != '') {
echo $resultshtml;
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
} else {
echo get_string('noresults','admin');
}
echo '</fieldset>';
echo '</form>';
admin_externalpage_print_footer($adminroot);
/**
* Find settings using a query.
*
* @param string &$node The node at which to start searching. Should be $ADMIN for all external calls to this function.
* @param string $query The search string.
* @return array An array containing admin_setting objects that match $query.
*/
function search_settings(&$node, $query) {
if (is_a($node, 'admin_category')) {
$return = array();
$entries = array_keys($node->children);
foreach ($entries as $entry) {
$return = array_merge($return, search_settings($node->children[$entry], $query));
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$return = array();
foreach ($node->settings as $setting) {
if (stristr($setting->name,$query) || stristr($setting->visiblename,$query) || stristr($setting->description,$query)) {
$return[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
return $return;
}
return array();
}
function search_settings_html(&$node, $query) {
global $CFG;
if ($query == ''){
return '';
}
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
foreach ($entries as $entry) {
$return .= search_settings_html($node->children[$entry], $query);
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$foundsettings = array();
foreach ($node->settings as $setting) {
if (stristr($setting->name,$query) || stristr($setting->visiblename,$query) || stristr($setting->description,$query)) {
$foundsettings[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
$return = '';
if (count($foundsettings) > 0) {
$return .= print_heading(get_string('searchresults','admin').' - '. '<a href="' . $CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $node->name . '">' . $node->visiblename . '</a>', '', 2, 'main', true);
$return .= '<fieldset class="adminsettings">' . "\n";
foreach ($foundsettings as $foundsetting) {
$return .= '<div class="clearer"><!-- --></div>' . "\n";
$return .= highlight($query,$foundsetting->output_html());
}
$return .= '</fieldset>';
}
return $return;
}
return '';
}
?>
+203
View File
@@ -0,0 +1,203 @@
<?php // $Id$
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/pagelib.php');
if ($site = get_site()) {
require_login();
}
page_map_class(PAGE_ADMIN, 'page_admin');
$PAGE = page_create_object(PAGE_ADMIN, 0); // there must be any constant id number
$section = optional_param('section', '', PARAM_ALPHAEXT);
$PAGE->init_extra($section); // hack alert!
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
$return = optional_param('return','', PARAM_ALPHA);
if (!isset($USER->adminediting)) {
$USER->adminediting = false;
}
if ($PAGE->user_allowed_editing()) {
if ($adminediting == 1) {
$USER->adminediting = true;
} elseif ($adminediting == 0) {
$USER->adminediting = false;
}
}
$adminroot = admin_get_root();
$root = $adminroot->locate($PAGE->section);
if (!is_a($root, 'admin_settingpage')) {
error(get_string('sectionerror', 'admin'));
die;
}
if (!($root->check_access())) {
error(get_string('accessdenied', 'admin'));
die;
}
$CFG->pagepath = 'admin/setting/'.$section;
/// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
$statusmsg = '';
if ($data = data_submitted()) {
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$unslashed = (array)stripslashes_recursive($data);
$errors = $root->write_settings($unslashed);
//force logout if dbsession setting changes
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
}
if (empty($errors)) {
switch ($return) {
case 'site':
redirect("$CFG->wwwroot/");
case 'admin':
redirect("$CFG->wwwroot/$CFG->admin/");
default:
$statusmsg = get_string('changessaved');
}
} else {
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
}
// now update $SITE - it might have been changed
$SITE = get_record('course', 'id', $SITE->id);
$COURSE = clone($SITE);
}
/// print header stuff ------------------------------------------------------------
// header must be printed after the redirects and require_logout
if (empty($SITE->fullname)) {
print_header();
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);
$preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
BLOCK_L_MAX_WIDTH);
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
$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">';
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>';
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($THEME->roundcorners)) {
echo '</div></div></div>';
echo '<div class="bb"><div></div></div>';
}
echo '</td>';
break;
case 'right':
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
if (!empty($THEME->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)) {
use_html_editor();
}
print_footer();
?>
+114
View File
@@ -0,0 +1,114 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "appearance" category
$ADMIN->add('appearance', new admin_category('themes', get_string('themes')));
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('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));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
# for CALENDAR_TF_12 and CALENDAR_TF_24 ...
require_once($CFG->dirroot . '/calendar/lib.php');
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
$temp->add(new admin_setting_configselect('calendar_site_timeformat', get_string('pref_timeformat', 'calendar'), get_string('explain_site_timeformat', 'calendar'), '0',
array( 0 => get_string('default', 'calendar'),
CALENDAR_TF_12 => get_string('timeformat_12', 'calendar'),
CALENDAR_TF_24 => get_string('timeformat_24', 'calendar')
)));
$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
array(
0 => get_string('sunday', 'calendar'),
1 => get_string('monday', 'calendar'),
2 => get_string('tuesday', 'calendar'),
3 => get_string('wednesday', 'calendar'),
4 => get_string('thursday', 'calendar'),
5 => get_string('friday', 'calendar'),
6 => get_string('saturday', 'calendar')
)));
$temp->add(new admin_setting_special_calendar_weekend());
$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
$ADMIN->add('appearance', $temp);
// "filtersettings" settingpage
$temp = new admin_settingpage('filtersettings', get_string('filtersettings', 'admin'));
$temp->add(new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
86400 => get_string('numdays','',1),
43200 => get_string('numhours','',12),
10800 => get_string('numhours','',3),
7200 => get_string('numhours','',2),
3600 => get_string('numhours','',1),
2700 => get_string('numminutes','',45),
1800 => get_string('numminutes','',30),
900 => get_string('numminutes','',15),
600 => get_string('numminutes','',10),
540 => get_string('numminutes','',9),
480 => get_string('numminutes','',8),
420 => get_string('numminutes','',7),
360 => get_string('numminutes','',6),
300 => get_string('numminutes','',5),
240 => get_string('numminutes','',4),
180 => get_string('numminutes','',3),
120 => get_string('numminutes','',2),
60 => get_string('numminutes','',1),
30 => get_string('numseconds','',30),
0 => get_string('no'))));
$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
'1' => get_string('allfiles'),
'2' => get_string('htmlfilesonly'))));
$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// "htmleditor" settingpage
$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_special_editorfontlist());
$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
$temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
$temp->add(new admin_setting_special_editordictionary());
}
$temp->add(new admin_setting_special_editorhidebuttons());
$ADMIN->add('appearance', $temp);
// "documentation" settingpage
$temp = new admin_settingpage('documentation', get_string('moodledocs'));
$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
$ADMIN->add('appearance', $temp);
$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// new CFG variable for 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"));
?>
+50
View File
@@ -0,0 +1,50 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "courses" category
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
// "courserequests" settingpage
$temp = new admin_settingpage('courserequest', get_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests', get_string('enablecourserequests', 'admin'), get_string('configenablecourserequests', 'admin'), 0));
require_once($CFG->dirroot.'/course/lib.php');
$temp->add(new admin_setting_configselect('defaultrequestcategory', get_string('defaultrequestcategory', 'admin'), get_string('configdefaultrequestcategory', 'admin'), 1, make_categories_options()));
$ADMIN->add('courses', $temp);
// "backups" settingpage
$temp = new admin_settingpage('backups', get_string('backups','admin'));
$temp->add(new admin_setting_backupcheckbox('backup_sche_modules', get_string('includemodules'), get_string('backupincludemoduleshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_withuserdata', get_string('includemoduleuserdata'), get_string('backupincludemoduleuserdatahelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_metacourse', get_string('metacourse'), get_string('backupmetacoursehelp'), 0));
$temp->add(new admin_setting_backupselect('backup_sche_users', get_string('users'), get_string('backupusershelp'), 0, array(0 => get_string('all'),
1 => get_string('course'))));
$temp->add(new admin_setting_backupcheckbox('backup_sche_logs', get_string('logs'), get_string('backuplogshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_userfiles', get_string('userfiles'), get_string('backupuserfileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_coursefiles', get_string('coursefiles'), get_string('backupcoursefileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0));
$temp->add(new admin_setting_backupselect('backup_sche_keep', get_string('keep'), get_string('backupkeephelp'), 1, array(0 => get_string('all'),
1 => '1',
2 => '2',
5 => '5',
10 => '10',
20 => '20',
30 => '30',
40 => '40',
50 => '50',
100 => '100',
200 => '200',
300 => '300',
400 => '400',
500 => '500')));
$temp->add(new admin_setting_backupcheckbox('backup_sche_active', get_string('active'), get_string('backupactivehelp'), 0));
$temp->add(new admin_setting_special_backupdays());
$temp->add(new admin_setting_special_backuptime());
$temp->add(new admin_setting_special_backupsaveto());
$ADMIN->add('courses', $temp);
?>
+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));
?>
+22
View File
@@ -0,0 +1,22 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "appearance" category
// "languageandlocation" settingpage
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
// 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"));
?>
+28
View File
@@ -0,0 +1,28 @@
<?php // $Id$
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', get_string('locationsettings', 'admin'));
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options = get_list_of_timezones();
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
$options[0] = get_string('choose') .'...';
$temp->add(new admin_setting_configselect('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0, $options));
$iplookups = array();
if ($plugins = get_list_of_plugins('iplookup')) {
foreach ($plugins as $plugin) {
$iplookups[$plugin] = $plugin;
}
}
$temp->add(new admin_setting_configselect('iplookup', get_string('iplookup', 'admin'), get_string('configiplookup', 'admin'), 'hostip', $iplookups));
$ADMIN->add('location', $temp);
$ADMIN->add('location', new admin_externalpage('timezoneimport', get_string('updatetimezones', 'admin'), "$CFG->wwwroot/$CFG->admin/timezoneimport.php"));
?>
+22
View File
@@ -0,0 +1,22 @@
<?php // $Id$
// * 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'));
?>
+98
View File
@@ -0,0 +1,98 @@
<?php // $Id$
// "sitepolicies" settingpage
$temp = new admin_settingpage('sitepolicies', get_string('sitepolicies', 'admin'));
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$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));
$temp->add(new admin_setting_configcheckbox('allowobjectembed', get_string('allowobjectembed', 'admin'), get_string('configallowobjectembed', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enabletrusttext', get_string('enabletrusttext', 'admin'), get_string('configenabletrusttext', 'admin'), 0));
$temp->add(new admin_setting_configselect('maxeditingtime', get_string('maxeditingtime','admin'), get_string('configmaxeditingtime','admin'), 1800,
array(60 => get_string('numminutes', '', 1),
300 => get_string('numminutes', '', 5),
900 => get_string('numminutes', '', 15),
1800 => get_string('numminutes', '', 30),
2700 => get_string('numminutes', '', 45),
3600 => get_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnamedisplay', 'admin'), get_string('configfullnamedisplay', 'admin'),
'firstname lastname', array('language' => get_string('language'),
'firstname lastname' => get_string('firstname') . ' + ' . get_string('lastname'),
'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
4 => get_string('siteblogs','blog'),
3 => get_string('courseblogs','blog'),
2 => get_string('groupblogs','blog'),
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('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);
// "httpsecurity" settingpage
$temp = new admin_settingpage('httpsecurity', get_string('httpsecurity', 'admin'));
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$ADMIN->add('security', $temp);
// "modulesecurity" settingpage
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses',
'all' => 'All courses',
'requested' => 'Requested courses')));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
$options = array();
}
$options2 = array();
foreach ($options as $option) {
$options2[$option->id] = $option->name;
}
$temp->add(new admin_setting_configmultiselect('defaultallowedmodules', get_string('defaultallowedmodules', 'admin'), get_string('configdefaultallowedmodules', 'admin'), array(), $options2));
$ADMIN->add('security', $temp);
// "notifications" settingpage
$temp = new admin_settingpage('notifications', get_string('notifications', 'admin'));
$temp->add(new admin_setting_configselect('displayloginfailures', get_string('displayloginfailures', 'admin'), get_string('configdisplayloginfailures', 'admin'), '', array('' => get_string('nobody'),
'admin' => get_string('administrators'),
'teacher' => get_string('administratorsandteachers'),
'everybody' => get_string('everybody'))));
$temp->add(new admin_setting_configselect('notifyloginfailures', get_string('notifyloginfailures', 'admin'), get_string('confignotifyloginfailures', 'admin'), '', array('' => get_string('nobody'),
'mainadmin' => get_string('administrator'),
'alladmins' => get_string('administratorsall'))));
$options = array();
for ($i = 1; $i <= 100; $i++) {
$options[$i] = $i;
}
$temp->add(new admin_setting_configselect('notifyloginthreshold', get_string('notifyloginthreshold', 'admin'), get_string('confignotifyloginthreshold', 'admin'), '10', $options));
$ADMIN->add('security', $temp);
// "antivirus" settingpage
$temp = new admin_settingpage('antivirus', get_string('antivirus', 'admin'));
$temp->add(new admin_setting_configcheckbox('runclamonupload', get_string('runclamavonupload', 'admin'), get_string('configrunclamavonupload', 'admin'), 0));
$temp->add(new admin_setting_configtext('pathtoclam', get_string('pathtoclam', 'admin'), get_string('configpathtoclam', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configselect('clamfailureonupload', get_string('clamfailureonupload', 'admin'), get_string('configclamfailureonupload', 'admin'), 'donothing', array('donothing' => get_string('configclamdonothing', 'admin'),
'actlikevirus' => get_string('configclamactlikevirus', 'admin'))));
$ADMIN->add('security', $temp);
?>
+205
View File
@@ -0,0 +1,205 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "server" category
// "systempaths" settingpage
$temp = new admin_settingpage('systempaths', get_string('systempaths','admin'));
$temp->add(new admin_setting_configselect('gdversion', get_string('gdversion','admin'), get_string('configgdversion', 'admin'), check_gd_version(), array('0' => get_string('gdnot'),
'1' => get_string('gd1'),
'2' => get_string('gd2'))));
$temp->add(new admin_setting_configtext('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), '', PARAM_RAW)); // TODO: add path validation
$ADMIN->add('server', $temp, 0);
// "email" settingpage
$temp = new admin_settingpage('mail', get_string('mail','admin'));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . $_SERVER['HTTP_HOST'], PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configselect('digestmailtime', get_string('digestmailtime', 'admin'), get_string('configdigestmailtime', 'admin'), 17, array('00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23')));
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']); // not needed here
$options = array();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
$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);
// "sessionhandling" settingpage
$temp = new admin_settingpage('sessionhandling', get_string('sessionhandling', 'admin'));
$temp->add(new admin_setting_configcheckbox('dbsessions', get_string('dbsessions', 'admin'), get_string('configdbsessions', 'admin'), 0));
$temp->add(new admin_setting_configselect('sessiontimeout', get_string('sessiontimeout', 'admin'), get_string('configsessiontimeout', 'admin'), 7200, array(14400 => get_string('numhours', '', 4),
10800 => get_string('numhours', '', 3),
7200 => get_string('numhours', '', 2),
5400 => get_string('numhours', '', '1.5'),
3600 => get_string('numminutes', '', 60),
2700 => get_string('numminutes', '', 45),
1800 => get_string('numminutes', '', 30),
900 => get_string('numminutes', '', 15),
300 => get_string('numminutes', '', 5))));
$temp->add(new admin_setting_configtext('sessioncookie', get_string('sessioncookie', 'admin'), get_string('configsessioncookie', 'admin'), '', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('sessioncookiepath', get_string('sessioncookiepath', 'admin'), get_string('configsessioncookiepath', 'admin'), '/', PARAM_LOCALURL));
$ADMIN->add('server', $temp, 50);
// "rss" settingpage
$temp = new admin_settingpage('rss', get_string('rss'));
$temp->add(new admin_setting_configcheckbox('enablerssfeeds', get_string('enablerssfeeds', 'admin'), get_string('configenablerssfeeds', 'admin'), 0));
$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);
// "stats" settingpage
$temp = new admin_settingpage('stats', get_string('stats'));
$temp->add(new admin_setting_configcheckbox('enablestats', get_string('enablestats', 'admin'), get_string('configenablestats', 'admin'), 0));
$temp->add(new admin_setting_configselect('statsfirstrun', get_string('statsfirstrun', 'admin'), get_string('configstatsfirstrun', 'admin'), 'none', array('none' => get_string('none'),
60*60*24*7 => get_string('numweeks','moodle',1),
60*60*24*14 => get_string('numweeks','moodle',2),
60*60*24*21 => get_string('numweeks','moodle',3),
60*60*24*28 => get_string('nummonths','moodle',1),
60*60*24*56 => get_string('nummonths','moodle',2),
60*60*24*84 => get_string('nummonths','moodle',3),
60*60*24*112 => get_string('nummonths','moodle',4),
60*60*24*140 => get_string('nummonths','moodle',5),
60*60*24*168 => get_string('nummonths','moodle',6),
'all' => get_string('all') )));
$temp->add(new admin_setting_configselect('statsmaxruntime', get_string('statsmaxruntime', 'admin'), get_string('configstatsmaxruntime', 'admin'), 0, array(0 => get_string('untilcomplete'),
60*60 => '1 '.get_string('hour'),
60*60*2 => '2 '.get_string('hours'),
60*60*3 => '3 '.get_string('hours'),
60*60*4 => '4 '.get_string('hours'),
60*60*5 => '5 '.get_string('hours'),
60*60*6 => '6 '.get_string('hours'),
60*60*7 => '7 '.get_string('hours'),
60*60*8 => '8 '.get_string('hours') )));
$temp->add(new admin_setting_configtime('statsruntimestarthour', 'statsruntimestartminute', get_string('statsruntimestart', 'admin'), get_string('configstatsruntimestart', 'admin'), array('h' => 0, 'm' => 0)));
$temp->add(new admin_setting_configtext('statsuserthreshold', get_string('statsuserthreshold', 'admin'), get_string('configstatsuserthreshold', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
// "http" settingpage
$temp = new admin_settingpage('http', get_string('http', 'admin'));
$temp->add(new admin_setting_configtext('framename', get_string('framename', 'admin'), get_string('configframename', 'admin'), '_top', PARAM_ALPHAEXT));
$temp->add(new admin_Setting_configcheckbox('slasharguments', get_string('slasharguments', 'admin'), get_string('configslasharguments', 'admin'), 1));
$temp->add(new admin_setting_configtext('proxyhost', get_string('proxyhost', 'admin'), get_string('configproxyhost', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('proxyport', get_string('proxyport', 'admin'), get_string('configproxyport', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('maintenancemode', get_string('sitemaintenancemode', 'admin'), "$CFG->wwwroot/$CFG->admin/maintenance.php"));
$temp = new admin_settingpage('cleanup', get_string('cleanup', 'admin'));
$temp->add(new admin_setting_configselect('longtimenosee', get_string('longtimenosee', 'admin'), get_string('configlongtimenosee', 'admin'), 120, array(0 => get_string('never'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
180 => get_string('numdays', '', 180),
150 => get_string('numdays', '', 150),
120 => get_string('numdays', '', 120),
90 => get_string('numdays', '', 90),
60 => get_string('numdays', '', 60),
30 => get_string('numdays', '', 30),
21 => get_string('numdays', '', 21),
14 => get_string('numdays', '', 14),
7 => get_string('numdays', '', 7) )));
$temp->add(new admin_setting_configselect('deleteunconfirmed', get_string('deleteunconfirmed', 'admin'), get_string('configdeleteunconfirmed', 'admin'), 168, array(0 => get_string('never'),
168 => get_string('numdays', '', 7),
144 => get_string('numdays', '', 6),
120 => get_string('numdays', '', 5),
96 => get_string('numdays', '', 4),
72 => get_string('numdays', '', 3),
48 => get_string('numdays', '', 2),
24 => get_string('numdays', '', 1),
12 => get_string('numhours', '', 12),
6 => get_string('numhours', '', 6),
1 => get_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('loglifetime', get_string('loglifetime', 'admin'), get_string('configloglifetime', 'admin'), 0, array(0 => get_string('neverdeletelogs'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
180 => get_string('numdays', '', 180),
150 => get_string('numdays', '', 150),
120 => get_string('numdays', '', 120),
90 => get_string('numdays', '', 90),
60 => get_string('numdays', '', 60),
30 => get_string('numdays', '', 30))));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('environment', get_string('environment','admin'), "$CFG->wwwroot/$CFG->admin/environment.php"));
$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"));
}
?>
+47
View File
@@ -0,0 +1,47 @@
<?php // $Id$
// This is the first file read by the lib/adminlib.php script
// We use it to create the categories in correct order,
// since they need to exist *before* settingpages and externalpages
// are added to them.
$ADMIN->add('root', new admin_externalpage('adminnotifications', get_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
// hidden upgrade script
$ADMIN->add('root', new admin_externalpage('upgradesettings', get_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
// hidden search script
$ADMIN->add('root', new admin_externalpage('search', get_string('search', 'admin'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
$ADMIN->add('root', new admin_category('users', get_string('users','admin')));
$ADMIN->add('root', new admin_category('courses', get_string('courses','admin')));
$ADMIN->add('root', new admin_category('location', get_string('location','admin')));
$ADMIN->add('root', new admin_category('language', get_string('language')));
$ADMIN->add('root', new admin_category('modules', get_string('plugins', 'admin')));
$ADMIN->add('modules', new admin_externalpage('managemodules', get_string('activities'), "$CFG->wwwroot/$CFG->admin/modules.php"));
$ADMIN->add('modules', new admin_externalpage('manageblocks', get_string('blocks'), "$CFG->wwwroot/$CFG->admin/blocks.php"));
$ADMIN->add('modules', new admin_externalpage('managefilters', get_string('managefilters'), "$CFG->wwwroot/$CFG->admin/filters.php"));
$ADMIN->add('root', new admin_category('security', get_string('security','admin')));
$ADMIN->add('root', new admin_category('appearance', get_string('appearance','admin')));
$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) {
/// 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"));
}
$ADMIN->add('root', new admin_category('misc', get_string('miscellaneous')));
// hidden unsupported category
$ADMIN->add('root', new admin_category('unsupported', get_string('unsupported', 'admin'), true));
?>
+11
View File
@@ -0,0 +1,11 @@
<?php // $Id$
// This file defines settingpages and externalpages in the "unsupported" hidden category, use wisely!
$ADMIN->add('unsupported', new admin_externalpage('purgemoodledata', 'Purge moodledata', $CFG->wwwroot.'/'.$CFG->admin.'/delete.php'));
$ADMIN->add('unsupported', new admin_externalpage('healthcenter', get_string('healthcenter'), $CFG->wwwroot.'/'.$CFG->admin.'/health.php'));
$ADMIN->add('unsupported', new admin_externalpage('toinodb', 'Convert to InnoDB', $CFG->wwwroot.'/'.$CFG->admin.'/innodb.php'));
$ADMIN->add('unsupported', new admin_externalpage('replace', 'Search and replace', $CFG->wwwroot.'/'.$CFG->admin.'/replace.php'));
?>
+100
View File
@@ -0,0 +1,100 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "users" category
$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'), "$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"));
$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);
if (!$guestrole = get_guest_role()) {
$guestrole->id = 0;
}
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
$studentrole = array_shift($studentroles); /// Take the first one
} else {
$studentrole->id = 0;
}
if ($userroles = get_roles_with_capability('moodle/legacy:user', CAP_ALLOW)) {
$userrole = array_shift($userroles); /// Take the first one
} else {
$userrole->id = 0;
}
if (empty($CFG->creatornewroleid)) {
if ($teacherroles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, $context)) {
$teachereditrole = array_shift($teacherroles);
set_config('creatornewroleid', $teachereditrole->id);
} else {
set_config('creatornewroleid', 0);
}
}
// 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, $allroles ));
$temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
get_string('configguestroleid', 'admin'), $guestrole->id, $allroles));
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
get_string('configdefaultuserroleid', 'admin'), $userrole->id, $allroles));
$temp->add(new admin_setting_configselect('defaultcourseroleid', get_string('defaultcourseroleid', 'admin'),
get_string('configdefaultcourseroleid', 'admin'), $studentrole->id, $allroles));
$temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
get_string('configcreatornewroleid', 'admin'), $CFG->creatornewroleid, $allroles));
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
$temp->add(new admin_setting_configmultiselect('nonmetacoursesyncroleids', get_string('nonmetacoursesyncroleids', 'admin'),
get_string('confignonmetacoursesyncroleids', 'admin'), array(), $allroles));
//$temp->add(new admin_setting_configcheckbox('allusersaresitestudents', get_string('allusersaresitestudents', 'admin'), get_string('configallusersaresitestudents','admin'), 1));
$temp->add(new admin_setting_configmultiselect('hiddenuserfields', get_string('hiddenuserfields', 'admin'),
get_string('confighiddenuserfields', 'admin'), array(),
array('none' => get_string('none'),
'description' => get_string('description'),
'city' => get_string('city'),
'country' => get_string('country'),
'webpage' => get_string('webpage'),
'icqnumber' => get_string('icqnumber'),
'skypeid' => get_string('skypeid'),
'yahooid' => get_string('yahooid'),
'aimid' => get_string('aimid'),
'msnid' => get_string('msnid'),
'lastaccess' => get_string('lastaccess'))));
//$temp->add(new admin_setting_special_adminseesall());
$ADMIN->add('roles', $temp);
?>
-130
View File
@@ -1,130 +0,0 @@
<form method="post" action="site.php" name="form">
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td align="right"><?php print_string("fullsitename") ?>:</td>
<td><input type="text" name="fullname" size="50" maxlength="254" value="<?php p($form->fullname) ?>" alt="<?php print_string("fullsitename") ?>" />
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("shortsitename") ?>:</td>
<td><input type="text" name="shortname" size="15" maxlength="15" value="<?php p($form->shortname) ?>" alt="<?php print_string("shortsitename") ?>" />
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpagedescription") ?>:<br /><br />
<?PHP
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("html", get_string("helphtml"), "moodle", true, true);
}
echo "<br />";
?>
</td>
<td><?php print_textarea($usehtmleditor, 20, 50, 600, 400, "summary", $form->summary); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpageformat") ?>:</td>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
$options = array(FRONTPAGENEWS => get_string("frontpagenews"),
FRONTPAGECOURSELIST => get_string("frontpagecourselist"),
FRONTPAGECATEGORYNAMES => get_string("frontpagecategorynames"),
);
$values = array(get_string('hide'), get_string('order1', 'admin'), get_string('order2', 'admin'));
$seq = array_flip(explode(',',$form->frontpage));
foreach ($seq as $k => $s) {
$seq[$k]++;
}
if (count_records("course") > 200) {
unset($options[FRONTPAGECOURSELIST]);
if (isset($seq[FRONTPAGECOURSELIST])) {
$form->frontpage = 2;
}
} else {
$values[] = get_string('order3', 'admin');
}
foreach ($options as $key => $option) {
echo "<td>$option<br />";
choose_from_menu ($values, "frontpage[$key]", isset($seq[$key])?$seq[$key]:0, "");
echo '</td>';
}
?>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("sitesection") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "numsections", $form->numsections, "");
?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("newsitemsnumber") ?>:</td>
<td><?php
$newsitem = get_string("newsitem");
$newsitems = get_string("newsitems");
$options = array("0" => "0 $newsitems",
"1" => "1 $newsitem",
"2" => "2 $newsitems",
"3" => "3 $newsitems",
"4" => "4 $newsitems",
"5" => "5 $newsitems",
"6" => "6 $newsitems",
"7" => "7 $newsitems",
"8" => "8 $newsitems",
"9" => "9 $newsitems",
"10" => "10 $newsitems");
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" maxlength="100" size="25" value="<?php p($form->teacher) ?>" alt="<?php print_string("wordforteacher") ?>" />
(<?php print_string("wordforteachereg") ?>)
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforteachers") ?>:</td>
<td><input type="text" name="teachers" maxlength="100" size="25" value="<?php p($form->teachers) ?>" alt="<?php print_string("wordforteachers") ?>" />
(<?php print_string("wordforteacherseg") ?>)
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforstudent") ?>:</td>
<td><input type="text" name="student" maxlength="100" size="25" value="<?php p($form->student) ?>" alt="<?php print_string("wordforstudent") ?>" />
(<?php print_string("wordforstudenteg") ?>)
<?php if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforstudents") ?>:</td>
<td><input type="text" name="students" maxlength="100" size="25" value="<?php p($form->students) ?>" alt="<?php print_string("wordforstudents") ?>" />
(<?php print_string("wordforstudentseg") ?>)
<?php if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php p($form->id) ?>" />
<input type="hidden" name="category" value="<?php p($form->category) ?>" />
<input type="hidden" name="format" value="<?php p($form->format) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
</form>
-160
View File
@@ -1,160 +0,0 @@
<?php // $Id$
require_once('../config.php');
require_once('../course/lib.php');
if ($site = get_site()) {
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
$site->format = "social"; // override
}
$focus = "form.fullname";
/// If data submitted, then process and store.
if ($form = data_submitted()) {
if (!empty($USER->id)) { // Additional identity check
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
}
validate_form($form, $err);
if (count($err) == 0) {
$form->frontpage = array_flip($form->frontpage);
unset($form->frontpage[0]);
$form->frontpage = array_flip($form->frontpage);
asort($form->frontpage);
$form->frontpage = implode(',',array_flip($form->frontpage));
set_config("frontpage", $form->frontpage);
if ($form->frontpage == '') {
$form->numsections = 1; // Force the topic display for this format
}
$form->timemodified = time();
if ($form->id) {
if (update_record("course", $form)) {
redirect("$CFG->wwwroot/", get_string("changessaved"));
} else {
error("Serious Error! Could not update the site record! (id = $form->id)");
}
} else {
// We are about to create the site "course"
require_once($CFG->dirroot.'/lib/blocklib.php');
if ($newid = insert_record('course', $form)) {
// Site created, add blocks for it
$page = page_create_object(PAGE_COURSE_VIEW, $newid);
blocks_repopulate_page($page); // Return value not checked because you can always edit later
$cat->name = get_string('miscellaneous');
if (insert_record('course_categories', $cat)) {
redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1);
} else {
error("Serious Error! Could not set up a default course category!");
}
} else {
error("Serious Error! Could not set up the site!");
}
}
die;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if ($site and empty($form)) {
$form = $site;
$course = $site;
$firsttime = false;
} else {
$form->fullname = "";
$form->shortname = "";
$form->summary = "";
$form->newsitems = 3;
$form->numsections = 0;
$form->id = "";
$form->category = 0;
$form->format = 'site'; // Only for this course
$form->teacher = get_string("defaultcourseteacher");
$form->teachers = get_string("defaultcourseteachers");
$form->student = get_string("defaultcoursestudent");
$form->students = get_string("defaultcoursestudents");
$firsttime = true;
}
if (isset($CFG->frontpage)) {
$form->frontpage = $CFG->frontpage;
} else {
$form->frontpage = FRONTPAGECOURSELIST; // Show course list by default
set_config("frontpage", $form->frontpage);
}
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strsitesettings = get_string("sitesettings");
if ($firsttime) {
print_header();
print_heading($strsitesettings);
print_simple_box(get_string("configintrosite", 'admin'), "center", "50%");
echo "<br />";
} else {
print_header("$site->shortname: $strsitesettings", "$site->fullname",
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strsitesettings", "$focus");
print_heading($strsitesettings);
}
if (empty($USER->id)) { // New undefined admin user
$USER->htmleditor = true;
$sesskey = '';
} else {
$sesskey = $USER->sesskey;
}
$usehtmleditor = can_use_html_editor();
$defaultformat = FORMAT_HTML;
print_simple_box_start("center", "");
include("site.html");
print_simple_box_end();
if ($usehtmleditor) {
use_html_editor();
}
if (!$firsttime) {
print_footer();
}
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
if (empty($form->fullname))
$err["fullname"] = get_string("missingsitename");
if (empty($form->shortname))
$err["shortname"] = get_string("missingshortsitename");
return;
}
?>
+31 -33
View File
@@ -9,7 +9,7 @@
$pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
'lib' => '/my/pagelib.php',
'name' => get_string('stickyblocksmymoodle','admin')),
'name' => get_string('mymoodle','admin')),
PAGE_COURSE_VIEW => array('id' => PAGE_COURSE_VIEW,
'lib' => '/lib/pagelib.php',
'name' => get_string('stickyblockscourseview','admin'))
@@ -24,63 +24,61 @@
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
// first thing to do is print the dropdown menu
$strtitle = get_string('stickyblocks','admin');
$strheading = get_string('adminhelpstickyblocks');
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
get_string('admin').'</a> -> '.$strtitle);
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
echo '<tr valign="top">';
if (!empty($pt)) {
require_once($CFG->dirroot.$pagetypes[$pt]['lib']);
define('ADMIN_STICKYBLOCKS',$pt);
$PAGE = page_create_object($pt);
$PAGE = page_create_object($pt, SITEID);
$blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE);
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT]), 210);
echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
get_string('administration').'</a> -> '.$strtitle);
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
echo '<tr valign="top">';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_LEFT);
echo '</td>';
echo '<td valign="top" id="middle-column">';
} else {
echo '<td style="vertical-align: top;" id="left-column">';
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('stickyblocks', $adminroot);
admin_externalpage_print_header($adminroot);
}
echo '</td>';
echo '<td valign="top" width="*" id="middle-column">';
print_simple_box_start('center');
print_box_start();
print_heading($strheading);
echo '<form method="post" action="'.$CFG->wwwroot.'/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();
echo '</td>';
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)) {
echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
echo '</td>';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
echo '</td>';
echo '</tr></table>';
print_footer();
} else {
admin_externalpage_print_footer($adminroot);
}
echo '<td style="vertical-align: top;" id="left-column">';
echo '</td>';
echo '</tr></table>';
print_footer();
?>
?>
+3 -5
View File
@@ -6,9 +6,7 @@
require_login();
if (!isadmin()) {
error("You must be an admin");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$strtimezone = get_string("timezone");
$strsavechanges = get_string("savechanges");
@@ -35,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();
+13 -24
View File
@@ -1,50 +1,39 @@
<?php // $Id$
// Automatic update of Timezones from a new source
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/olson.php');
$adminroot = admin_get_root();
admin_externalpage_setup('timezoneimport', $adminroot);
$ok = optional_param('ok', 0, PARAM_BOOL);
require_login();
if (!isadmin()) {
error('Only administrators can use this page!');
}
if (!$site = get_site()) {
error('Site isn\'t defined!');
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strcalendarsettings = get_string('calendarsettings', 'admin');
$strimporttimezones = get_string('importtimezones', 'admin');
print_header("$site->shortname: $strcalendarsettings", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"calendar.php\">$strcalendarsettings</a> -> $strimporttimezones");
admin_externalpage_print_header($adminroot);
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(), 'calendar.php');
notice_yesno($message, 'timezoneimport.php?ok=1&amp;sesskey='.sesskey(), 'index.php');
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
}
@@ -110,7 +99,7 @@
$a->source = $importdone;
print_heading(get_string('importtimezonescount', 'admin', $a), '', 3);
print_continue('calendar.php');
print_continue('index.php');
$timezonelist = array();
foreach ($timezones as $timezone) {
@@ -131,9 +120,9 @@
} else {
print_heading(get_string('importtimezonesfailed', 'admin'), '', 3);
print_continue('calendar.php');
print_continue('index.php');
}
print_footer();
admin_externalpage_print_footer($adminroot);
?>

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