Compare commits

...

1744 Commits

Author SHA1 Message Date
moodler 9acd97389e Release 1.8.6 2008-07-11 05:49:41 +00:00
dongsheng dca379c260 MDL-14932, improve accessibility in group assigning and role assigning pages. 2008-07-11 04:57:52 +00:00
moodlerobot 48b58815eb Updated the 18 build version to 20080711 2008-07-11 01:42:15 +00:00
skodak c913f22058 MDL-10586 fixed coding style; merged from MOODLE_19_STABLE 2008-07-10 08:37:03 +00:00
scyrma c66edc0c29 MDL-14999 & MDL-10657: Fix for a few problems in HTMLArea. (Patch by Nicklas Lindgren) 2008-07-10 04:12:46 +00:00
scyrma 90ffb070d0 MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida) 2008-07-10 03:34:50 +00:00
moodlerobot 37d795053c Updated the 18 build version to 20080710 2008-07-10 01:42:13 +00:00
skodak 33df4820bf MDL-15469 adding fclose before write to already open file; merged from MOODLE_19_STABLE 2008-07-09 10:33:50 +00:00
scyrma 73ef9f11ba MDL-15403: Patch sent by Peter Bulmer, said to have been written by Donal McMullan. Prevents a remotely-triggered mass-unenrolments of users in a
(mnet-enabled) course. (backport from 1.9)
2008-07-09 09:21:53 +00:00
moodlerobot 70e5759150 Updated the 18 build version to 20080709 2008-07-09 01:43:14 +00:00
skodak 8a942e9c79 MDL-13811 moved new setting to correct category 2008-07-08 08:20:03 +00:00
moodlerobot 5774e05b33 Updated the 18 build version to 20080708 2008-07-08 01:46:33 +00:00
moodlerobot 90aab3868b Automatic installer.php lang files by installer_builder (20080708) 2008-07-08 01:32:03 +00:00
skodak 3d70d2f8df MDL-13383 fixed restore form; merged from MOODLE_19_STABLE 2008-07-07 22:36:31 +00:00
mudrd8mz db75ffa618 MDL-11911 Do not show posts from other separated groups in Full recent activity report 2008-07-07 15:38:21 +00:00
skodak 56cab517e9 MDL-15413 warn admins if display_errors enabled; backported from HEAD 2008-07-07 14:36:06 +00:00
moodlerobot d4f421493b Updated the 18 build version to 20080707 2008-07-07 01:39:29 +00:00
skodak ad1630ae86 MDL-13901 fixed upgrade from 1.6.x -> 1.8.x which was incorrectly setting "Default role for all users" to guest 2008-07-06 23:46:25 +00:00
moodlerobot 0445685775 Updated the 18 build version to 20080706 2008-07-06 01:37:23 +00:00
skodak 7894f66662 MDL-13811 reworked unsetting of preferences and minor tweaks; backported from HEAD 2008-07-05 22:47:32 +00:00
skodak 82a3bbd629 MDL-15548 fixed regression, thanks Gary! 2008-07-05 17:24:15 +00:00
skodak 6e695a1f4e MDL-15516 prvent access to deleted profiles and other user areas; backported from HEAD 2008-07-05 14:57:22 +00:00
nicolasconnault f978083108 MDL-13811 Completed the required changes. Also added a "Cancel email change" link. 2008-07-05 14:41:55 +00:00
nicolasconnault 4c3a837f21 file emailupdate.php was added on branch MOODLE_18_STABLE on 2008-07-05 14:41:56 +0000 2008-07-05 14:28:13 +00:00
arborrow 970ea98196 MDL-14022 - verifies that maxgrade is in fact a number before adding grade_against to totalpoints 2008-07-05 02:58:32 +00:00
moodlerobot ca4fc3a908 Updated the 18 build version to 20080705 2008-07-05 01:45:16 +00:00
moodlerobot 489b2e19de Automatic installer.php lang files by installer_builder (20080705) 2008-07-05 01:32:52 +00:00
skodak c6bd449dea MDL-15544 add danger warning for email self-registration; backported from HEAD 2008-07-04 23:57:52 +00:00
arborrow f1591379e8 MDL-7571 - shuffles 'mode' before displaying, also moves some code to avoid a duplicate foreach loop 2008-07-04 22:21:51 +00:00
moodlerobot 54d264ea7c Updated the 18 build version to 20080704 2008-07-04 01:44:01 +00:00
moodlerobot f69f513d28 Automatic installer.php lang files by installer_builder (20080704) 2008-07-04 01:30:38 +00:00
skodak ec7a9479f9 MDL-15021 Deleted not fully setup separate admin settings 2008-07-03 14:07:40 +00:00
moodlerobot d35218a111 Updated the 18 build version to 20080703 2008-07-03 01:42:48 +00:00
dongsheng 394cc4a484 "MDL-12843, add proper html id, thanks ken" 2008-07-02 07:29:32 +00:00
dongsheng db15d5d552 "MDL-15424, close table tags manually before calling redirect" 2008-07-02 07:05:30 +00:00
dongsheng 0d2ee05aa1 "MDL-15501, typo, sorry" 2008-07-02 05:12:14 +00:00
dongsheng 4eb9d73cc7 "MDL-15501, add appropriate div and h2 tags to the header div" 2008-07-02 05:01:03 +00:00
dongsheng 6b52c45e95 "MDL-15469, limit email notification" 2008-07-02 04:51:28 +00:00
moodlerobot 99f7c8df47 Updated the 18 build version to 20080702 2008-07-02 01:56:24 +00:00
skodak 2192e94ef2 MDL-10633 fixed regression in last commit 2008-07-01 23:01:01 +00:00
gbateson b0e7781eb8 MDL-15184: fix sql injection vulnerability 2008-07-01 10:48:16 +00:00
moodlerobot 069dbaa91e Updated the 18 build version to 20080701 2008-07-01 01:38:47 +00:00
moodlerobot 6a971ac82a Automatic installer.php lang files by installer_builder (20080701) 2008-07-01 01:27:17 +00:00
scyrma b219363c03 MDL-15392: preventing duplicate #id in blog entries list 2008-06-30 01:52:56 +00:00
moodlerobot a148872083 Updated the 18 build version to 20080630 2008-06-30 01:42:54 +00:00
moodlerobot 0ca23ab0d6 Automatic installer.php lang files by installer_builder (20080630) 2008-06-30 01:31:43 +00:00
moodlerobot 7177a7a93d Updated the 18 build version to 20080629 2008-06-29 01:35:36 +00:00
moodlerobot 736956b1d0 Updated the 18 build version to 20080628 2008-06-28 01:38:28 +00:00
whchuang 3e26020006 Fixed typo in the help text. Changed 'the' to then and removed the extra period in bulleted list 2008-06-28 00:35:10 +00:00
scyrma 25effd9682 MDL-15392: fix output sanitization and put permalink back, in a xhtml-strict compliant way. 2008-06-27 03:54:32 +00:00
dongsheng 020ce4787f "MDL-10633, fix dobule quote in calendar" 2008-06-27 03:09:59 +00:00
moodlerobot 3580b97516 Updated the 18 build version to 20080627 2008-06-27 01:40:45 +00:00
dongsheng 6ad7a2da89 "MDL-15424, fix html tag" 2008-06-26 08:56:38 +00:00
moodlerobot 193cc59ca3 Updated the 18 build version to 20080626 2008-06-26 01:46:20 +00:00
moodlerobot 7c013eab3f Automatic installer.php lang files by installer_builder (20080626) 2008-06-26 01:34:12 +00:00
Francois Marier 0d003551eb Fix drift between CVS and git 2008-06-25 01:54:21 +00:00
moodlerobot 07c92f644f Updated the 18 build version to 20080625 2008-06-25 01:54:21 +00:00
moodlerobot a1dc1a26db Automatic installer.php lang files by installer_builder (20080625) 2008-06-25 01:30:58 +00:00
tjhunt ce6d939f26 MDL-15315 / MDL-15332 merge problem. Sorry. 2008-06-24 16:24:21 +00:00
wildgirl 493288848b lang string typo fixes 2008-06-24 13:51:03 +00:00
moodlerobot 77d587b42e Updated the 18 build version to 20080624 2008-06-24 01:42:40 +00:00
moodlerobot d186e24dff Automatic installer.php lang files by installer_builder (20080624) 2008-06-24 01:30:55 +00:00
tjhunt 139fa3dee6 MDL-15372 - Links in course summary and section summaries not recoded on restore. Petr thinks it is a bad idea to recode links in course summaries, becuase he thinks there should not be links there at all, but I disagree, and as long as links are there, and we have the code to stop them breaking on backup and restore, we should fix the bug. 2008-06-23 17:02:16 +00:00
tjhunt 3f35d9da9d MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. 2008-06-23 14:34:55 +00:00
tjhunt 61faff2eec MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. 2008-06-23 14:28:52 +00:00
dongsheng c0d5964594 "MDL-15344, new lang string add" 2008-06-23 06:07:05 +00:00
moodlerobot e72a18576f Updated the 18 build version to 20080623 2008-06-23 01:39:29 +00:00
moodlerobot b18e27ea93 Automatic installer.php lang files by installer_builder (20080623) 2008-06-23 01:28:21 +00:00
moodlerobot ee8dd77019 Updated the 18 build version to 20080622 2008-06-22 01:40:22 +00:00
moodlerobot 350d29e7d8 Updated the 18 build version to 20080621 2008-06-21 01:41:44 +00:00
moodlerobot e8206e91b4 Automatic installer.php lang files by installer_builder (20080621) 2008-06-21 01:30:40 +00:00
gbateson 986f2bc884 replace get_jmatch_items by set_jmatch_items 2008-06-20 22:27:40 +00:00
tjhunt 1170f42f3a MDL-15315 - Error in Item analysis report for short aswer questions that use wildcards 2008-06-20 17:22:57 +00:00
tjhunt 2054096041 MDL-15332 - Item analysis links to the question edit form even for users without an appropriate capability. 2008-06-20 16:30:35 +00:00
moodlerobot 4a04703937 Updated the 18 build version to 20080620 2008-06-20 01:47:56 +00:00
tjhunt f733a88518 MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected. 2008-06-19 17:57:58 +00:00
tjhunt 9f18286f31 MDL-15318 - url is a reserved word in JavaScript in IE, so the Gen Calendar URL button does not work there 2008-06-19 14:24:10 +00:00
gbateson d23e60ad43 removed get_jmatch_items_old 2008-06-19 05:49:45 +00:00
gbateson 3c6a14ee12 allow <img> and other tags in LHS of JMatch when outputformat is "v6" 2008-06-19 05:13:34 +00:00
pichetp 69c6d6ca42 MDL-14625 more tolerant to missing subquestions merged from HEAD 2008-06-19 01:55:49 +00:00
pichetp 3af0788f9c MDL-14625 more tolerant to missing subquestions merged from HEAD 2008-06-19 01:50:28 +00:00
moodlerobot 9676a2860c Updated the 18 build version to 20080619 2008-06-19 01:46:44 +00:00
tjhunt 2888dc67e1 MDL-15290 - Missing question types not handled properly on backup. 2008-06-18 14:29:34 +00:00
dongsheng 71c3e668a5 "MDL-8642, setting of auto scrolling" 2008-06-18 03:45:26 +00:00
dongsheng b678200478 "MDL-12304, fix double text" 2008-06-18 03:16:06 +00:00
moodlerobot dfd0732d37 Updated the 18 build version to 20080618 2008-06-18 01:55:03 +00:00
jerome 31b8823ff3 MDL-11461 all ressource types are now displayed in the ressource help popup, merged from 1.9 2008-06-17 01:52:23 +00:00
moodlerobot 5e20081493 Updated the 18 build version to 20080617 2008-06-17 01:43:08 +00:00
dongsheng 4e3b92aecc "MDL-15251, see tracker, merged from MOODLE_19_STABLE" 2008-06-16 12:25:31 +00:00
dongsheng e6edcdaff7 "MDL-15251, see tracker, merged from MOODLE_19_STABLE" 2008-06-16 09:05:42 +00:00
dongsheng 3c14b202eb "MDL-15251, fix country field in user/view.php" 2008-06-16 02:16:42 +00:00
moodlerobot 763d96c685 Updated the 18 build version to 20080616 2008-06-16 01:44:38 +00:00
moodlerobot c90bfc60d2 Automatic installer.php lang files by installer_builder (20080616) 2008-06-16 01:32:46 +00:00
moodlerobot 91b3b50d28 Updated the 18 build version to 20080615 2008-06-15 01:42:06 +00:00
moodlerobot c3801e8c66 Updated the 18 build version to 20080614 2008-06-14 01:55:18 +00:00
moodlerobot e418ebf500 Updated the 18 build version to 20080613 2008-06-13 02:07:23 +00:00
stronk7 ba6b4afc8b Timezone info updated to tzdata2008c. Backported from HEAD 2008-06-12 16:03:16 +00:00
moodlerobot e15dace905 Updated the 18 build version to 20080612 2008-06-12 02:05:53 +00:00
moodlerobot a648c81aac Automatic installer.php lang files by installer_builder (20080612) 2008-06-12 01:49:02 +00:00
moodlerobot 1a46de2f48 Updated the 18 build version to 20080611 2008-06-11 02:17:49 +00:00
dongsheng 74680e68ed "MDL-12304, fix double text" 2008-06-10 05:16:40 +00:00
moodlerobot 9e7d048f50 Updated the 18 build version to 20080610 2008-06-10 02:03:45 +00:00
moodlerobot 465679ab04 Automatic installer.php lang files by installer_builder (20080610) 2008-06-10 01:47:17 +00:00
moodlerobot f8e7cfb677 Updated the 18 build version to 20080609 2008-06-09 02:02:41 +00:00
iarenaza 9306b4f5c5 MDL-12783 IMS idon't unenroll students who were enrolled by other plug-ins
Credit goes to Scott Krajewski for the bug report and patch!
2008-06-08 15:28:08 +00:00
moodlerobot 1aeb49ce6e Updated the 18 build version to 20080608 2008-06-08 02:03:41 +00:00
iarenaza 913f427e3b MDL-15182 Fix LDAP enrolment course auto-creation at user login 2008-06-07 21:18:12 +00:00
moodlerobot e41ba00a95 Updated the 18 build version to 20080607 2008-06-07 02:00:41 +00:00
gbateson 557ab204c0 fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments) 2008-06-07 01:38:03 +00:00
moodlerobot 5125790ba9 Updated the 18 build version to 20080606 2008-06-06 02:01:40 +00:00
mchurch ca2b78b2d9 MDL-11892 Fixed calls to expand javascript to correctly use quoted strings in all necessary places. 2008-06-05 21:12:43 +00:00
moodlerobot 3a23a33f2a Updated the 18 build version to 20080605 2008-06-05 02:04:55 +00:00
moodlerobot 2624b8cfb2 Updated the 18 build version to 20080604 2008-06-04 02:17:51 +00:00
moodlerobot 58b44a97b8 Updated the 18 build version to 20080603 2008-06-03 02:03:23 +00:00
iarenaza fb8f96c38d MDL-15039 Apostrophes in idnumber prevent users from being unenrolled via LDAP
If any member of a course has an ID number containing an apostrophe (eg.
CN=Paddy O'Brien,OU=Students,DC=etc...), no other members will ever be
unenrolled via LDAP.

Thanks to Michael Woods for the bug report and proposed solution.
2008-06-02 22:33:08 +00:00
moodlerobot 957e659644 Updated the 18 build version to 20080602 2008-06-02 02:07:46 +00:00
moodlerobot 139f64ab4c Updated the 18 build version to 20080601 2008-06-01 02:02:23 +00:00
iarenaza ad5903f32c MDL-4248 Fix error when updating user profiles and any of these fields is empty
According to http://es2.php.net/manual/en/function.ldap-modify.php#43216 we
need to specify an array() value to delete an attribute's value, instead of an
empty string.
2008-05-31 14:53:03 +00:00
iarenaza 255d79e8bb MDL-4207 Don't overwrite modified user profile values with empty LDAP values when 'unlocked if empty' is set
If user profile values are locked to LDAP, then LDAP should provide those
values.

But the purpose of the setting 'unlocked if empty' is to allow the user to fill
in a value for the selected field _if LDAP is giving nothing_ for this field.
Thus it makaes sense to let this value stand in until LDAP is giving a value
for this field.
2008-05-31 13:22:58 +00:00
moodlerobot f82d20ef83 Updated the 18 build version to 20080531 2008-05-31 02:07:34 +00:00
moodlerobot cc455ee55f Automatic installer.php lang files by installer_builder (20080531) 2008-05-31 01:45:06 +00:00
moodlerobot 2612942b3f Updated the 18 build version to 20080530 2008-05-30 02:07:49 +00:00
moodlerobot 741af83691 Updated the 18 build version to 20080529 2008-05-29 02:05:17 +00:00
mchurch e19d0aa40c MDL-15035 - Changed error message to more meaningful one. 2008-05-28 14:56:02 +00:00
moodlerobot a770bee3b4 Updated the 18 build version to 20080528 2008-05-28 02:16:51 +00:00
dongsheng 9ae6f20211 "MDL-14932, accessibility imporvement, see tracker" 2008-05-28 01:53:00 +00:00
tjhunt b2a7f16b29 MDL-14764 - Imported multichoice questions may have a blank answernumbering value, which results in an "ERR" prefix to all answers' text. Thanks to Nate H for the fix. 2008-05-27 13:42:26 +00:00
moodlerobot 7e380f7a62 Updated the 18 build version to 20080527 2008-05-27 02:07:24 +00:00
moodlerobot 0564d9f348 Updated the 18 build version to 20080526 2008-05-26 02:10:21 +00:00
iarenaza e249546b1f MDL-14987 Default attribute for Active Directory password expiry is missing 2008-05-25 21:43:09 +00:00
moodlerobot 13aac2d528 Updated the 18 build version to 20080525 2008-05-25 02:01:32 +00:00
moodlerobot 73018ff695 Updated the 18 build version to 20080524 2008-05-24 02:02:37 +00:00
moodlerobot dca6c88184 Updated the 18 build version to 20080523 2008-05-23 02:05:56 +00:00
moodlerobot 407dddf80a Automatic installer.php lang files by installer_builder (20080523) 2008-05-23 01:49:17 +00:00
moodlerobot 4c13c8322e Updated the 18 build version to 20080522 2008-05-22 02:06:56 +00:00
mchurch 5b3a9f3add MDL-13860 - Fixed mistyped function call to 'scorm_seq_overall'. This was preventing some SCORM navigation from continuing in our tests - but only if debugging was turned off! 2008-05-21 16:34:04 +00:00
moodlerobot ace21471a1 Updated the 18 build version to 20080521 2008-05-21 02:25:57 +00:00
moodlerobot f6fea7895e Automatic installer.php lang files by installer_builder (20080521) 2008-05-21 01:56:53 +00:00
tjhunt d54f58e745 MDL-14928 - Adding random questions from a category with an apostrophe in the name does not work. Stupid bloody addslashes. Roll on dmllib 2.0. 2008-05-20 17:09:39 +00:00
moodlerobot 20654b5f22 Updated the 18 build version to 20080520 2008-05-20 02:01:04 +00:00
moodlerobot ea99602131 Automatic installer.php lang files by installer_builder (20080520) 2008-05-20 01:44:29 +00:00
moodlerobot 00d541cb6f Updated the 18 build version to 20080519 2008-05-19 02:03:56 +00:00
moodlerobot 1b1d73538f Updated the 18 build version to 20080518 2008-05-18 01:56:47 +00:00
moodlerobot 1bbbf98c7b Updated the 18 build version to 20080517 2008-05-17 02:02:26 +00:00
moodlerobot f5f2ac2a84 Automatic installer.php lang files by installer_builder (20080517) 2008-05-17 01:45:51 +00:00
moodlerobot 98925bbd7f Updated the 18 build version to 20080516 2008-05-16 02:06:54 +00:00
moodlerobot 237287ac73 Updated the 18 build version to 20080515 2008-05-15 02:13:49 +00:00
dongsheng 18aa02efdd "MDL-14820, escape filename" 2008-05-14 05:21:01 +00:00
moodlerobot 48f758e26d Updated the 18 build version to 20080514 2008-05-14 02:19:57 +00:00
moodlerobot 9f01a22de1 Updated the 18 build version to 20080513 2008-05-13 02:22:20 +00:00
stronk7 0e247d1d4f Backporting MDL-14495 to 18_STABLE 2008-05-13 02:16:53 +00:00
stronk7 c7642843ba Avoid $_REQUEST["id"] usage. MDL-14806 ; backported from 19_STABLE 2008-05-13 01:51:07 +00:00
tjhunt 698945eb18 MDL-14804 - question_list_instances is broken - It does not include the each modules lib file before doing function_exists($module->name.'_question_list_instances'). 2008-05-12 17:29:50 +00:00
tjhunt 45efd8efad MDL-14797 - Error when moving a course to an empty category on Postgres 2008-05-12 10:44:40 +00:00
tjhunt 3816ad3b25 MDL-14406 - backport fix to this branch, which seems to have been missed. 2008-05-12 08:21:02 +00:00
moodlerobot 632859fca9 Updated the 18 build version to 20080512 2008-05-12 02:14:23 +00:00
moodlerobot ba83cc409d Automatic installer.php lang files by installer_builder (20080512) 2008-05-12 01:44:58 +00:00
stronk7 68abb79baf Prevent excess of unenolments by enrol_database_sync.php. MDL-8550 ; backported from HEAD 2008-05-11 23:56:13 +00:00
moodlerobot 0538ad9c0c Updated the 18 build version to 20080511 2008-05-11 02:07:41 +00:00
moodlerobot 2e094399fd New uz installer lang 2008-05-10 02:58:59 +00:00
moodlerobot 4c65f3cd14 file installer.php was added on branch MOODLE_18_STABLE on 2008-05-10 02:58:59 +0000 2008-05-10 02:57:14 +00:00
moodlerobot b7d40f71bc Updated the 18 build version to 20080510 2008-05-10 02:13:33 +00:00
diml edc70eac69 fixes MDL-14770, $course_id error 2008-05-09 21:51:00 +00:00
tjhunt a5ba72c655 MDL-14750 - Multianswer questions get broken by backup and restore becuase question->parent is not recoded properly in the database. 2008-05-09 15:22:48 +00:00
moodlerobot 3d7b0284aa Updated the 18 build version to 20080509 2008-05-09 02:16:11 +00:00
moodlerobot 96ed80ac0d Automatic installer.php lang files by installer_builder (20080509) 2008-05-09 01:48:04 +00:00
jerome bbfd4e747b MDL-14716 Install script: icon image are now displayed on the Server Checks page, merged from19 2008-05-08 03:09:50 +00:00
moodlerobot 08570d71d5 Updated the 18 build version to 20080508 2008-05-08 02:14:28 +00:00
moodlerobot 550af6d0d2 Automatic installer.php lang files by installer_builder (20080508) 2008-05-08 01:46:00 +00:00
tjhunt 931d8ad7c1 MDL-14726 - rcache bit wrong in set_field 2008-05-07 13:04:42 +00:00
tjhunt 7bab64e437 MDL-5482 - Backup and restore problems for match, random and truefalse question types.
All the credit goes to Paulo Matos who carefully worked out and tested this fix, and updated the patch several times over more than a year while I very slowly got around to reviewing it and checking it in.
2008-05-07 12:31:56 +00:00
fmarier c7ad4ebfe4 Printing ADODB error to the web server error log (MDL-14628) 2008-05-07 04:37:34 +00:00
moodlerobot a45e98117b Updated the 18 build version to 20080507 2008-05-07 02:10:39 +00:00
moodlerobot a4b578acba Updated the 18 build version to 20080506 2008-05-06 02:13:42 +00:00
moodlerobot 8f55f04cae Updated the 18 build version to 20080505 2008-05-05 01:56:27 +00:00
diml f35e2e78bd syntax fix for MDL-14678 2008-05-04 10:49:37 +00:00
moodlerobot a3f57335a6 Updated the 18 build version to 20080504 2008-05-04 02:06:57 +00:00
moodlerobot 1d29db2505 Automatic installer.php lang files by installer_builder (20080504) 2008-05-04 01:52:28 +00:00
moodlerobot 4d6f2b14bf New lang supported by installer: cy_utf8 2008-05-04 00:46:47 +00:00
moodlerobot ed5cf1be35 file installer.php was added on branch MOODLE_18_STABLE on 2008-05-04 00:46:47 +0000 2008-05-04 00:42:16 +00:00
moodlerobot bd7b9afc2b Updated the 18 build version to 20080503 2008-05-03 01:55:54 +00:00
moodlerobot 8bb45b3018 Automatic installer.php lang files by installer_builder (20080503) 2008-05-03 01:40:44 +00:00
poltawski d21d4c769c MDL-13716 - When storing progress of scorm activity a 404 is
encountered and js failure on split. Cast to string to avoid this.

thanks to Peter Chamberlin of LJCreate
backported from MOODLE_19_STABLE
2008-05-02 10:45:05 +00:00
scyrma 9ebf1ff327 MDL-11342: Urlencode the filepath in directory resource 2008-05-02 08:13:49 +00:00
jerome 02aad242c2 MDL-11382 added a link 'Profil' to the administration block. 2008-05-02 06:18:06 +00:00
scyrma 0cc6a219c4 MDL-8592: Get spellchecking to work over https (backport from 1.9) 2008-05-02 03:35:38 +00:00
jerome 7987cbb64c MDL-14439 IE and Opera fire the onchange when ever you move into a dropdwown list with the keyboard - this changes fix the problem. Merged from 19. 2008-05-02 02:52:48 +00:00
jerome 0345ccddab MDL-14439 Added javascript file dropdwon.js - fix IE/Opera behavior. They do not fire dropdwon menu onChange automatically anymore. Merged from 19. 2008-05-02 02:47:32 +00:00
jerome f89efbdcd7 file dropdown.js was added on branch MOODLE_18_STABLE on 2008-05-02 02:47:32 +0000 2008-05-02 02:38:36 +00:00
moodlerobot ab3b0e99bc Updated the 18 build version to 20080502 2008-05-02 01:57:17 +00:00
moodlerobot 564c86821e Automatic installer.php lang files by installer_builder (20080502) 2008-05-02 01:42:25 +00:00
dongsheng 61b8c43f38 "MDL-7362, allow_call_time_pass_reference setting may cause bug, see tracker, thanks James" 2008-05-01 08:33:42 +00:00
scyrma f39309cba8 MDL-3381: Remove all remaining core calls to ctype_* functions and make ctype a recommended optional library. (backport from 1.9) 2008-05-01 08:07:53 +00:00
dongsheng f1be9a633d "MDL-10944, fix undefined property in chatd.php" 2008-05-01 06:56:26 +00:00
scyrma 74226d322e MDL-14590 - Spellchecker now working in the messaging system too (backport from 1.9) 2008-05-01 05:21:11 +00:00
moodlerobot 1f5f554d2b Updated the 18 build version to 20080501 2008-05-01 02:01:37 +00:00
moodlerobot b671a8f0aa Automatic installer.php lang files by installer_builder (20080501) 2008-05-01 01:46:28 +00:00
poltawski aa2b1ba10d MDL-12614 - Bad regular expression matching was causing syntactically
invalid js when returning to previously attempted SCORM package.

merged from MOODLE_19_STABLE
2008-04-30 11:54:39 +00:00
moodlerobot 094a70b7a1 Updated the 18 build version to 20080430 2008-04-30 01:59:06 +00:00
dongsheng acbbc1e3d3 "MDL-14262, fix optional_param, backported from MOODLE_19_STABLE" 2008-04-30 01:53:17 +00:00
moodlerobot 8794dfd840 Automatic installer.php lang files by installer_builder (20080430) 2008-04-30 01:42:55 +00:00
dongsheng 325d9bd4d6 "MDL-14262, fix wrong logged link, see tracker" 2008-04-30 01:09:34 +00:00
jerome a671e19ae8 MDL-13815 - Course summary text is optional and empty by default now 2008-04-29 03:51:43 +00:00
moodlerobot fbc1f0e5ba Updated the 18 build version to 20080429 2008-04-29 01:59:57 +00:00
moodlerobot ab84aff0ec Automatic installer.php lang files by installer_builder (20080429) 2008-04-29 01:44:35 +00:00
stronk7 85b22635ac Fixed old-glorious typo in wiki backup. MDL-10811 2008-04-28 23:08:02 +00:00
diml f1678f0ed1 Contributes to MDL12324 - fixes search failure when using extended chars (non ascii) in query strings 2008-04-28 16:28:35 +00:00
moodlerobot 857570c420 Updated the 18 build version to 20080428 2008-04-28 01:57:01 +00:00
skodak f07e806dd8 MDL-14564 fixed whitespace 2008-04-27 22:41:36 +00:00
skodak 556e66c964 MDL-14564 pg null trouble fixed by David Mudrak 2008-04-27 22:35:39 +00:00
dongsheng 0cc7163e28 MDL-14262, fix incorrect link, see tracker, merged from MOODLE_19_STABLE 2008-04-27 17:09:22 +00:00
stronk7 3b384c750f glossary->id for block is now properly recoded by restore. MDL-4934 2008-04-27 01:53:25 +00:00
moodlerobot 28580a7575 Updated the 18 build version to 20080427 2008-04-27 01:52:41 +00:00
stronk7 02671df098 Backporting from HEAD some recent improvements in order to be able
to restore block instances properly. MDL-4934
2008-04-27 01:49:44 +00:00
moodlerobot 141dd0001f Updated the 18 build version to 20080426 2008-04-26 01:58:10 +00:00
skodak 011bdd6a6c MDL-14557 PostgreSQL+empty integer problem: user/editadvanced_form.php - credit goes to David Mudrak 2008-04-25 14:41:28 +00:00
skodak 71b860de73 MDL-14499 backporting fix for missing data:uploadentries 2008-04-25 14:19:36 +00:00
moodlerobot 0e4d297634 Updated the 18 build version to 20080425 2008-04-25 02:02:05 +00:00
moodlerobot 45a8715ca3 Automatic installer.php lang files by installer_builder (20080425) 2008-04-25 01:44:31 +00:00
scyrma 9fe384b2f4 Typo in code: 'a/' is wrong, '/a' is good. 2008-04-24 08:01:12 +00:00
dongsheng 00611f4a3e MDL-14292, fix html, see tracker, thanks Chris 2008-04-24 04:15:02 +00:00
moodlerobot 1aae2de951 Updated the 18 build version to 20080424 2008-04-24 02:02:21 +00:00
tjhunt 97578db412 MDL-13982 - Performance problem when deleting questions from large question banks. Thanks to Michael Spall for this fix. 2008-04-23 13:44:31 +00:00
tjhunt 80f7917245 MDL-14063 - Backport notice fix and whitespace cleanups from 1.9. 2008-04-23 10:57:52 +00:00
tjhunt 14bb4c1ad9 MDL-11978 - Backport admin notification from MDL-11061 about bogus $CFG->wwwroot from 1.9 to 1.8 and 1.7. 2008-04-23 10:38:10 +00:00
moodler 5fe44967f8 Merged MDL-14483 from 1.9 Use the recipient language to send email 2008-04-23 02:25:55 +00:00
moodlerobot 9c2e402dd8 Updated the 18 build version to 20080423 2008-04-23 02:02:43 +00:00
tjhunt 5c3a8f2654 MDL-14352 - General feedback for descriptions not showing up on the review page, as it should. 2008-04-22 16:17:00 +00:00
tjhunt 85becf9549 MDL-14467 - qtype_multichoice help file in the wrong place. 2008-04-22 14:34:19 +00:00
tjhunt 8218ad778c file multichoice.html was added on branch MOODLE_18_STABLE on 2008-04-22 14:34:19 +0000 2008-04-22 14:34:18 +00:00
moodlerobot 2a0280735f Updated the 18 build version to 20080422 2008-04-22 02:05:20 +00:00
stronk7 de09e4e445 Replace custom casting code by proper sql_cast_char2int() core function. MDL-12893 ; backported from HEAD 2008-04-21 18:12:01 +00:00
stronk7 78356e70e8 Backporting sql_cast_char2int() to 18_STABLE. MDL-12893 2008-04-21 18:00:24 +00:00
pichetp e23cfada9c MDL-14435 Removing capitals merging from head 2008-04-21 02:53:35 +00:00
moodlerobot b6e64bdc3f Updated the 18 build version to 20080421 2008-04-21 01:54:12 +00:00
stronk7 49022d40e1 Replace low level $db->Concat() calls to Moodle sql_concat() cross-db alternative. MDL-13823 ; backported from HEAD 2008-04-20 22:17:29 +00:00
stronk7 c40ff3464d Modify sql_concat() to support all elements being numeric. MDL-13823 ; backported from HEAD 2008-04-20 21:20:45 +00:00
moodlerobot 4f569a8a67 Updated the 18 build version to 20080420 2008-04-20 01:52:30 +00:00
skodak 31620715c6 MDL-11396 backporting patch from MOODLE_19_STABLE 2008-04-19 23:16:00 +00:00
moodler b685c67b66 MDL-12742 Moved errant lang file in 1.8 2008-04-19 13:33:51 +00:00
moodler a8ee70a946 file block_search.php was added on branch MOODLE_18_STABLE on 2008-04-19 13:33:50 +0000 2008-04-19 13:27:08 +00:00
moodlerobot bb0d1297d8 Updated the 18 build version to 20080419 2008-04-19 01:53:58 +00:00
stronk7 e9b129a6a4 MDL-14072 - Backported from HEAD. Prevent NULLs, empties and numbers to be processed by:
- backup_encode_absolute_links() at backup
- restore_decode_absolute_links() at restore
2008-04-18 16:59:47 +00:00
moodler 0872afb8d2 MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students (Merged from 1.7) 2008-04-18 03:30:48 +00:00
moodlerobot 8bafccf4c4 Updated the 18 build version to 20080418 2008-04-18 01:57:46 +00:00
gbateson cb856ad077 removed setting of timeclose and timeopen when course format == "weeks" 2008-04-18 00:58:26 +00:00
diml eb791e1258 Fixes all registered unstabilities in MDL-14325, MDL-14328 and closes those buglines.
default values for global search parameters,
command quoting issues status choosed untill better resolution,
typo error in error message
2008-04-17 20:46:30 +00:00
stronk7 30e04e5e2a With get_my_courses() properly filtering out not vievable
courses for the user requesting the list, perfomr proper dimming
of not visible courses. Backported from HEAD. MDL-12855
2008-04-17 18:35:12 +00:00
tjhunt 42fd1a8187 MDL-8682 - yet another followup. The javascript still was not quite right. you cannot rely on the case of element.nodeName. 2008-04-17 13:07:37 +00:00
dongsheng 654689ef2d MDL-14320, remove useless icon in edit entry page, merged from MOODLE_19_STABLE 2008-04-17 09:43:44 +00:00
dongsheng a312c55950 MDL-8188, add approve.gif to chameleon theme 2008-04-17 02:29:33 +00:00
dongsheng 1406339b9f file approve.gif was added on branch MOODLE_18_STABLE on 2008-04-17 02:29:33 +0000 2008-04-17 02:27:58 +00:00
moodlerobot 1a139531bf Updated the 18 build version to 20080417 2008-04-17 01:55:58 +00:00
moodlerobot ec74ba1539 Automatic installer.php lang files by installer_builder (20080417) 2008-04-17 01:40:20 +00:00
dongsheng d1a734f2e3 MDL-14249, to keep ods lib exactly the same with excellib, some dummy function added 2008-04-16 07:15:54 +00:00
dongsheng 5508ecf266 MDL-14320, improve coding style, thanks Petr, merged from MOODLE_19_STABLE 2008-04-16 02:44:43 +00:00
moodlerobot 5bf4ae7fdb Updated the 18 build version to 20080416 2008-04-16 01:53:53 +00:00
stronk7 c602026c33 Fixed get_my_courses() to efectively filter out courses based in the user that
is requesting the list (not in the user the list is about). MDL-12855
2008-04-16 01:52:02 +00:00
diml 8ca823ad43 MDL14325 adds usemoodletoot key 2008-04-15 22:08:12 +00:00
diml 1674b69f3c Resolves quote issues - related to MDL14254 2008-04-15 21:30:12 +00:00
diml 59c1249cae Resolves MDL-14377 2008-04-15 21:18:03 +00:00
diml 2a8167fcc1 Resolves MDL-13992, MDL-14328 2008-04-15 21:11:29 +00:00
dongsheng 063970335d MDL-8778, fix last access date 2008-04-15 05:45:57 +00:00
moodler 072758e96a MDL-4485 Merged logging fix from 1.9 2008-04-15 03:41:08 +00:00
dongsheng d43aa0e36a MDL-8188, copy check.gif from mod/glossary to here, see tracker 2008-04-15 03:40:13 +00:00
dongsheng 0ffeb32266 file approve.gif was added on branch MOODLE_18_STABLE on 2008-04-15 03:40:13 +0000 2008-04-15 03:33:05 +00:00
dongsheng 3854fcb9f6 MDL-14320, remove icon when no file in entry, Thanks Robert 2008-04-15 02:39:25 +00:00
moodlerobot d10296c0e1 Updated the 18 build version to 20080415 2008-04-15 02:01:53 +00:00
moodler 14316a329b Bump to 1.8.5+ 2008-04-14 06:56:46 +00:00
moodlerobot 2cc8826edb Updated the 18 build version to 20080414 2008-04-14 02:00:24 +00:00
moodlerobot 9e864f2546 Automatic installer.php lang files by installer_builder (20080414) 2008-04-14 01:44:37 +00:00
skodak 1a92acfb1b MDL-14342 fixed wrong quotes; merged from MOODLE_19_STABLE 2008-04-13 22:26:41 +00:00
moodlerobot a3c6822887 Updated the 18 build version to 20080413 2008-04-13 01:54:44 +00:00
moodlerobot a64573c79c Automatic installer.php lang files by installer_builder (20080413) 2008-04-13 01:39:04 +00:00
moodlerobot 4c15367f44 Updated the 18 build version to 20080412 2008-04-12 01:52:38 +00:00
moodlerobot 0153d1b515 Automatic installer.php lang files by installer_builder (20080412) 2008-04-12 01:37:25 +00:00
diml 3c2e8010af fixes reported quote issue on $file in shel exec commands (MDL14325) backported 2008-04-11 23:23:16 +00:00
diml 151744819b fixes reported quote issue on $file in shel exec commands (MDL14325) 2008-04-11 23:22:58 +00:00
dongsheng 77cd174025 MDL-14249, add more needed functions to excellib.php 2008-04-11 07:42:58 +00:00
scyrma a2ae4ee63b MDL-9410 - In user profile display, add http:// to web links if it's not already there 2008-04-11 07:03:20 +00:00
dongsheng 388370bf88 MDL-12662, fix undefined index(IIS) 2008-04-11 05:32:57 +00:00
gbateson 116c28e0e9 do not show hidden HotPots on mod/hotpot/index.php 2008-04-11 05:12:14 +00:00
dongsheng 87b8241498 MDL-9534, fix xmlize() call 2008-04-11 03:58:40 +00:00
moodlerobot f5024e6deb Updated the 18 build version to 20080411 2008-04-11 01:58:42 +00:00
moodlerobot fb56caace7 Updated the 18 build version to 20080410 2008-04-10 01:56:18 +00:00
dongsheng 56ae2b7f26 MDL-12611, realign the help icon 2008-04-09 03:41:59 +00:00
dongsheng 643e83fd60 MDL-14091, fix myMoodle courses list sort order, Thanks Iñaki 2008-04-09 02:45:33 +00:00
moodlerobot 50ea3cc486 Updated the 18 build version to 20080409 2008-04-09 01:58:01 +00:00
stronk7 823844e709 Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; backported from HEAD 2008-04-08 23:19:34 +00:00
diml 779de749eb fixes slash issues that avoid finding relative pathes to converters 2008-04-08 22:00:03 +00:00
moodler 99312493b6 Bumped to Moodle 1.8.5 2008-04-08 14:48:01 +00:00
scyrma 0f4aa108d9 MDL-13792 - Commiting Patch by Skodak, fixing problem with japanese characters under some conditions. This has been reported to work, if nobody else
comes foward with bugs related to this, it will need to be changed everywhere else where there is no urlencoding done at this time.
2008-04-08 03:00:30 +00:00
moodlerobot 8e6e45aa1a Updated the 18 build version to 20080408 2008-04-08 02:01:15 +00:00
moodlerobot 040ea6d217 Automatic installer.php lang files by installer_builder (20080408) 2008-04-08 01:45:26 +00:00
diml 2e47bfb16b global sync to HEAD for passing fixes 2008-04-07 21:24:49 +00:00
diml 3702d88a6e upgrades Zend engine to version 1.5.0 2008-04-07 21:23:13 +00:00
diml 185441df1a file Wildcard.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:15 +0000 2008-04-07 20:45:44 +00:00
diml 1394c591c6 file Range.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:15 +0000 2008-04-07 20:45:43 +00:00
diml 278b82afec file Insignificant.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:45:43 +00:00
diml 5842492ff6 file Fuzzy.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:45:43 +00:00
diml c335b24901 file LowerCaseUtf8.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:44:21 +00:00
diml 3e70580216 file CaseInsensitive.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:43:30 +00:00
diml ae3071a0df file LockManager.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:38:19 +00:00
moodlerobot d778032a9e Updated the 18 build version to 20080407 2008-04-07 01:57:05 +00:00
stronk7 9d88867d0f Enforce DOT as decimal separator for Oracle. MDL-11629 ; backported from HEAD 2008-04-06 15:44:48 +00:00
moodlerobot 49d4be8ba5 Updated the 18 build version to 20080406 2008-04-06 01:51:26 +00:00
moodlerobot 7ca341ae94 Updated the 18 build version to 20080405 2008-04-05 01:35:54 +00:00
stronk7 b16206af1c Documenting local hack about MDL-14215 ; backporte from HEAD 2008-04-04 22:36:35 +00:00
stronk7 741859448b Fixed bug preventing correct detection of enums under mysqli. MDL-14215 ; backported from HEAD 2008-04-04 19:56:15 +00:00
stronk7 fd6024c0be Fix wrong conversion from '0' to '' in oracle_diry_hack. MDL-14182 ; backported from HEAD 2008-04-04 11:27:03 +00:00
moodlerobot 9037920594 Updated the 18 build version to 20080404 2008-04-04 01:35:25 +00:00
moodlerobot 203968ccae Automatic installer.php lang files by installer_builder (20080404) 2008-04-04 01:23:14 +00:00
stronk7 9eb290680b Fixed DST calculation when requesting explicit (parameter) timezones. MDL-14093 ; backported from HEAD 2008-04-03 18:10:21 +00:00
moodlerobot 1510c6c913 Updated the 18 build version to 20080403 2008-04-03 01:29:38 +00:00
moodlerobot faed109b67 Updated the 18 build version to 20080402 2008-04-02 03:38:59 +00:00
skodak a0a264068f MDL-13792 reverting previous commits - the use of urlencode() is not correct 2008-04-01 20:24:00 +00:00
tjhunt 8db9017fd8 MDL-8682 - once again. It won't work all the time if the javascript is inside an if statement. 2008-04-01 16:51:03 +00:00
skodak 96b4500a91 MDL-10660 reverting previous changes - see tracker 2008-04-01 08:52:19 +00:00
moodlerobot 2fbc9fcb8b Updated the 18 build version to 20080401 2008-04-01 03:33:04 +00:00
scyrma f9085923a2 MDL-13792 - Fix to prevent urlencoding of '/' 2008-04-01 01:55:00 +00:00
tjhunt c612c32231 Backport JS improvements from MDL-8682. 2008-03-31 15:09:41 +00:00
nicolasconnault f8d1a60893 MDL-13397 Fixed the language string. Merging from HEAD 2008-03-31 06:18:11 +00:00
skodak 947c93bc0a MDL-13506 backport of adodb 4.98 from MOODLE_19_STABLE 2008-03-31 06:12:48 +00:00
moodlerobot f63a256c87 Updated the 18 build version to 20080331 2008-03-31 03:34:17 +00:00
moodlerobot cdfbc956fc Updated the 18 build version to 20080330 2008-03-30 03:33:26 +00:00
stronk7 9922fbf9d6 Not visible courses don't cause unenrolment under LDAP anymore. Credit goes to Iñaki Arenaza. MDL-14097 ; backported from HEAD 2008-03-30 00:47:26 +00:00
moodlerobot 31df961fd2 Updated the 18 build version to 20080329 2008-03-29 03:28:15 +00:00
moodlerobot 288b5b4028 Updated the 18 build version to 20080328 2008-03-28 03:35:53 +00:00
moodlerobot e94ed1ae6e Updated the 18 build version to 20080327 2008-03-27 03:34:54 +00:00
scyrma 57be0ec8f7 MDL-13792 - Use urlencode for filename in upload and uploadsingle assignments to fix problems with multibytes filenames. 2008-03-27 01:48:17 +00:00
moodlerobot 1b7d1827de Updated the 18 build version to 20080326 2008-03-26 03:39:09 +00:00
moodlerobot b10c986edc Automatic installer.php lang files by installer_builder (20080326) 2008-03-26 03:24:57 +00:00
dongsheng 18dd81c215 MDL-12531 add institution to lockable fileds, thanks for your patch, Lgor Plisco 2008-03-26 00:45:06 +00:00
moodlerobot 2468aba863 Updated the 18 build version to 20080325 2008-03-25 03:34:45 +00:00
moodlerobot c4826181c8 Automatic installer.php lang files by installer_builder (20080325) 2008-03-25 03:22:08 +00:00
dongsheng 54ad70b035 MDL-10660, check whether memcache has been installed. 2008-03-25 02:16:59 +00:00
dongsheng 66feb0092d MDL-10606 Corrected course search box id 2008-03-25 01:13:34 +00:00
dongsheng c852b07683 MDL-10606, change course search box id 2008-03-25 01:01:00 +00:00
dongsheng 133e54629f MDL-13287, fix a link. 2008-03-25 00:27:35 +00:00
moodlerobot 7d9881cdea Updated the 18 build version to 20080324 2008-03-24 03:29:56 +00:00
moodlerobot 95ae6fbf1f Updated the 18 build version to 20080323 2008-03-23 03:27:50 +00:00
stronk7 169d90353f Update timezone rules to tzdata2008a. MDL-14024 ; backported from HEAD 2008-03-22 23:46:53 +00:00
moodlerobot dd6f51b926 Updated the 18 build version to 20080322 2008-03-22 03:28:19 +00:00
moodlerobot 8dea9afdee Updated the 18 build version to 20080321 2008-03-21 03:26:11 +00:00
diml 91b1bf8572 shooting out debug code see MDL-13993 2008-03-20 19:31:21 +00:00
ikawhero 948cff69a6 Fixed typo that was affecting the reordering of custom profile fields.
MDL-13909.
2008-03-20 09:13:14 +00:00
moodlerobot 1f1df4b191 Updated the 18 build version to 20080320 2008-03-20 03:33:04 +00:00
scyrma df226eb12d MDL-13959 - Fix from Eloy - this makes the timezone-related functions accept an optional parameter different from the current user timezone. (backport) 2008-03-20 03:08:06 +00:00
scyrma 88d8fff6d7 MDL-13934 - Commit patch by Eloy - prevent display of moodle docs link on redirect pages 2008-03-19 08:23:26 +00:00
moodlerobot afd64674a5 Updated the 18 build version to 20080319 2008-03-19 03:33:41 +00:00
moodlerobot 26eee29f1e Updated the 18 build version to 20080318 2008-03-18 03:35:10 +00:00
nicolasconnault 3c6767e8ad MDL-13743 Added realmedia support 2008-03-17 13:14:11 +00:00
stronk7 5bdab31478 Glossary extended search fixed. MDL-13947 ; backported from HEAD 2008-03-17 12:31:45 +00:00
moodlerobot e883fe1ab2 Updated the 18 build version to 20080317 2008-03-17 03:33:21 +00:00
moodlerobot fa6947c2cd Updated the 18 build version to 20080316 2008-03-16 03:31:33 +00:00
moodlerobot 8536a9fbc6 Updated the 18 build version to 20080315 2008-03-15 03:35:29 +00:00
moodlerobot 19a7b0aaff Automatic installer.php lang files by installer_builder (20080315) 2008-03-15 03:20:32 +00:00
moodlerobot d3b10b9746 Updated the 18 build version to 20080314 2008-03-14 03:33:02 +00:00
moodlerobot 38aa918f2f Automatic installer.php lang files by installer_builder (20080314) 2008-03-14 03:20:12 +00:00
nicolasconnault 3a9ad62295 MDL-13919 Fixed undefined variable. Merging from MOODLE_17_STABLE 2008-03-13 14:02:11 +00:00
moodlerobot efd1898dc0 Updated the 18 build version to 20080313 2008-03-13 03:34:45 +00:00
moodlerobot 719faf3548 Updated the 18 build version to 20080312 2008-03-12 03:43:56 +00:00
moodlerobot e155f2040b Automatic installer.php lang files by installer_builder (20080312) 2008-03-12 03:30:01 +00:00
danmarsden ec8d4ea9cd MDL-9666 Merged from 1.9 and HEAD 2008-03-11 23:44:17 +00:00
ethem 0425032153 Race condition in cron for Scheduled-Capture (very very big sites and order review enabled only).
In one cron, 250-500 orders may be processed (based on 5 minutes).
If an admin sets cron time up smaller than 5 minutes and
250-500> new transactions are made after last cron executed, it can be blocked.
Authorize cron sets up an_lastcron every time when admin/cron.php executes.
This must be set up after blocking check code.

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

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

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

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

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

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

Thanks to Wen Hao Chuang for the fix!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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


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

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

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

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

This initial function checks whether memory usage in this process exceeded
10MiB or $CFG->apachemaxmem (int, in bytes). This is really useful to prevent
using more RAM than we have.
2007-04-05 05:00:39 +00:00
toyomoyo c4269c100d fix for MDL-9197, multilang filter is not applied to default role in course settings 2007-04-05 03:56:22 +00:00
moodler b2e3ce3b2b Automatic installer.php lang files by installer_builder (20070405) 2007-04-05 03:37:47 +00:00
nicolasconnault 9a14f39663 Finally fixed XHTML error on this page. 2007-04-05 03:36:08 +00:00
nicolasconnault b41ee5a874 MDL-9204 New submission wasn't given a timemodified upon creation. 2007-04-05 03:18:45 +00:00
nicolasconnault 79c8c1dba4 Fixed broken XHTML 2007-04-05 02:11:24 +00:00
nicolasconnault 6907f59129 MDL-9207 2007-04-05 01:53:28 +00:00
nicolasconnault 2413b939a7 MDL-9090 2007-04-05 01:43:42 +00:00
skodak e2dd0ea71e MDL-8802 fixed byteserving broken by adobe anti xss patch 2007-04-04 19:43:53 +00:00
tjhunt 8ef0022d29 MDL-9208 - Only hightlight the correct answer if that option is set. 2007-04-04 18:01:27 +00:00
tjhunt 8fe9be5d8c Bug 2951 - correct PARAM_ types for answers to multichoice and shortanswer questions. Merged from OU Moodle. 2007-04-04 16:51:05 +00:00
tjhunt 9f64c0e6b7 MDL-9183 - yet another invisiblefieldset causing layout problems. 2007-04-04 15:30:28 +00:00
jamiesensei 1859dfe70d fixes MDL-9195 mform->hardFreeze() doesn't remove id attribute of label for checkbox 2007-04-04 10:27:16 +00:00
skodak 78fdca9618 MDL-9191 fix for potential incorrect use of get_auth_plugin 2007-04-04 09:18:24 +00:00
moodler db9b5fc35c Increased online users allowed (50) and added some rounding for performance MDL-6553 2007-04-04 07:22:42 +00:00
nicolasconnault 62c50f8579 MDL-9124 Added a visual notification when group membership doesn't allow adding discussions. 2007-04-04 06:24:30 +00:00
nicolasconnault bb576411ca Added rows and cols to menu options textarea, fixing xhtml break. 2007-04-04 04:38:47 +00:00
nicolasconnault be5ceecd4d MDL-9144 2007-04-04 04:30:21 +00:00
nicolasconnault a7ad3d051a MDL-9135: 2007-04-04 04:21:31 +00:00
nicolasconnault b847c863d9 MDL-9136: Added a $selected attribute to the profile_field_menu object, which gets set during initialisation. 2007-04-04 04:08:54 +00:00
toyomoyo d857dbc1c3 fix for MDL-9185 2007-04-04 04:03:27 +00:00
moodler 0e62d79714 Automatic installer.php lang files by installer_builder (20070404) 2007-04-04 04:02:59 +00:00
nicolasconnault 86b331477a MDL-9138; Edited lib/xmlize.php to return false when the passed file doesn't return any entries (when it's not valid XML or is empty). Also made it much clearer that glossary/import requires an XML file, not just any old file. 2007-04-04 03:34:00 +00:00
nicolasconnault 1cad7ef6fe MDL-9192: 2007-04-04 02:39:26 +00:00
nicolasconnault f4493074ae MDL-9193 2007-04-04 02:21:47 +00:00
nicolasconnault a204aa1838 MDL-9145 Fixed 1) and 2) 2007-04-04 01:42:43 +00:00
stronk7 b3a55ad382 Show continue button after importing glossary. MDL-9071 2007-04-03 15:42:25 +00:00
skodak 74edbb3c5f MDL-9170 https redirect doesn't happen on login page - fixed problem when guest button disabled 2007-04-03 14:58:30 +00:00
nfreear 381070ab03 Fixes bug MDL-9175 "Groups simpletest, fatal errors", also DONOTCOMMIT. Merged. 2007-04-03 10:21:38 +00:00
nfreear a2e32e1603 Fixes bug MDL-9175 "Groups simpletest, fatal errors". 2007-04-03 10:15:23 +00:00
skodak 4d5dd30513 MDL-9190 Site policy xhtml compliance and other minor fixes 2007-04-03 09:50:39 +00:00
nicolasconnault 380a4235ff MDL-9147 2007-04-03 08:23:51 +00:00
nicolasconnault 0efd6699e2 MDL-9167 and MDL-9113 both solved 2007-04-03 06:38:40 +00:00
nicolasconnault e8a2e5e491 Removed experimental Preset class, only in HEAD now 2007-04-03 04:10:42 +00:00
nicolasconnault 89a4886523 MDL-8774 2007-04-03 03:30:36 +00:00
moodler 2f48f37d29 A bit more perfectionism about checkbox alignment MDL-9126 2007-04-03 02:20:18 +00:00
moodler 372bd6bd34 Fixing checkbox alignment in ie6 MDL-9126 2007-04-03 02:13:15 +00:00
moodler 28f2414b0d FIx for wierd alignment on IE6 MDL-9126 2007-04-03 01:59:32 +00:00
stronk7 9b3939b8f5 Fixed one wrong urlencoe after error. 2007-04-02 22:01:21 +00:00
stronk7 ecb80afb03 Disable the "save" button if the file isn't writable. 2007-04-02 21:50:03 +00:00
stronk7 f0a346c4ff Centering buttons in some actions... 2007-04-02 21:36:08 +00:00
skodak 823ea10f96 MDL-9180 Change password screen doesn't show the username like it should 2007-04-02 18:02:20 +00:00
skodak c57aac2fb1 MDL-9168 nested site policy when forcelogin enabled 2007-04-02 16:12:26 +00:00
tjhunt a57365af9c Make sure print_object output is always left-aligned. Also, make it look more like other debugging output. 2007-04-02 15:28:47 +00:00
tjhunt 8a5ebf7f29 Missing format_string. 2007-04-02 15:26:09 +00:00
skodak f1a1f86ede MDL-9174 do not use PARAM_URL for site policy - it is too restrictive 2007-04-02 15:12:22 +00:00
skodak 31c6df4382 fixed warning when upload fails 2007-04-02 14:53:13 +00:00
exe-cutor 69beb9a8af Fixed bug that showed username of Shib users in manual login form 2007-04-02 14:12:02 +00:00
skodak d66683e160 MDL-9170 https redirect doesn't happen on login page 2007-04-02 13:58:01 +00:00
skodak e4335c36db MDL-9172 "Turn editing off" button disappear from category page 2007-04-02 13:44:20 +00:00
skodak 66c8048d55 MDL-9169 Error in function call in ldap/enrol.php; typo found by Svante Agnestig 2007-04-02 13:15:36 +00:00
tjhunt db0f3b9159 MDL-9173 - Can't create match anything answer to numerical question type. Merged from OU Moodle. 2007-04-02 13:02:17 +00:00
skodak 4a4d9b02df MDL-9166 auth plugins can prevent showing of last logged in user 2007-04-02 09:24:40 +00:00
skodak 86d1a59ede MDL-9155 Error when creating an "image gallery" preset database when only some fields exist and do not remove existing data, comments and ratings when applying preset 2007-04-02 09:08:54 +00:00
exe-cutor 4dbb62e0c0 Corrected example script in README 2007-04-02 07:28:35 +00:00
moodler 05ffd0842e Bump post 1.8 2007-04-02 06:43:18 +00:00
toyomoyo 345b5ba60d fix for MDL-9160, get_my_courses caching issues 2007-04-02 03:50:55 +00:00
toyomoyo 9be1b6a45e admins should not have course:view capability 2007-04-02 02:36:27 +00:00
donal72 aecd299b7a MNET: Properly remove trailing slash from wwwroot: MDL-9157 2007-04-02 01:45:37 +00:00
moodler f02d236f78 Make coursemanager easier to set to nothing. MDL-9139 2007-04-01 15:58:13 +00:00
moodler 731fa029cd Centered the submit button when editing section summary 2007-04-01 15:16:09 +00:00
stronk7 cc1eb9113b Bump backup version 2007-04-01 10:32:25 +00:00
moodler e3a3eacf9e Moved the required fields message over to the right 2007-03-31 09:09:27 +00:00
moodler 15152a0a44 Fix for MDL-6458 2007-03-31 05:23:32 +00:00
moodler 0681430f0f Fixed up the block self-test 2007-03-30 18:00:47 +00:00
1355 changed files with 64491 additions and 48932 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
+16 -4
View File
@@ -140,9 +140,15 @@ $registrationauths = array();
$registrationauths[''] = $txt->disable;
foreach ($authsenabled as $auth) {
$authplugin = get_auth_plugin($auth);
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Apply titles
$displayauths[$auth] = $authtitle;
if ($authplugin->can_signup()) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
$registrationauths[$auth] = $authtitle;
}
}
@@ -151,9 +157,15 @@ foreach ($authsavailable as $auth) {
continue; //already in the list
}
$authplugin = get_auth_plugin($auth);
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Apply titles
$displayauths[$auth] = $authtitle;
if ($authplugin->can_signup()) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
$registrationauths[$auth] = $authtitle;
}
}
+19 -11
View File
@@ -9,6 +9,7 @@ require_once $CFG->libdir.'/adminlib.php';
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$auth = required_param('auth', PARAM_SAFEDIR);
$CFG->pagepath = 'auth/' . $auth;
$authplugin = get_auth_plugin($auth);
$err = array();
@@ -50,32 +51,39 @@ if ($frm = data_submitted()) {
$frm = get_config("auth/$auth");
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");
$modules = get_list_of_plugins('auth');
foreach ($modules as $module) {
$options[$module] = get_string("auth_{$module}title", 'auth');
}
asort($options);
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Get the auth descriptions (from core or own auth lang files)
$authdescription = get_string("auth_{$auth}description", "auth");
if ($authdescription == "[[auth_{$auth}description]]") {
$authdescription = get_string("auth_{$auth}description", "auth_{$auth}");
}
// output configuration form
admin_externalpage_print_header($adminroot);
// choose an authentication method
echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />\n";
echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// auth plugin description
print_simple_box_start('center', '80%');
print_heading($options[$auth]);
print_simple_box_start('center', '60%', '', 5, 'informationbox');
print_string("auth_{$auth}description", 'auth');
print_heading($authtitle);
print_simple_box_start('center', '80%', '', 5, 'informationbox');
echo $authdescription;
print_simple_box_end();
echo "<hr />\n";
$authplugin->config_form($frm, $err, $user_fields);
print_simple_box_end();
echo '<center><p><input type="submit" value="' . get_string("savechanges") . "\" /></p></center>\n";
echo '<p style="text-align: center"><input type="submit" value="' . get_string("savechanges") . "\" /></p>\n";
echo "</div>\n";
echo "</form>\n";
admin_externalpage_print_footer($adminroot);
@@ -146,7 +154,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
echo '</td><td>';
echo "<input id=\"lockconfig_{$varname}\" name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
echo '<div align="right">';
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 />';
+1 -1
View File
@@ -59,7 +59,7 @@
print_heading($strblockname);
print_simple_box('<center>'.get_string('configwarning', 'admin').'</center>', 'center', '50%');
print_simple_box(get_string('configwarning', 'admin'), 'center', '50%');
echo '<br />';
echo '<form method="post" action="block.php">';
+8 -3
View File
@@ -54,7 +54,7 @@
if (!$block = blocks_get_record($multiple)) {
error("Block doesn't exist!");
}
$block->multiple = !$block->multiple;
$block->multiple = intval(!$block->multiple);
update_record('block', $block);
}
@@ -179,8 +179,13 @@
if($blockobject->has_config()) {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
}
$count = count_records('block_instance', 'blockid', $blockid);
// MDL-11167, blocks can be placed on mymoodle, or the blogs page
// and it should not show up on course search page
$count = count_records_sql('SELECT COUNT(*)
FROM '.$CFG->prefix.'block_instance
WHERE blockid = '.$blockid.' AND
pagetype = \'course-view\'');
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey={$USER->sesskey}\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$count</a>";
+36 -11
View File
@@ -98,11 +98,21 @@
$cron_function = $mod->name."_cron";
if (function_exists($cron_function)) {
mtrace("Processing module function $cron_function ...", '');
if (!empty($PERF->dbqueries)) {
$pre_dbqueries = $PERF->dbqueries;
$pre_time = microtime(1);
}
if ($cron_function()) {
if (! set_field("modules", "lastcron", $timenow, "id", $mod->id)) {
mtrace("Error: could not update timestamp for $mod->fullname");
}
}
if (isset($pre_dbqueries)) {
mtrace("... used " . ($PERF->dbqueries - $pre_dbqueries) . " dbqueries");
mtrace("... used " . (microtime(1) - $pre_time) . " seconds");
}
/// Reset possible changes by modules to time_limit. MDL-11597
@set_time_limit(0);
mtrace("done.");
}
}
@@ -127,6 +137,8 @@
mtrace('Error: could not update timestamp for '.$block->name);
}
}
/// Reset possible changes by blocks to time_limit. MDL-11597
@set_time_limit(0);
mtrace('done.');
}
}
@@ -137,18 +149,31 @@
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");
}
}
$somefound = false;
// The preferred way saves memory, dmllib.php
// find courses where limited enrolment is enabled
global $CFG;
$rs_enrol = get_recordset_sql("SELECT ra.roleid, ra.userid, ra.contextid
FROM {$CFG->prefix}course c
INNER JOIN {$CFG->prefix}context cx ON cx.instanceid = c.id
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.contextid = cx.id
WHERE cx.contextlevel = '".CONTEXT_COURSE."'
AND ra.timeend > 0
AND ra.timeend < '$timenow'
AND c.enrolperiod > 0
");
mtrace($rs_enrol->RecordCount().' to delete');
while ($oldenrolment = rs_fetch_next_record($rs_enrol)) {
role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid);
$somefound = true;
}
rs_close($rs_enrol);
if($somefound) {
mtrace('Done');
} else {
mtrace('none found');
@@ -199,8 +224,8 @@
/// Delete users who haven't completed profile within required period
if (!empty($CFG->deleteunconfirmed)) {
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if (!empty($CFG->deleteincompleteusers)) {
$cuttime = $timenow - ($CFG->deleteincompleteusers * 3600);
if ($users = get_users_not_fully_set_up($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
@@ -339,7 +364,7 @@
if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) {
// check we're not before our runtime
$timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today");
$timetocheck = strtotime("today $CFG->statsruntimestarthour:$CFG->statsruntimestartminute");
if (time() > $timetocheck) {
$time = 60*60*20; // set it to 20 here for first run... (overridden by $CFG)
+1 -1
View File
@@ -54,7 +54,7 @@ function delete_subdirectories($rootdir) {
$dir = opendir($rootdir);
while ($file = readdir($dir)) {
while (false !== ($file = readdir($dir))) {
if ($file != '.' and $file != '..') {
$fullfile = $rootdir .'/'. $file;
if (filetype($fullfile) == 'dir') {
+150
View File
@@ -117,6 +117,156 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="optional">
<FEEDBACK>
<ON_CHECK message="ctyperecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="optional">
<FEEDBACK>
<ON_CHECK message="ctyperecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/upgrade.php" function="question_random_check" level="optional">
<FEEDBACK>
<ON_OK message="questioncwqpfsok" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.0" requires="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="5.2.0" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+3 -3
View File
@@ -74,21 +74,21 @@
admin_externalpage_print_header($adminroot);
print_heading( $filtername );
print_simple_box("<center>".get_string("configwarning", "admin")."</center>", "center", "50%");
print_simple_box(get_string("configwarning", "admin"), "center", "50%");
echo "<br />";
print_simple_box_start("center",'');
?>
<form action="filter.php?filter=<?php echo urlencode($param->filter); ?>" method="post">
<div style="text-align: center">
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
<center>
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
<input type="submit" name="reset" value="<?php echo print_string('resettodefaults'); ?>" />
</center>
</div>
</form>
<?php
+41 -23
View File
@@ -189,10 +189,16 @@
/// Continue with the instalation
$db->debug = false;
if ($status) {
//ugly hack - install new groups: MDL-9217
require("$CFG->dirroot/group/version.php");
set_config('group_version', $group_version);
//install_group_db();
// Install the roles system.
moodle_install_roles();
set_config('statsrolesupgraded',time());
// Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
// (this should only have any effect during initial install).
$adminroot = admin_get_root();
@@ -276,16 +282,21 @@
require_once($CFG->libdir.'/environmentlib.php');
print_heading(get_string('environment', 'admin'));
if (!check_moodle_environment($release, $environment_results, true)) {
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('langpackwillbeupdated', 'admin');
print_box_end();
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
} else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('langpackwillbeupdated', 'admin');
print_box_end();
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</div>';
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="0" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
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>';
}
@@ -320,6 +331,10 @@
/// If successful, continue upgrading roles and setting everything properly
if ($status) {
if (empty($CFG->rolesactive)) {
// ugly hack - upgrade to new groups (from 1.6) : MDL-9217
// require_once("$CFG->dirroot/group/db/upgrade.php");
// MDL-11062, proper group upgrade code is done in lib/db/upgrade.php
// install_group_db();
// Upgrade to the roles system.
moodle_install_roles();
set_config('rolesactive', 1);
@@ -367,6 +382,11 @@
}
}
/// ugly hack - convert to new groups if upgrading from 1.7; must be reworked
require_once("$CFG->dirroot/group/db/upgrade.php");
upgrade_group_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Find and check all main modules and load them up or upgrade them if necessary
/// first old *.php update and then the new upgrade.php script
upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
@@ -394,6 +414,9 @@
/// first old *.php update and then the new upgrade.php script
upgrade_plugins('enrol', 'enrol', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all auth plugins and upgrade if necessary
upgrade_plugins('auth','auth',"$CFG->wwwroot/$CFG->admin/index.php");
/// Check all course formats and upgrade if necessary
upgrade_plugins('format','course/format',"$CFG->wwwroot/$CFG->admin/index.php");
@@ -402,10 +425,6 @@
require_once("$CFG->dirroot/lib/locallib.php");
upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for new groups and upgrade if necessary. TODO:
require_once("$CFG->dirroot/group/db/upgrade.php");
upgrade_group_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for changes to RPC functions
require_once($CFG->dirroot.'/admin/mnet/adminlib.php');
upgrade_RPC_functions("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
@@ -479,19 +498,7 @@
/// Check if the guest user exists. If not, create one.
if (! record_exists("user", "username", "guest")) {
$guest->auth = "manual";
$guest->username = "guest";
$guest->password = md5("guest");
$guest->firstname = addslashes(get_string("guestuser"));
$guest->lastname = " ";
$guest->email = "root@localhost";
$guest->description = addslashes(get_string("guestuserinfo"));
$guest->mnethostid = $CFG->mnet_localhost_id;
$guest->confirmed = 1;
$guest->lang = $CFG->lang;
$guest->timemodified= time();
if (! $guest->id = insert_record("user", $guest)) {
if (! $guest = create_guest_record()) {
notify("Could not create guest user record !!!");
}
}
@@ -540,15 +547,26 @@
print_box(get_string("upgrade$CFG->upgrade", "admin", "$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"));
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_box(get_string('globalsquoteswarning', 'admin'), 'generalbox adminwarning');
if (ini_get_bool('register_globals')) {
print_box(get_string('globalswarning', 'admin'), 'generalbox adminwarning');
}
if (is_dataroot_insecure()) {
print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
}
/// If no recently cron run
if (defined('WARN_DISPLAY_ERRORS_ENABLED')) {
print_box(get_string('displayerrorswarning', 'admin'), 'generalbox adminwarning');
}
if (substr($CFG->wwwroot, -1) == '/') {
print_box(get_string('cfgwwwrootslashwarning', 'admin'), 'generalbox adminwarning');
}
if (strpos($ME, $CFG->httpswwwroot.'/') === false) {
print_box(get_string('cfgwwwrootwarning', 'admin'), 'generalbox adminwarning');
}
/// If no recently cron run
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if (time() - $lastcron > 3600 * 24) {
$strinstallation = get_string('installation', 'install');
@@ -583,7 +601,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/en/Release">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
'<a href="http://docs.moodle.org/en/Release" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
+15 -7
View File
@@ -82,7 +82,7 @@
if (!$mode) {
print_box_start();
$currlang = current_language();
$langs = get_list_of_languages();
$langs = get_list_of_languages(false, true);
popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", false, 'self', $strcurrentlanguage.':');
print_heading("<a href=\"lang.php?mode=missing\">$strmissingstrings</a>");
print_heading("<a href=\"lang.php?mode=compare\">$streditstrings</a>");
@@ -455,7 +455,7 @@
echo $missingnext . '</td>';
} else {
echo '<td bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
echo '<td '.$cellcolour.' valign="top">'.$value.'</td>';
}
echo '</tr>'."\n";
}
@@ -468,8 +468,10 @@
echo '</td></tr>';
}
echo '</table>';
echo '</div>';
echo '</form>';
if ($editable) {
echo '</div>';
echo '</form>';
}
} else {
// no $currentfile specified
@@ -526,10 +528,12 @@ function lang_save_file($path, $file, $strings, $local, $packstrings) {
$value = lang_fix_value_before_save($value);
if ($id == "string" and $value != ""){
if ((!$local) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) {
// Either we are saving the master language pack
// or we are saving local language pack and the strings differ.
fwrite($f,"\$string['$stringname'] = '$value';\n");
if (LANG_KEEP_ORPHANS && isset($orphans[$stringname])) {
unset($orphans[$stringname]);
}
}
if (LANG_KEEP_ORPHANS && isset($orphans[$stringname])) {
unset($orphans[$stringname]);
}
}
}
@@ -560,6 +564,7 @@ function lang_fix_value_from_file($value='') {
$value = trim($value); // Delete leading/trailing white space
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("&","&amp;",$value); // Fixes MDL-9248
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
@@ -578,6 +583,9 @@ function lang_fix_value_before_save($value='') {
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
if (ini_get_bool('magic_quotes_sybase')) { // Unescape escaped sybase quotes
$value = str_replace("''", "'", $value);
}
$value = str_replace("'", "\\'", $value); // Add slashes for '
$value = str_replace('"', "\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
+12 -8
View File
@@ -29,6 +29,12 @@
admin_externalpage_print_header($adminroot);
//reset and diagnose lang cache permissions
@unlink($CFG->dataroot.'/cache/languages');
if (file_exists($CFG->dataroot.'/cache/languages')) {
notify('Language cache can not be deleted, please check permissions in dataroot.');
}
get_list_of_languages(true); //refresh lang cache
switch ($mode){
@@ -56,7 +62,7 @@
break;
case INSTALLED:
@unlink($CFG->dataroot.'/cache/languages');
get_list_of_languages(true); //refresh lang cache
redirect('langimport.php', get_string('langpackupdated','admin',$pack), -1, $adminroot);
break;
@@ -103,14 +109,14 @@
if (file_exists($dest2)){
$rm2 = remove_dir($dest2);
}
get_list_of_languages(true); //refresh lang cache
//delete the direcotries
if ($rm1 or $rm2) {
redirect('langimport.php', get_string('langpackremoved','admin'));
redirect('langimport.php', get_string('langpackremoved','admin'), 3, $adminroot);
} else { //nothing deleted, possibly due to permission error
error('An error has occurred, language pack is not completely uninstalled, please check file permissions');
}
}
@unlink($CFG->dataroot.'/cache/languages');
break;
case UPDATE_ALL_LANG: //1 click update for all updatable language packs
@@ -120,8 +126,7 @@
$source = 'http://download.moodle.org/lang16/languages.md5';
$md5array = array();
$updated = 0; //any packs updated?
unset($CFG->langlist); // ignore admin's langlist
$alllangs = array_keys(get_list_of_languages());
$alllangs = array_keys(get_list_of_languages(false, true)); //get all available langs
$lang16 = array(); //all the Moodle 1.6 unicode lang packs (updated and not updated)
$packs = array(); //all the packs that needs updating
@@ -247,8 +252,7 @@
echo '<form id="uninstallform" action="langimport.php?mode=4" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
unset($CFG->langlist); // ignore admin's langlist
$installedlangs = get_list_of_languages();
$installedlangs = get_list_of_languages(false, true);
/// display installed langs here
@@ -304,7 +308,7 @@
}
if ($remote) {
echo '</select>';
echo '<br /><input type="submit" value="&larr; '.get_string('install','admin').'" />';
echo '<br /><input type="submit" value="'.$THEME->larrow.' '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
+2 -2
View File
@@ -29,7 +29,7 @@ function mnet_get_functions($type, $parentname) {
$docname = 'rpclib.php';
$relname = '/mod/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
if (file_exists($filename)) include_once $filename;
$mnet_publishes = $parentname.'_mnet_publishes';
if (function_exists($mnet_publishes)) {
(array)$publishes = $mnet_publishes();
@@ -38,7 +38,7 @@ function mnet_get_functions($type, $parentname) {
// auth or enrol
$relname = '/'.$type.'/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
if (file_exists($filename)) include_once $filename;
$class = $type.($type=='enrol'? 'ment':'').'_plugin_'.$parentname;
if (class_exists($class)) {
$object = new $class();
+5 -5
View File
@@ -5,8 +5,8 @@ print_header("$site->shortname: $strmnetsettings", "$site->fullname",
print_heading(get_string('mnetsettings', 'mnet'));
?>
<center>
<table align="center" class="generalbox" border="0" cellpadding="5" cellspacing="0">
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table class="generalbox standard" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="generalboxcontent">
<table cellpadding="9" cellspacing="0" >
@@ -14,7 +14,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
<td colspan="2" class="header" cellpadding="0"><span><?php print_string('deleteaserver', 'mnet'); ?>Deleting a Server</span></td>
</tr>
<?php
if (count($warn) > 0):
if (count($warn) > 0){
?>
<tr valign="top">
<td align="right" colspan="2"><?php print_string('receivedwarnings','mnet'); ?>:<br />
@@ -22,7 +22,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
<?php
endif;
}
?>
<tr valign="top">
<td colspan="2"><?php print_string('reallydeleteserver','mnet'); ?>: "<?php echo $mnet_peer->name; ?>"?</td>
@@ -46,7 +46,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
</table>
</center>
</div>
<?php
print_footer();
?>
+3 -1
View File
@@ -1,10 +1,11 @@
<form id="assignform" method="post" action="">
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="host" value="<?php p($mnet_peer->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<table align="center" border="0" cellpadding="5" cellspacing="0">
<table class="generaltable" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php print_string('existingusers', 'role', count($mnetenrolledusers)); ?>
@@ -99,4 +100,5 @@
<td valign="top"></td>
</tr>
</table>
</div>
</form>
+6 -5
View File
@@ -29,9 +29,10 @@
print_box('<strong>' . s($host->name) . ' </strong><br />'
. get_string("enrolcourses_desc", "mnet"));
echo "<hr />";
echo '<hr />';
print ('<table align="center" >');
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table class="generaltable">';
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
" class=\"icon\" alt=\"".get_string("course")."\" />";
@@ -39,7 +40,7 @@
foreach ($courses as $course) {
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
. "host={$mnethost}&amp;courseid={$course->id}&amp;sesskey={$USER->sesskey}";
print ('<tr>'
echo '<tr>'
. "<td>$icon</td>"
. "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>"
. '</tr><tr>'
@@ -48,9 +49,9 @@
. '</tr><tr>'
. '<td></td>'
. "<td align=\"left\" >{$course->summary}</td>"
. '</tr>');
. '</tr>';
}
print ('</table>');
echo '</table></div>';
admin_externalpage_print_footer($adminroot);
+8 -6
View File
@@ -22,19 +22,20 @@
print_box(get_string("remoteenrolhosts_desc", "mnet"));
echo "<hr />";
echo '<hr />';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
print_box(get_string('mnetdisabled','mnet'));
}
print ('<table align="center" cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >'
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >'
. '<tr>'
. '<th class="header c0"> '.get_string('host', 'mnet').' </th>'
. '<th class="header c1"> '.get_string('enrolments', 'mnet').' </th>'
. '<th class="header c2"> '.get_string('courses', 'mnet').' </th>'
// . '<th class="header c3"> &nbsp; </th>'
. '</tr>');
. '</tr>';
$hosts = $enrolment->list_remote_servers();
foreach ($hosts as $host) {
$coursesurl = "{$CFG->wwwroot}/admin/mnet/enr_courses.php?host={$host->id}&amp;sesskey={$USER->sesskey}";
@@ -44,16 +45,17 @@
}
$enrolcount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_assignments WHERE hostid={$host->id}");
print ('<tr>'
echo '<tr>'
. "<td><a href=\"{$coursesurl}\">{$host->name}</a></td>"
. "<td align=\"center\" >$enrolcount</td>"
. "<td align=\"center\" >$coursecount - <a href=\"{$coursesurl}\">".get_string('editenrolments', 'mnet')."</a></td>"
// TODO: teach report/log/index.php to show per-host-logs
// . '<td align="center" ><a href="{$CFG->wwwroot}/admin/report/log/index.php?course_host={$host->id}">'
// . get_string('logs', 'mnet').'</a> </td>'
. '</tr>');
. '</tr>';
}
print ('</table>');
echo '</table>'
. '</div>';
admin_externalpage_print_footer($adminroot);
+3 -3
View File
@@ -40,7 +40,7 @@
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->submit) && $form->submit == get_string('savechanges')) {
if (in_array($form->mode, array("off", "strict", "promiscuous"))) {
if (in_array($form->mode, array("off", "strict", "dangerous"))) {
if (set_config('mnet_dispatcher_mode', $form->mode)) {
redirect('index.php', get_string('changessaved'));
} else {
@@ -112,8 +112,8 @@
<tr valign="top">
<td align="right"><?php print_string('net', 'mnet'); ?>:</td>
<td><input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="radio" name="mode" value="off" <?php echo ("off" == $CFG->mnet_dispatcher_mode)? 'checked="true"' : '' ?> /> <?php print_string('off', 'mnet'); ?> <br />
<input type="radio" name="mode" value="strict" <?php echo ("strict" == $CFG->mnet_dispatcher_mode)? 'checked="true"' : '' ?> /> <?php print_string('on', 'mnet'); ?><br />
<input type="radio" name="mode" value="off" <?php echo ("off" == $CFG->mnet_dispatcher_mode)? 'checked="checked"' : '' ?> /> <?php print_string('off', 'mnet'); ?> <br />
<input type="radio" name="mode" value="strict" <?php echo ("strict" == $CFG->mnet_dispatcher_mode)? 'checked="checked"' : '' ?> /> <?php print_string('on', 'mnet'); ?><br />
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
</td>
</tr>
+11 -9
View File
@@ -19,6 +19,7 @@ print_tabs(array($tabs), 'mnetdetails');
print_simple_box_start("center", "");
?>
<form method="post" action="peers.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="commit" />
<input type="hidden" name="last_connect_time" value="<?php echo $mnet_peer->last_connect_time; ?>" />
@@ -74,7 +75,7 @@ if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0) {
</tr>
<?php
if(!empty($currentkey)):
if(!empty($currentkey)) {
?>
<tr>
<td align="right" valign="top"></td>
@@ -85,30 +86,30 @@ if(!empty($currentkey)):
<td valign="top"><pre style="font-size: 8px;"><?php echo $currentkey;?></pre></td>
</tr>
<?php
endif;
}
if (isset($mnet_peer->id) && $mnet_peer->id > 0):
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
?>
<tr>
<td align="right" valign="top"><?php print_string('last_connect_time', 'mnet'); ?>:</td>
<td valign="top"><?php echo ($mnet_peer->last_connect_time == 0)? get_string('never','mnet') : date('H:i:s d/m/Y',$mnet_peer->last_connect_time);?></td>
</tr>
<?php
endif;
}
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0):
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0){
?>
<tr>
<td align="right" valign="top"><?php print_string('deleted'); ?>:</td>
<td valign="top">
<input type="radio" name="deleted" value="0" checked="true" /> <?php print_string('reenableserver','mnet'); ?><br />
<input type="radio" name="deleted" value="0" checked="checked" /> <?php print_string('reenableserver','mnet'); ?><br />
<input type="radio" name="deleted" value="1" /> <?php print_string('yes'); ?><br />
</td>
</tr>
<?php
endif;
}
if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address):
if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
?>
<tr>
<td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
@@ -119,13 +120,14 @@ if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address):
</tr>
<?php
endif;
}
?>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges"); ?>" /></td>
</tr>
</table>
</div>
</form>
<?php
print_simple_box_end();
+31 -8
View File
@@ -16,21 +16,22 @@ print_simple_box_start("center", "");
?>
<form method="post" action="mnet_services.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="<?php echo $mnet_peer->nextstep; ?>" />
<input type="hidden" name="hostid" value="<?php echo ($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
<table cellpadding="9" cellspacing="0" >
<?php
foreach($myservices as $name => $versions):
foreach($myservices as $name => $versions) {
$version = current($versions);
?>
<tr>
<td align="left" valign="top" colspan="2">
<h3><?php echo get_string($name.'_name', $version['parent_type'].'_'.$version['parent'] , $mnet_peer->name); ?></h3>
<p><?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?></p>
<?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?>
<?php
$breakstring = '';
foreach($versions as $version):
foreach($versions as $version){
if (count($versions) > 1) {
$versionstring = '('.get_string('version','mnet') .' '.$version['apiversion'].')';
} else {
@@ -40,16 +41,37 @@ print_simple_box_start("center", "");
echo $breakstring;
?>
<input type="hidden" name="exists[<?php echo $version['serviceid']; ?>]" value="1" />
<input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/><?php print_string('publish','mnet'); ?><?php echo $versionstring; if (!empty($version['hostsubscribes'])) echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">&radic;</a> '; if (!empty($version['allhosts_publish'])) print_string("enabled_for_all",'mnet',!empty($version['I_publish'])); ?><br />
<input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/><?php print_string('subscribe','mnet'); ?><?php echo $versionstring; if (!empty($version['hostpublishes'])) echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">&radic;</a> '; if (!empty($version['allhosts_subscribe'])) print_string("enabled_for_all",'mnet',!empty($version['I_subscribe'])); ?><br />
<?php
<input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/>
<?php
print_string('publish','mnet');
echo $versionstring;
if (!empty($version['hostsubscribes'])) {
echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">&radic;</a> ';
}
if (!empty($version['allhosts_publish'])) {
print_string("enabled_for_all",'mnet',!empty($version['I_publish']));
}
echo '<br />';
?>
<input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/>
<?php
print_string('subscribe','mnet');
echo $versionstring;
if (!empty($version['hostpublishes'])) {
echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">&radic;</a> ';
}
if (!empty($version['allhosts_subscribe'])) {
print_string("enabled_for_all",'mnet',!empty($version['I_subscribe']));
}
echo '<br />';
$breakstring = '. . . . . . . . . . . . . . . . . . . . . . . . <br>';
endforeach;
} // end foreach
?>
</td>
</tr>
<?php
endforeach;
} // end foreach
?>
<tr>
<td align="left" valign="top" colspan="2">
@@ -70,6 +92,7 @@ print_simple_box_start("center", "");
</td>
</tr>
</table>
</div>
</form>
<?php
print_simple_box_end();
+8 -1
View File
@@ -48,7 +48,14 @@
$publish = (isset($_POST['publish'][$key]) && $_POST['publish'][$key] == 'on')? 1 : 0;
$subscribe = (isset($_POST['subscribe'][$key]) && $_POST['subscribe'][$key] == 'on')? 1 : 0;
if (false == $host2service && ($publish == 1 || $subscribe == 1)) {
if ($publish != 1 && $subscribe != 1) {
if (false == $host2service) {
// We don't have or need a record - do nothing!
} else {
// We don't need the record - delete it
delete_records('mnet_host2service', 'hostid', $_POST['hostid'], 'serviceid', $key);
}
} elseif (false == $host2service && ($publish == 1 || $subscribe == 1)) {
$host2service = new stdClass();
$host2service->hostid = $_POST['hostid'];
$host2service->serviceid = $key;
+59 -54
View File
@@ -5,36 +5,38 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
print_box(get_string('mnetdisabled','mnet'));
}
?>
<center>
<form method="post" action="peers.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="updateregisterall" value="1" />
<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
<td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
</tr>
<tr>
<td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
</tr>
</table>
</form>
<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap"><?php print_string('site'); ?></th>
<th class="header c1" nowrap="nowrap"><?php print_string('system','mnet'); ?></th>
<th class="header c2" nowrap="nowrap"><?php print_string('last_connect_time', 'mnet'); ?></th>
<th class="header c3" nowrap="nowrap"></th>
</tr>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<form method="post" action="peers.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="updateregisterall" value="1" />
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
<td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
</tr>
<tr>
<td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
</tr>
</table>
</div>
</form>
<table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
<tr>
<th class="header c0"><?php print_string('site'); ?></th>
<th class="header c1"><?php print_string('system','mnet'); ?></th>
<th class="header c2"><?php print_string('last_connect_time', 'mnet'); ?></th>
<th class="header c3"></th>
</tr>
<?php
foreach($hosts as $host):
foreach($hosts as $host) {
if ($host->last_connect_time == 0) {
$last_connect = get_string('never');
@@ -46,43 +48,46 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
<tr>
<td class="cell c0"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->name; ?></a></td>
<td class="cell c1"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->wwwroot; ?></a></td>
<td class="cell c2" nowrap="nowrap"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
<td class="cell c2"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
<td class="cell c3">
<?php if ($host->id != $CFG->mnet_all_hosts_id): ?>
<?php if ($host->id != $CFG->mnet_all_hosts_id){ ?>
<form method="post" action="delete.php">
<div>
<input type="hidden" name="hostid" value="<?php echo $host->id; ?>" />
<input type="hidden" name="step" value="verify" />
<input type="submit" name="submit" value="<?php print_string('delete'); ?>"/>
</div>
</form>
<?php endif; ?>
<?php } ?>
</td>
</tr>
<?php
endforeach;
}
?>
<tr>
<td class="cell c4" colspan="4">&nbsp;</td>
</tr>
</table>
<form method="post" action="peers.php">
<tr>
<th class="header c4" nowrap="nowrap" colspan="4">
<?php print_string('addnewhost', 'mnet'); ?>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="input" />
</th>
</tr>
<tr>
<td class="cell c0"></td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2"></td>
<td class="cell c3"></td>
</tr>
<tr>
<td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
</tr>
<table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
<tr>
<th class="header c4" colspan="4">
<?php print_string('addnewhost', 'mnet'); ?>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="input" />
</th>
</tr>
<tr>
<td class="cell c0">wwwroot:</td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2"></td>
<td class="cell c3"></td>
</tr>
<tr>
<td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
</tr>
</table>
</form>
</table>
</center>
</div>
<?php
admin_externalpage_print_footer($adminroot);
?>
?>
+5
View File
@@ -50,6 +50,11 @@ if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->wwwroot)) {
// ensure we remove trailing slashes
$form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
// ensure the wwwroot starts with a http or https prefix
if (strtolower(substr($form->wwwroot, 0, 4)) != 'http') {
$form->wwwroot = 'http://'.$form->wwwroot;
}
}
if(!function_exists('xmlrpc_encode_request')) {
+25 -19
View File
@@ -1,36 +1,39 @@
<?php
admin_externalpage_print_header($adminroot);
?>
<center>
<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
<th class="header c0" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('trustedhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1" colspan="2"><form method="post" action="trustedhosts.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
<input type="submit" value="<?php print_string('savechanges'); ?>" />
<td class="cell c1" colspan="2">
<form method="post" action="trustedhosts.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
<input type="submit" value="<?php print_string('savechanges'); ?>" />
</div>
</form>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
<th class="header c0" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
</tr>
<?php
if (!empty($test_ip_address)):
if (!empty($test_ip_address)){
?>
<tr>
<td class="cell c1" colspan="2">
<?php
if ($in_range) {
print_string('is_in_range', 'mnet', $test_ip_address);
echo '<br>';
echo '<br />';
print_string('validated_by', 'mnet', $validated_by);
} else {
print_string('not_in_range', 'mnet', $test_ip_address);
@@ -39,24 +42,27 @@ admin_externalpage_print_header($adminroot);
</td>
</tr>
<?php
else:
} else {
?>
<tr>
<td class="cell c1" colspan="2"><?php print_string('testtrustedhostsexplain', 'mnet'); ?></td>
</tr>
<?php
endif;
}
?>
<tr>
<td class="cell c1" colspan="2"><form method="get" action="trustedhosts.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
<input type="submit" value="<?php print_string('go'); ?>" />
<td class="cell c1" colspan="2">
<form method="get" action="trustedhosts.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
<input type="submit" value="<?php print_string('go'); ?>" />
</div>
</form>
</td>
</tr>
</table>
</center>
</div>
<?php
admin_externalpage_print_footer($adminroot);
?>
?>
-1
View File
@@ -49,7 +49,6 @@
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
echo 'a';
$hostlist = preg_split("/[\s,]+/", $form->hostlist);
foreach($hostlist as $host) {
list($address, $mask) = explode('/', $host.'/');
+3 -3
View File
@@ -16,7 +16,7 @@
}
if ($module != '') {
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
// if the config.html contains a hidden form field giving
// the module name then the form does not have to prefix all
// its variable names, we will do it here.
@@ -43,7 +43,7 @@
/// Otherwise print the form.
$module = required_param('module', PARAM_SAFEDIR);
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
$strmodulename = get_string("modulename", $module);
@@ -55,7 +55,7 @@
print_heading($strmodulename);
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "60%");
print_simple_box(get_string("configwarning", 'admin'), "center", "60%");
echo "<br />";
print_simple_box_start("center", "");
+36 -19
View File
@@ -34,29 +34,45 @@
print_heading($stractivities);
$coursesaffected = false;
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $hide)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
set_field('course_modules', 'visibleold', '1', 'visible' ,'1', 'module', $module->id); // Remember the previous visible state so we can toggle this back if the module is unhidden.
set_field('course_modules', 'visibleold', '0', 'visible' ,'0', 'module', $module->id);
set_field("course_modules", "visible", "0", "module", $module->id); // Hide all related activity modules
$coursesaffected = true;
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
// Remember the visibility status in visibleold
// and hide...
$sql = "UPDATE {$CFG->prefix}course_modules
SET visibleold=visible,
visible=0
WHERE module={$module->id}";
execute_sql($sql, false);
// clear the course modinfo cache for courses
// where we just deleted something
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE visibleold=1 AND module={$module->id})";
execute_sql($sql, false);
}
if (!empty($show) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $show)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold', '1', 'module', $module->id); // Get the previous saved visible state for the course module.
$coursesaffected = true;
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold',
'1', 'module', $module->id); // Get the previous saved visible state for the course module.
// clear the course modinfo cache for courses
// where we just made something visible
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE visible=1 AND module={$module->id})";
execute_sql($sql, false);
}
if (!empty($delete) and confirm_sesskey()) {
@@ -89,6 +105,15 @@
}
}
// clear course.modinfo for courses
// that used this module...
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE module={$module->id})";
execute_sql($sql, false);
// Now delete all the course module records
if (!delete_records("course_modules", "module", $module->id)) {
notify("Error occurred while deleting all $strmodulename records in course_modules table");
@@ -124,20 +149,12 @@
// Delete the capabilities that were defined by this module
capabilities_cleanup('mod/'.$module->name);
// rebuild_course_cache(); // Because things have changed
$coursesaffected = true;
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
notice(get_string("moduledeletefiles", "", $a), "modules.php");
}
}
if ($coursesaffected) {
rebuild_course_cache(); // Because things have changed
}
/// Get and sort the existing modules
if (!$modules = get_records("modules")) {
+19 -7
View File
@@ -42,7 +42,7 @@ while(@ob_end_flush());
echo '<strong>Progress:</strong>';
$i = 0;
$skiptables = array($CFG->prefix.'config');//, $CFG->prefix.'sessions2');
$skiptables = array($CFG->prefix.'config', $CFG->prefix.'user_students', $CFG->prefix.'user_teachers');//, $CFG->prefix.'sessions2');
foreach ($tables as $table) {
if (($CFG->prefix && strpos($table, $CFG->prefix) !== 0)
@@ -63,12 +63,8 @@ foreach ($tables as $table) {
if ($rs and $rs->RecordCount() > 0) {
while (!$rs->EOF) {
$text = $rs->fields[$column];
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=".$rs->fields['id'], false);
}
$id = $rs->fields['id'];
if ($i % 600 == 0) {
echo '<br />';
}
@@ -77,6 +73,22 @@ foreach ($tables as $table) {
}
$i++;
$rs->MoveNext();
if (empty($text) or is_numeric($text)) {
continue; // nothing to do
}
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if (is_null($newtext)) {
continue; // regex error
}
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=$id", false);
}
}
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ if ($modid == '0') { // special
}
else {
$modname = get_field("modules","name","id",$modid);
require_once('mod/'.$modname.'/lib.php');
include_once('mod/'.$modname.'/lib.php');
}
$function = $modname.'_process_email';
+140
View File
@@ -0,0 +1,140 @@
<?php // $Id$
// index.php - scheduled backup logs
require_once('../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/backup/lib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportbackups', $adminroot);
admin_externalpage_print_header($adminroot);
$courseid = optional_param('courseid', 0, PARAM_INT);
require_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID));
/// Scheduled backups are disabled by the server admin
if (!empty($CFG->disablescheduledbackups)) {
print_error('scheduledbackupsdisabled', '', '', NULL, true);
}
/// Scheduled backups aren't active by the site admin
$backup_config = backup_get_config();
if (empty($backup_config->backup_sche_active)) {
notify(get_string('scheduledbackupsinactive'));
}
/// Get needed strings
$backuploglaststatus = get_string("backuploglaststatus");
$backuplogdetailed = get_string("backuplogdetailed");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strbackup = get_string("backup");
$strbackupdetails = get_string("backupdetails");
$strlogs = get_string("logs");
$strftimedatetime = get_string("strftimerecent");
$strftimetime = get_string("strftimetime").":%S";
$strerror = get_string("error");
$strok = get_string("ok");
$strunfinished = get_string("unfinished");
$strskipped = get_string("skipped");
$strcourse = get_string("course");
$strtimetaken = get_string("timetaken","quiz");
$strstatus = get_string("status");
$strnext = get_string("next");
/// Decide when to show last execution logs or detailed logs
/// Lastlog view
if (!$courseid) {
print_heading($backuploglaststatus);
print_simple_box_start('center');
/// Now, get every record from backup_courses
$courses = get_records("backup_courses");
if (!$courses) {
notify(get_string('nologsfound'));
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
//Print table header
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strcourse</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\"><font size=\"3\">$strtimetaken</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strstatus</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strnext</font></td></tr>";
foreach ($courses as $course) {
/// Get the course shortname
$coursename = get_field ("course","fullname","id",$course->courseid);
if ($coursename) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"><a href=\"index.php?courseid=$course->courseid\">".$coursename."</a></font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->laststarttime,$strftimedatetime)."</font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"> - </font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->lastendtime,$strftimedatetime)."</font></td>";
if ($course->laststatus == 1) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strok."</font></td>";
} else if ($course->laststatus == 2) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strunfinished."</font></td>";
} else if ($course->laststatus == 3) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strskipped."</font></td>";
} else {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strerror."</font></td>";
}
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->nextstarttime,$strftimedatetime)."</font></td>";
echo "</tr>";
}
}
echo "</table>";
}
print_simple_box_end();
/// Detailed View !!
} else {
print_heading($backuplogdetailed);
$coursename = get_field("course","fullname","id","$courseid");
print_heading("$strcourse: $coursename");
print_simple_box_start('center');
/// First, me get all the distinct backups for that course in backup_log
$executions = get_records_sql("SELECT DISTINCT laststarttime,laststarttime
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid'
ORDER BY laststarttime DESC");
/// Iterate over backup executions
if (!$executions) {
notify(get_string('nologsfound'));
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
foreach($executions as $execution) {
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\">";
print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center");
echo "</td>";
echo "</tr>";
$logs = get_records_sql("SELECT *
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid' AND
laststarttime = '$execution->laststarttime'
ORDER BY id");
if ($logs) {
foreach ($logs as $log) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($log->time,$strftimetime)."</font></td>";
$log->info = str_replace("- ERROR!!","- <font color=\"red\">ERROR!!</font>",$log->info);
$log->info = str_replace("- OK","- <font color=\"green\">OK</font>",$log->info);
echo "<td nowrap=\"nowrap\"><font size=\"2\">".str_replace(" ","&nbsp;&nbsp;&nbsp;&nbsp;",$log->info)."</font></td>";
echo "</tr>";
}
}
}
echo "</table>";
}
print_simple_box_end();
}
admin_externalpage_print_footer($adminroot);
?>
+2 -2
View File
@@ -10,9 +10,9 @@
require_login();
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM));
stats_check_uptodate($course->id);
stats_check_uptodate();
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
+74
View File
@@ -0,0 +1,74 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/question/upgrade.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportquestion', $adminroot);
admin_externalpage_print_header($adminroot);
print_heading(page_doc_link(get_string('adminreport', 'question')));
$probstr = '';
$contextupgradeversion = 2007081000;
if ($CFG->version < $contextupgradeversion){
///cwrqpfs issue
$probstr = print_heading(get_string('cwrqpfs', 'question'), '', 3, 'main', true);
if ($updates = question_cwqpfs_to_update()){
$probstr .=get_string('cwrqpfsinfo', 'question');
$probstr .= '<ul>';
$catlist = join(array_keys($updates), ',');
//get info about cateogries and no of questions used outside category's course
$categories = get_records_sql('SELECT qc.*, c.fullname as coursename FROM '.$CFG->prefix.'question_categories as qc, '
.$CFG->prefix.'course as c WHERE qc.course = c.id AND qc.id IN ('.$catlist.')');
foreach ($updates as $id => $publish){
$categories[$id]->caturl = "$CFG->wwwroot/question/category.php?sesskey=".sesskey().
"&amp;edit=$id&amp;id=".$categories[$id]->course;
if ($categories[$id]->publish){
$categories[$id]->changefrom = get_string('published', 'question');
$categories[$id]->changeto = get_string('unpublished', 'question');
} else {
$categories[$id]->changefrom = get_string('unpublished', 'question');
$categories[$id]->changeto = get_string('published', 'question');
}
$probstr .= '<li>'.get_string('changepublishstatuscat', 'question', $categories[$id]);
if ($questions = get_records_sql('SELECT q.*, qui.id as quizid, qui.name as quizname, cm.id as cmid, '
.'qui.course, c.fullname as coursename FROM '.$CFG->prefix.'question q, '
.$CFG->prefix.'quiz_question_instances qqi, '
.$CFG->prefix.'quiz qui, '
.$CFG->prefix.'course_modules cm, '
.$CFG->prefix.'modules m, '
.$CFG->prefix.'course c '
.'WHERE (q.category = '.$id.' AND qqi.question = q.id '
.'AND qqi.quiz = qui.id '
.'AND qui.course = c.id '
.'AND cm.instance = qui.id '
.'AND cm.module = m.id '
.'AND m.name = \'quiz\''
.'AND ('.$categories[$id]->course.' <> qui.course)) ORDER BY qui.id ASC')){
$probstr .= '<ul>';
foreach ($questions as $question){
$question->quizurl = "$CFG->wwwroot/mod/quiz/edit.php?cmid=".$question->cmid;
$question->qurl = "$CFG->wwwroot/question/question.php?cmid={$question->cmid}&amp;id={$question->id}&amp;returnurl=".urlencode($FULLME);
$probstr .= '<li>'.get_string('questionaffected', 'question', $question).'</li>';
}
$probstr .= '</ul>';
}
$probstr .= '</li>';
}
$probstr .= '</ul>';
} else {
$probstr .=('<p>'.get_string('cwrqpfsnoprob', 'question').'</p>');
}
}
if ($probstr) {
print_box($probstr);
} else {
print_box(get_string('noprobs', 'question'), 'boxwidthnarrow boxaligncenter generalbox');
}
admin_externalpage_print_footer($adminroot);
?>
+1 -2
View File
@@ -45,8 +45,7 @@ class ExHtmlReporter extends HtmlReporter {
$this->strrunonlyfolder = $this->get_string('runonlyfolder');
$this->strrunonlyfile = $this->get_string('runonlyfile');
check_theme_arrows();
$this->strseparator = ' <span class="sep">'.$THEME->rarrow.'</span> ';
$this->strseparator = get_separator();
}
/**
+2 -2
View File
@@ -80,9 +80,9 @@
echo '<form action="allowassign.php" method="post">';
print_table($table);
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
echo '</div></form>';
admin_externalpage_print_footer($adminroot);
+2 -2
View File
@@ -78,9 +78,9 @@
echo '<form action="allowoverride.php" method="post">';
print_table($table);
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
echo '</div></form>';
admin_externalpage_print_footer($adminroot);
+11 -17
View File
@@ -38,15 +38,13 @@
<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" /> <?
helpbutton ('hiddenassign', get_string('hiddenassign'));
?>
<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'); ?>" />
<input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
<input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$THEME->rarrow; ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<td valign="top">
@@ -59,13 +57,11 @@
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
echo "<optgroup label=\"$strsearchresults (" . $usercount . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
echo "</optgroup>\n";
@@ -75,11 +71,9 @@
.'<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++;
}
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
}
}
+98 -8
View File
@@ -163,7 +163,9 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'assign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
@@ -197,11 +199,16 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
} else if ($showall) {
$searchtext = '';
$previoussearch = 0;
}
}
if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
@@ -233,16 +240,99 @@
$LIKE = sql_ilike();
$FULLNAME = sql_fullname();
$select .= " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
$selectsql = " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
$select .= $selectsql;
} else {
$selectsql = "";
}
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
ORDER BY lastname ASC, firstname ASC');
if ($context->contextlevel > CONTEXT_COURSE) { // mod or block (or group?)
/// In the .html file below we loop through these results and exclude any in $contextusers
/************************************************************************
* *
* context level is above or equal course context level *
* in this case we pull out all users matching search criteria (if any) *
* *
* MDL-11324 *
* a mini get_users_by_capability() call here, this is done instead of *
* get_users_by_capability() because *
* 1) get_users_by_capability() does not deal with searching by name *
* 2) exceptions array can be potentially large for large courses *
* 3) get_recordset_sql() is more efficient *
* *
************************************************************************/
if ($possibleroles = get_roles_with_capability('moodle/course:view', CAP_ALLOW, $context)) {
$doanythingroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM));
$validroleids = array();
foreach ($possibleroles as $possiblerole) {
if (isset($doanythingroles[$possiblerole->id])) { // We don't want these included
continue;
}
if ($caps = role_context_capabilities($possiblerole->id, $context, 'moodle/course:view')) { // resolved list
if (isset($caps['moodle/course:view']) && $caps['moodle/course:view'] > 0) { // resolved capability > 0
$validroleids[] = $possiblerole->id;
}
}
}
if ($validroleids) {
$roleids = '('.implode(',', $validroleids).')';
$select = " SELECT u.id, u.firstname, u.lastname, u.email";
$countselect = "SELECT COUNT(u.id)";
$from = " FROM {$CFG->prefix}user u
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.userid = u.id
INNER JOIN {$CFG->prefix}role r ON r.id = ra.roleid";
$where = " WHERE ra.contextid ".get_related_contexts_string($context)."
AND u.deleted = 0
AND ra.roleid in $roleids";
$excsql = " AND u.id NOT IN (
SELECT u.id
FROM {$CFG->prefix}role_assignments r,
{$CFG->prefix}user u
WHERE r.contextid = $contextid
AND u.id = r.userid
AND r.roleid = $roleid
$selectsql)";
$availableusers = get_recordset_sql($select . $from . $where . $selectsql . $excsql);
}
$usercount = $availableusers->_numOfRows;
}
} else {
/************************************************************************
* *
* context level is above or equal course context level *
* in this case we pull out all users matching search criteria (if any) *
* *
************************************************************************/
/// MDL-11111 do not include user already assigned this role in this context as available users
/// so that the number of available users is right and we save time looping later
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
AND id NOT IN (
SELECT u.id
FROM '.$CFG->prefix.'role_assignments r,
'.$CFG->prefix.'user u
WHERE r.contextid = '.$contextid.'
AND u.id = r.userid
AND r.roleid = '.$roleid.'
'.$selectsql.')
ORDER BY lastname ASC, firstname ASC');
$usercount = $availableusers->_numOfRows;
}
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
$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=",
+3 -2
View File
@@ -89,7 +89,7 @@
<?php
print_heading_with_help(get_string('permissions','role'), 'permissions');
$strinherit = get_string('inherit','role');
$strinherit = get_string('notset','role');
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
@@ -113,7 +113,8 @@ $contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// MDL-11687
$strcapabilities = 'Capabilities';//s(get_string('capabilities', 'role'));
// prepare legacy defaults
if (!empty($role->legacytype)) {
+9 -1
View File
@@ -119,9 +119,12 @@
}
if (empty($errors)) {
$rolename = get_field('role', 'name', 'id', $newroleid);
add_to_log(SITEID, 'role', 'add', 'admin/roles/manage.php?action=add', $rolename, '', $USER->id);
redirect('manage.php');
}
}
break;
case 'edit':
@@ -228,10 +231,11 @@
unassign_capability($lcap, $roleid);
}
}
add_to_log(SITEID, 'role', 'edit', 'admin/roles/manage.php?action=edit&roleid='.$role->id, $role->name, '', $USER->id);
redirect('manage.php');
}
}
break;
case 'delete':
@@ -342,6 +346,8 @@
// dupilcate all the capabilities
role_cap_duplicate($sourcerole, $newrole);
}
$rolename = get_field('role', 'name', 'id', $newrole);
add_to_log(SITEID, 'role', 'duplicate', 'admin/roles/manage.php?roleid='.$newrole.'&action=duplicate', $rolename, '', $USER->id);
redirect('manage.php');
break;
@@ -352,6 +358,8 @@
if ($confirm and data_submitted() and confirm_sesskey()) {
reset_role_capabilities($roleid);
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log(SITEID, 'role', 'reset', 'admin/roles/manage.php?roleid='.$roleid.'&action=reset', $rolename, '', $USER->id);
redirect('manage.php?action=view&amp;roleid='.$roleid);
} else {
+2 -1
View File
@@ -30,7 +30,8 @@
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// MDL-11687
$strcapabilities = 'Capabilities';//s(get_string('capabilities', 'role'));
foreach ($capabilities as $capability) {
+2
View File
@@ -130,6 +130,8 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
redirect($baseurl);
}
+19
View File
@@ -162,6 +162,25 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
$activetwo = array();
}
/// Here other core tabs should go (always calling tabs.php files)
/// All the logic to decide what to show must be self-cointained in the tabs file
/// ej.:
/// include_once($CFG->dirroot . '/grades/tabs.php');
/// Finally, we support adding some 'on-the-fly' tabs here
/// All the logic to decide what to show must be self-cointained in the tabs file
if (isset($CFG->extratabs) && !empty($CFG->extratabs)) {
if ($extratabs = explode(',', $CFG->extratabs)) {
asort($extratabs);
foreach($extratabs as $extratab) {
/// Each extra tab mus be one $CFG->dirroot relative file
if (file_exists($CFG->dirroot . '/' . $extratab)) {
include_once($CFG->dirroot . '/' . $extratab);
}
}
}
}
if (!empty($secondrow)) {
$tabs = array($toprow, $secondrow);
} else {
+2 -2
View File
@@ -3,7 +3,7 @@
// This file defines settingpages and externalpages under the "courses" category
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on'));
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on','moodle/category:update'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
@@ -17,7 +17,7 @@ $ADMIN->add('courses', $temp);
// "backups" settingpage
$temp = new admin_settingpage('backups', get_string('backups','admin'));
$temp = new admin_settingpage('backups', get_string('backups','admin'),'moodle/site:backup');
$temp->add(new admin_setting_backupcheckbox('backup_sche_modules', get_string('includemodules'), get_string('backupincludemoduleshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_withuserdata', get_string('includemoduleuserdata'), get_string('backupincludemoduleuserdatahelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_metacourse', get_string('metacourse'), get_string('backupmetacoursehelp'), 0));
+1 -1
View File
@@ -6,7 +6,7 @@
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_configtext('langlist', get_string('langlist', 'admin'), get_string('configlanglist', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
-1
View File
@@ -5,7 +5,6 @@ $temp = new admin_settingpage('locationsettings', get_string('locationsettings',
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options = get_list_of_timezones();
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
+2 -1
View File
@@ -25,7 +25,7 @@ $temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnam
'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_URL));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
4 => get_string('siteblogs','blog'),
3 => get_string('courseblogs','blog'),
@@ -35,6 +35,7 @@ $temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', '
$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));
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', get_string('emailchangeconfirmation', 'admin'), get_string('configemailchangeconfirmation', 'admin'), 0));
$ADMIN->add('security', $temp);
+9
View File
@@ -155,6 +155,15 @@ $temp->add(new admin_setting_configselect('deleteunconfirmed', get_string('delet
6 => get_string('numhours', '', 6),
1 => get_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('deleteincompleteusers', get_string('deleteincompleteusers', 'admin'), get_string('configdeleteincompleteusers', 'admin'), 0, array(0 => get_string('never'),
168 => get_string('numdays', '', 7),
144 => get_string('numdays', '', 6),
120 => get_string('numdays', '', 5),
96 => get_string('numdays', '', 4),
72 => get_string('numdays', '', 3),
48 => get_string('numdays', '', 2),
24 => get_string('numdays', '', 1))));
$temp->add(new admin_setting_configselect('loglifetime', get_string('loglifetime', 'admin'), get_string('configloglifetime', 'admin'), 0, array(0 => get_string('neverdeletelogs'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
+1 -1
View File
@@ -72,7 +72,7 @@
if (!empty($pt)) {
echo '</td>';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="right-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
echo '</td>';
echo '</tr></table>';
+9 -9
View File
@@ -24,9 +24,9 @@
if (!$ok or !confirm_sesskey()) {
$message = '<br /><br />';
$message .= $CFG->dataroot.'/temp/olson.txt<br />';
$message .= $CFG->dataroot.'/temp/timezones.txt<br />';
$message .= '<a href="http://download.moodle.org/timezones/">http://download.moodle.org/timezones/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezones.txt">'.$CFG->dirroot.'/lib/timezones.txt</a><br />';
$message .= $CFG->dataroot.'/temp/timezone.txt<br />';
$message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
$message .= '<br />';
$message = get_string("configintrotimezones", 'admin', $message);
@@ -54,7 +54,7 @@
/// Next, look for a CSV file locally
$source = $CFG->dataroot.'/temp/timezones.txt';
$source = $CFG->dataroot.'/temp/timezone.txt';
if (!$importdone and is_readable($source)) {
if ($timezones = get_records_csv($source, 'timezone')) {
update_timezone_records($timezones);
@@ -64,17 +64,17 @@
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezones/';
$source = 'http://download.moodle.org/timezone/';
if (!$importdone and ini_get('allow_url_fopen')) {
if (is_readable($source) && $contents = file_get_contents($source)) { // Grab whole page
if ($file = fopen($CFG->dataroot.'/temp/timezones.txt', 'w')) { // Make local copy
if ($file = fopen($CFG->dataroot.'/temp/timezone.txt', 'w')) { // Make local copy
fwrite($file, $contents);
fclose($file);
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezones.txt', 'timezone')) { // Parse it
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezone.txt', 'timezone')) { // Parse it
update_timezone_records($timezones);
$importdone = $source;
}
unlink($CFG->dataroot.'/temp/timezones.txt');
unlink($CFG->dataroot.'/temp/timezone.txt');
}
}
}
@@ -82,7 +82,7 @@
/// Final resort, use the copy included in Moodle
$source = $CFG->dirroot.'/lib/timezones.txt';
$source = $CFG->dirroot.'/lib/timezone.txt';
if (!$importdone and is_readable($source)) { // Distribution file
if ($timezones = get_records_csv($source, 'timezone')) {
update_timezone_records($timezones);
+3
View File
@@ -6,6 +6,9 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
/// no guest autologin
require_login(0, false);
$adminroot = admin_get_root();
admin_externalpage_setup('upgradesettings', $adminroot); // now hidden page
+6 -7
View File
@@ -67,8 +67,11 @@ if ($um->preprocess_files() && confirm_sesskey()) {
@apache_child_terminate();
}
//Fix mac/dos newlines
$text = my_file_get_contents($filename);
//trim utf-8 bom
$textlib = new textlib();
$text = $textlib->trim_utf8_bom($text);
//Fix mac/dos newlines
$text = preg_replace('!\r\n?!',"\n",$text);
$fp = fopen($filename, "w");
fwrite($fp,$text);
@@ -101,8 +104,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
@@ -265,7 +266,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
//This can be used to obtain a list of userids for existing users
notify("$olduser->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
} else { // new user
@@ -299,8 +299,8 @@ if ($um->preprocess_files() && confirm_sesskey()) {
if (!$course[$i]) {
notify(get_string('coursegroupunknown','error',$addgroup[$i]));
} else {
if ($groupid = groups_get_group_by_name($course[$i]->id, $addgroup[$i])) { //TODO:check.
$groupid[$i] = $groupid;
if ($gid = groups_get_group_by_name($course[$i]->id, $addgroup[$i])) {
$groupid[$i] = $gid;
} else {
notify(get_string('groupunknown','error',$addgroup[$i]));
}
@@ -419,4 +419,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+34 -22
View File
@@ -63,19 +63,24 @@
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
admin_externalpage_print_header($adminroot);
if ($confirmuser and confirm_sesskey()) {
if (!$user = get_record('user', 'id', $confirmuser)) {
error("No such user!");
error("No such user!", '', true);
}
$confirmeduser = new object();
$confirmeduser->id = $confirmuser;
$confirmeduser->confirmed = 1;
$confirmeduser->timemodified = time();
$auth = get_auth_plugin($user->auth);
if (update_record('user', $confirmeduser)) {
$result = $auth->user_confirm(addslashes($user->username), addslashes($user->secret));
if ($result == AUTH_CONFIRM_OK or $result == AUTH_CONFIRM_ALREADY) {
notify(get_string('userconfirmed', '', fullname($user, true)) );
} else {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
@@ -88,12 +93,12 @@
}
if (!$user = get_record('user', 'id', $delete)) {
error("No such user!");
error("No such user!", '', true);
}
$primaryadmin = get_admin();
if ($user->id == $primaryadmin->id) {
error("You are not allowed to delete the primary admin user!");
error("You are not allowed to delete the primary admin user!", '', true);
}
if ($confirm != md5($delete)) {
@@ -113,8 +118,9 @@
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record('user', $updateuser)) {
// not sure if this is needed. unenrol_student($user->id); // From all courses
delete_records('role_assignments', 'userid', $user->id); // unassign all roles
// Removing a user may have more requirements than just removing their role assignments.
// Use 'role_unassign' to make sure that all necessary actions occur.
role_unassign(0, $user->id);
// remove all context assigned on this user?
notify(get_string('deletedactivity', '', fullname($user, true)) );
} else {
@@ -127,7 +133,7 @@
error('You are not permitted to modify the MNET access control list.');
}
if (!$user = get_record('user', 'id', $acl)) {
error("No such user.");
error("No such user.", '', true);
}
if (!is_mnet_remote_user($user)) {
error('Users in the MNET access control list must be remote MNET users.');
@@ -143,12 +149,12 @@
$aclrecord->username = $user->username;
$aclrecord->accessctrl = $accessctrl;
if (!insert_record('mnet_sso_access_control', $aclrecord)) {
error("Database error - Couldn't modify the MNET access control list.");
error("Database error - Couldn't modify the MNET access control list.", '', true);
}
} else {
$aclrecord->accessctrl = $accessctrl;
if (!update_record('mnet_sso_access_control', $aclrecord)) {
error("Database error - Couldn't modify the MNET access control list.");
error("Database error - Couldn't modify the MNET access control list.", '', true);
}
}
$mnethosts = get_records('mnet_host', '', '', 'id', 'id,wwwroot,name');
@@ -197,7 +203,7 @@
}
}
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere);
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere, false);
$usercount = get_users(false);
$usersearchcount = get_users(false, $search, true, "", "", $firstinitial, $lastinitial);
@@ -297,13 +303,19 @@
}
$mainadmin = get_admin();
if(empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$override = new object();
$override->firstname = 'firstname';
$override->lastname = 'lastname';
$fullnamelanguage = get_string('fullnamedisplay', '', $override);
if (($CFG->fullnamedisplay == 'firstname lastname') or
($CFG->fullnamedisplay == 'firstname') or
($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname' )) {
$fullnamedisplay = "$firstname / $lastname";
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
$fullnamedisplay = "$lastname / $firstname";
}
$table->head = array ($fullnamedisplay, $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {
@@ -408,7 +420,7 @@
echo "</td></tr></table>";
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
print_table($table);
@@ -416,7 +428,7 @@
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
}
@@ -0,0 +1,271 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will compare all the indexes found in the XMLDB definitions
/// with the phisical DB implementation, reporting about all the missing
/// indexes to be created to be 100% ok.
class check_indexes extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own core attributes
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmcheckindexes' => 'xmldb',
'ok' => '',
'missing' => 'xmldb',
'table' => 'xmldb',
'key' => 'xmldb',
'index' => 'xmldb',
'searchresults' => 'xmldb',
'missingindexes' => 'xmldb',
'completelogbelow' => 'xmldb',
'nomissingindexesfound' => 'xmldb',
'yesmissingindexesfound' => 'xmldb',
'yes' => '',
'no' => '',
'back' => 'xmldb'
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// And we nedd some ddl suff
require_once ($CFG->libdir . '/ddllib.php');
/// Here we'll acummulate all the missing indexes found
$missing_indexes = array();
/// Do the job, setting $result as needed
/// Get the confirmed to decide what to do
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p class="centerpara">' . $this->str['confirmcheckindexes'] . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=check_indexes&amp;confirmed=yes" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=main_view" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// The back to edit table button
$b = ' <p class="centerpara buttons">';
$b .= '<a href="index.php">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
/// Iterate over $XMLDB->dbdirs, loading their XML data to memory
if ($XMLDB->dbdirs) {
$dbdirs =& $XMLDB->dbdirs;
$o='<ul>';
foreach ($dbdirs as $dbdir) {
/// Only if the directory exists
if (!$dbdir->path_exists) {
continue;
}
/// Load the XML file
$xmldb_file = new XMLDBFile($dbdir->path . '/install.xml');
/// Load the needed XMLDB generator
$classname = 'XMLDB' . $CFG->dbtype;
$generator = new $classname();
$generator->setPrefix($CFG->prefix);
/// Only if the file exists
if (!$xmldb_file->fileExists()) {
continue;
}
/// Load the XML contents to structure
$loaded = $xmldb_file->loadXMLStructure();
if (!$loaded || !$xmldb_file->isLoaded()) {
notify('Errors found in XMLDB file: '. $dbdir->path . '/install.xml');
continue;
}
/// Arriving here, everything is ok, get the XMLDB structure
$structure = $xmldb_file->getStructure();
$o.=' <li>' . str_replace($CFG->dirroot . '/', '', $dbdir->path . '/install.xml');
/// Getting tables
if ($xmldb_tables = $structure->getTables()) {
$o.=' <ul>';
/// Foreach table, process its indexes and keys
foreach ($xmldb_tables as $xmldb_table) {
/// Skip table if not exists
if (!table_exists($xmldb_table)) {
continue;
}
$o.=' <li>' . $xmldb_table->getName();
/// Keys
if ($xmldb_keys = $xmldb_table->getKeys()) {
$o.=' <ul>';
foreach ($xmldb_keys as $xmldb_key) {
$o.=' <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
/// Primaries are skipped
if ($xmldb_key->getType() == XMLDB_KEY_PRIMARY) {
$o.='<font color="green">' . $this->str['ok'] . '</font></li>';
continue;
}
/// If we aren't creating the keys or the key is a XMLDB_KEY_FOREIGN (not underlying index generated
/// automatically by the RDBMS) create the underlying (created by us) index (if doesn't exists)
if (!$generator->getKeySQL($xmldb_table, $xmldb_key) || $xmldb_key->getType() == XMLDB_KEY_FOREIGN) {
/// Create the interim index
$xmldb_index = new XMLDBIndex('anyname');
$xmldb_index->setFields($xmldb_key->getFields());
switch ($xmldb_key->getType()) {
case XMLDB_KEY_UNIQUE:
case XMLDB_KEY_FOREIGN_UNIQUE:
$xmldb_index->setUnique(true);
break;
case XMLDB_KEY_FOREIGN:
$xmldb_index->setUnique(false);
break;
}
/// Check if the index exists in DB
if (index_exists($xmldb_table, $xmldb_index)) {
$o.='<font color="green">' . $this->str['ok'] . '</font>';
} else {
$o.='<font color="red">' . $this->str['missing'] . '</font>';
/// Add the missing index to the list
$obj = new object;
$obj->table = $xmldb_table;
$obj->index = $xmldb_index;
$missing_indexes[] = $obj;
}
}
$o.='</li>';
}
$o.=' </ul>';
}
/// Indexes
if ($xmldb_indexes = $xmldb_table->getIndexes()) {
$o.=' <ul>';
foreach ($xmldb_indexes as $xmldb_index) {
$o.=' <li>' . $this->str['index'] . ': ' . $xmldb_index->readableInfo() . ' ';
/// Check if the index exists in DB
if (index_exists($xmldb_table, $xmldb_index)) {
$o.='<font color="green">' . $this->str['ok'] . '</font>';
} else {
$o.='<font color="red">' . $this->str['missing'] . '</font>';
/// Add the missing index to the list
$obj = new object;
$obj->table = $xmldb_table;
$obj->index = $xmldb_index;
$missing_indexes[] = $obj;
}
$o.='</li>';
}
$o.=' </ul>';
}
$o.=' </li>';
}
$o.=' </ul>';
}
$o.=' </li>';
}
$o.='</ul>';
}
/// We have finished, let's show the results of the search
$s = '';
$r = '<table class="generalbox boxaligncenter boxwidthwide" border="0" cellpadding="5" cellspacing="0" id="results">';
$r.= ' <tr><td class="generalboxcontent">';
$r.= ' <h2 class="main">' . $this->str['searchresults'] . '</h2>';
$r.= ' <p class="centerpara">' . $this->str['missingindexes'] . ': ' . count($missing_indexes) . '</p>';
$r.= ' </td></tr>';
$r.= ' <tr><td class="generalboxcontent">';
/// If we have found missing indexes inform about them
if (count($missing_indexes)) {
$r.= ' <p class="centerpara">' . $this->str['yesmissingindexesfound'] . '</p>';
$r.= ' <ul>';
foreach ($missing_indexes as $obj) {
$xmldb_table = $obj->table;
$xmldb_index = $obj->index;
$sqlarr = $xmldb_table->getAddIndexSQL($CFG->dbtype, $CFG->prefix, $xmldb_index, true);
$r.= ' <li>' . $this->str['table'] . ': ' . $xmldb_table->getName() . '. ' .
$this->str['index'] . ': ' . $xmldb_index->readableInfo() . '</li>';
$s.= '<code>' . str_replace("\n", '<br />', implode('<br />', $sqlarr)) . '</code><br />';
}
$r.= ' </ul>';
/// Add the SQL statements (all together)
$r.= '<hr />' . $s;
} else {
$r.= ' <p class="centerpara">' . $this->str['nomissingindexesfound'] . '</p>';
}
$r.= ' </td></tr>';
$r.= ' <tr><td class="generalboxcontent">';
/// Add the complete log message
$r.= ' <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
$r.= ' </td></tr>';
$r.= '</table>';
$this->output = $b . $r . $o;
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -173,7 +173,7 @@ class edit_field extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getField($fieldparam)) {
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -128,7 +128,7 @@ class edit_index extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getIndex($indexparam)) {
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -140,7 +140,7 @@ class edit_key extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getKey($keyparam)) {
$b .= '&nbsp;<a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;key=' . $keyparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -133,7 +133,7 @@ class edit_sentence extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The back to edit statement button
$b .= '&nbsp;<a href="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
@@ -115,7 +115,7 @@ class edit_statement extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($origstructure->getStatement($statementparam)) {
$b .= '&nbsp;<a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;statement=' . $statementparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -107,7 +107,7 @@ class edit_table_save extends XMLDBAction {
"<a href=\"../index.php\">" . $this->str['administration'] . "</a> -> <a href=\"index.php\">XMLDB</a>");
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $temptable->readableInfo(),
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . str_replace($CFG->dirroot, '', urlencode($dirpath)));
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
die; /// re-die :-P
}
@@ -130,6 +130,18 @@ class get_db_directories extends XMLDBAction {
}
}
/// Now, course formats (course/format/xxx/db)
if ($plugins = get_list_of_plugins('course/format', 'db')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/course/format/' . $plugin . '/db';
if (!isset($XMLDB->dbdirs[$dbdir->path])) {
$XMLDB->dbdirs[$dbdir->path] = $dbdir;
}
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, enrolment plugins (enrol/xxx/db)
if ($plugins = get_list_of_plugins('enrol', 'db')) {
foreach ($plugins as $plugin) {
@@ -141,7 +153,7 @@ class get_db_directories extends XMLDBAction {
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, groups
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/group/db';
@@ -47,7 +47,8 @@ class main_view extends XMLDBAction {
'delete' => 'xmldb',
'reservedwords' => 'xmldb',
'test' => 'xmldb',
'gotolastused' => 'xmldb'
'gotolastused' => 'xmldb',
'checkindexes' => 'xmldb'
));
}
@@ -84,6 +85,8 @@ class main_view extends XMLDBAction {
$b .= '&nbsp;<a href="index.php?action=view_reserved_words">[' . $this->str['reservedwords'] . ']</a>';
/// The test button
$b .= '&nbsp;<a href="index.php?action=test">[' . $this->str['test'] . ']</a>';
/// The check indexes button
$b .= '&nbsp;<a href="index.php?action=check_indexes">[' . $this->str['checkindexes'] . ']</a>';
$b .= '</p>';
/// Send buttons to output
$o .= $b;
@@ -152,7 +155,7 @@ class main_view extends XMLDBAction {
/// The save button
if ($dbdir->path_exists &&
file_exists($key . '/install.xml') &&
is_readable($key . '/install.xml') &&
is_writeable($key . '/install.xml') &&
is_writeable($key) &&
!empty($dbdir->xml_loaded) &&
!empty($dbdir->xml_changed)) {
@@ -88,6 +88,7 @@ class new_table extends XMLDBAction {
$field->setType(XMLDB_TYPE_INTEGER);
$field->setLength(10);
$field->setNotNull(true);
$field->setUnsigned(true);
$field->setSequence(true);
$field->setComment('id of the table, please edit me');
$field->setLoaded(true);
@@ -88,7 +88,7 @@ class new_table_from_mysql extends XMLDBAction {
$dbtables = $db->MetaTables('TABLES');
$selecttables = array();
foreach ($dbtables as $dbtable) {
$dbtable = str_replace($CFG->prefix, '', $dbtable);
$dbtable = strtolower(str_replace($CFG->prefix, '', $dbtable));
$i = $structure->findTableInArray($dbtable);
if ($i === NULL) {
$selecttables[$dbtable] = $dbtable;
+49 -34
View File
@@ -92,7 +92,7 @@ class test extends XMLDBAction {
$table->addFieldInfo('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('type', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general');
$table->addFieldInfo('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('logo', XMLDB_TYPE_BINARY, 'big', null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('assessed', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('assesstimestart', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
@@ -378,7 +378,22 @@ class test extends XMLDBAction {
$tests['change field precision (number)'] = $test;
}
/// 18th test. Change the sign of one numeric field to unsigned
/// 18th test. Change the precision of one integer field to a smaller one
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('course');
$field->setAttributes(XMLDB_TYPE_INTEGER, '5', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = change_field_precision($table, $field, false, false);
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['change field precision (integer) to smaller one'] = $test;
}
/// 19th test. Change the sign of one numeric field to unsigned
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -393,7 +408,7 @@ class test extends XMLDBAction {
$tests['change field sign (unsigned)'] = $test;
}
/// 19th test. Change the sign of one numeric field to signed
/// 20th test. Change the sign of one numeric field to signed
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -408,7 +423,7 @@ class test extends XMLDBAction {
$tests['change field sign (signed)'] = $test;
}
/// 20th test. Change the nullability of one char field to not null
/// 21th test. Change the nullability of one char field to not null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -423,7 +438,7 @@ class test extends XMLDBAction {
$tests['change field nullability (not null)'] = $test;
}
/// 21th test. Change the nullability of one char field to null
/// 22th test. Change the nullability of one char field to null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -438,7 +453,7 @@ class test extends XMLDBAction {
$tests['change field nullability (null)'] = $test;
}
/// 22th test. Dropping the default of one field
/// 23th test. Dropping the default of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -453,7 +468,7 @@ class test extends XMLDBAction {
$tests['drop field default of NULL field'] = $test;
}
/// 23th test. Creating the default for one field
/// 24th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -468,7 +483,7 @@ class test extends XMLDBAction {
$tests['add field default of NULL field'] = $test;
}
/// 24th test. Creating the default for one field
/// 25th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -484,7 +499,7 @@ class test extends XMLDBAction {
}
/// 25th test. Dropping the default of one NOT NULL field
/// 26th test. Dropping the default of one NOT NULL field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -499,7 +514,7 @@ class test extends XMLDBAction {
$tests['drop field default of NOT NULL field'] = $test;
}
/// 26th test. Adding one unique index to the table
/// 27th test. Adding one unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -514,7 +529,7 @@ class test extends XMLDBAction {
$tests['add unique index'] = $test;
}
/// 27th test. Adding one not unique index to the table
/// 28th test. Adding one not unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -529,7 +544,7 @@ class test extends XMLDBAction {
$tests['add not unique index'] = $test;
}
/// 28th test. Re-add the same index than previous test. Check find_index_name() works.
/// 29th test. Re-add the same index than previous test. Check find_index_name() works.
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -548,7 +563,7 @@ class test extends XMLDBAction {
$tests['check find_index_name()'] = $test;
}
/// 29th test. Dropping one index from the table
/// 30th test. Dropping one index from the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -563,7 +578,7 @@ class test extends XMLDBAction {
$tests['drop index'] = $test;
}
/// 30th test. Adding one unique key to the table
/// 31th test. Adding one unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -578,7 +593,7 @@ class test extends XMLDBAction {
$tests['add unique key'] = $test;
}
/// 31th test. Adding one foreign+unique key to the table
/// 32th test. Adding one foreign+unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -593,7 +608,7 @@ class test extends XMLDBAction {
$tests['add foreign+unique key'] = $test;
}
/// 32th test. Drop one key
/// 33th test. Drop one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -608,7 +623,7 @@ class test extends XMLDBAction {
$tests['drop foreign+unique key'] = $test;
}
/// 33th test. Adding one foreign key to the table
/// 34th test. Adding one foreign key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -623,7 +638,7 @@ class test extends XMLDBAction {
$tests['add foreign key'] = $test;
}
/// 34th test. Drop one foreign key
/// 35th test. Drop one foreign key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -638,7 +653,7 @@ class test extends XMLDBAction {
$tests['drop foreign key'] = $test;
}
/// 35th test. Adding one complex enum field
/// 36th test. Adding one complex enum field
if ($test->status) {
/// Create a new field with complex specs (enums are good candidates)
$field = new XMLDBField('type');
@@ -653,7 +668,7 @@ class test extends XMLDBAction {
$tests['add field with enum'] = $test;
}
/// 36th test. Dropping the enum of one field
/// 37th test. Dropping the enum of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -668,7 +683,7 @@ class test extends XMLDBAction {
$tests['delete enumlist from one field'] = $test;
}
/// 37th test. Creating the enum for one field
/// 38th test. Creating the enum for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -682,7 +697,7 @@ class test extends XMLDBAction {
$tests['add enumlist to one field'] = $test;
}
/// 38th test. Renaming one index
/// 39th test. Renaming one index
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -697,7 +712,7 @@ class test extends XMLDBAction {
$tests['rename index (experimental. DO NOT USE IT)'] = $test;
}
/// 39th test. Renaming one key
/// 40th test. Renaming one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -712,13 +727,13 @@ class test extends XMLDBAction {
$tests['rename key (experimental. DO NOT USE IT)'] = $test;
}
/// 40th test. Renaming one field
/// 41th test. Renaming one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('type');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general', 'course');
$test->sql = $table->getRenameFieldSQL($CFG->dbtype, $CFG->prefix, $field, 'newnameforthefield', true);
$test->status = rename_field($table, $field, 'newnameforthefield', false, false);
if (!$test->status) {
@@ -727,11 +742,11 @@ class test extends XMLDBAction {
$tests['rename field'] = $test;
}
/// 41th test. Renaming one table
/// 42th test. Renaming one table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getRenameTableSQL($CFG->dbtype, $CFG->prefix, 'newnameforthetable', true);
$test->status = rename_table($table, 'newnameforthetable', false, false);
if (!$test->status) {
@@ -740,7 +755,7 @@ class test extends XMLDBAction {
$tests['rename table'] = $test;
}
/// 42th test. Getting the PK sequence name for one table
/// 43th test. Getting the PK sequence name for one table
if ($test->status) {
$test = new stdClass;
$table->setName('newnameforthetable');
@@ -755,13 +770,13 @@ class test extends XMLDBAction {
$tests['find sequence name'] = $test;
}
/// 43th test. Inserting TEXT contents
/// 44th test. Inserting TEXT contents
$textlib = textlib_get_instance();
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
$basetext = '日本語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška';
$basetext = "\\ ''語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška";
/// Create one big text (1.500.000 chars)
$fulltext = '';
for ($i=0; $i<1000; $i++) { //1500 * 1000 chars
@@ -794,7 +809,7 @@ class test extends XMLDBAction {
$tests['insert record '. $textlen . ' cc. (text)'] = $test;
}
/// 44th test. Inserting BINARY contents
/// 45th test. Inserting BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -823,7 +838,7 @@ class test extends XMLDBAction {
$tests['insert record '. $textlen . ' bytes (binary)'] = $test;
}
/// 45th test. update_record with TEXT and BINARY contents
/// 46th test. update_record with TEXT and BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -863,7 +878,7 @@ class test extends XMLDBAction {
$tests['update record '. $textlen . ' cc. (text) and ' . $imglen . ' bytes (binary)'] = $test;
}
/// 46th test. set_field with TEXT contents
/// 47th test. set_field with TEXT contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -893,7 +908,7 @@ class test extends XMLDBAction {
$tests['set field '. $textlen . ' cc. (text)'] = $test;
}
/// 47th test. set_field with BINARY contents
/// 48th test. set_field with BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
File diff suppressed because it is too large Load Diff
@@ -1,190 +1,568 @@
<?php
/**
* @file CAS/PGTStorage/pgt-db.php
* Basic class for PGT database storage
*/
// include phpDB library (the test was introduced in release 0.4.8 for
// the integration into Tikiwiki).
if (!class_exists('DB')) {
include_once('DB.php');
@include_once('DB.php');
}
/**
* @class PGTStorageDB
* The PGTStorageDB class is a class for PGT database storage. An instance of
* this class is returned by CASClient::SetPGTStorageDB().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageDB
*/
class PGTStorageDB extends PGTStorage
{
/**
* @addtogroup internalPGTStorageDB
* @{
*/
/**
* a string representing a PEAR DB URL to connect to the database. Written by
* PGTStorageDB::PGTStorageDB(), read by getURL().
*
* @hideinitializer
* @private
*/
var $_url='';
/**
* This method returns the PEAR DB URL to use to connect to the database.
*
* @return a PEAR DB URL
*
* @private
*/
function getURL()
{
return $this->_url;
}
/**
* The handle of the connection to the database where PGT's are stored. Written by
* PGTStorageDB::init(), read by getLink().
* This method returns the PEAR DB URL to use to connect to the database.
*
* @hideinitializer
* @return a PEAR DB URL
*
* @private
*/
function getURL()
{
return $this->_url;
}
/**
* The handle of the connection to the database where PGT's are stored. Written by
* PGTStorageDB::init(), read by getLink().
*
* @hideinitializer
* @private
*/
var $_link = null;
/**
* This method returns the handle of the connection to the database where PGT's are
* stored.
*
* @return a handle of connection.
*
* @private
*/
function getLink()
{
return $this->_link;
}
/**
* The name of the table where PGT's are stored. Written by
* PGTStorageDB::PGTStorageDB(), read by getTable().
* This method returns the handle of the connection to the database where PGT's are
* stored.
*
* @hideinitializer
* @return a handle of connection.
*
* @private
*/
function getLink()
{
return $this->_link;
}
/**
* The name of the table where PGT's are stored. Written by
* PGTStorageDB::PGTStorageDB(), read by getTable().
*
* @hideinitializer
* @private
*/
var $_table = '';
/**
* This method returns the name of the table where PGT's are stored.
*
* @return the name of a table.
*
* @private
*/
function getTable()
{
return $this->_table;
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageType()
{
return "database";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
return 'url=`'.$this->getURL().'\', table=`'.$this->getTable().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageDB().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $user the user to access the data with
* @param $password the user's password
* @param $database_type the type of the database hosting the data
* @param $hostname the server hosting the database
* @param $port the port the server is listening on
* @param $database the name of the database
* @param $table the name of the table storing the data
*
* @public
*/
function PGTStorageDB($cas_parent,$user,$password,$database_type,$hostname,$port,$database,$table)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if ( empty($database_type) ) $database_type = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE;
if ( empty($hostname) ) $hostname = CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME;
if ( $port==0 ) $port = CAS_PGT_STORAGE_DB_DEFAULT_PORT;
if ( empty($database) ) $database = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE;
if ( empty($table) ) $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE;
// build and store the PEAR DB URL
$this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$server.':'.$port.'/'.$database;
$this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$hostname.':'.$port.'/'.$database;
// XXX should use setURL and setTable
phpCAS::traceEnd();
}
// ########################################################################
// INITIALIZATION
// ########################################################################
/**
* This method is used to initialize the storage. Halts on error.
*
* @public
*/
function init()
{
phpCAS::traceBegin();
// if the storage has already been initialized, return immediatly
if ( $this->isInitialized() )
return;
// call the ancestor's method (mark as initialized)
parent::init();
// try to connect to the database
$this->_link = DB::connect($this->getURL());
if ( DB::isError($this->_link) ) {
phpCAS::error('could not connect to database ('.DB::errorMessage($this->_link).')');
}
var_dump($this->_link);
phpCAS::traceBEnd();
}
/** @} */
}
?>
@@ -1,237 +1,718 @@
<?php
/**
* @file CAS/PGTStorage/pgt-file.php
* Basic class for PGT file storage
*/
/**
* @class PGTStorageFile
* The PGTStorageFile class is a class for PGT file storage. An instance of
* this class is returned by CASClient::SetPGTStorageFile().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageFile
* @file CAS/PGTStorage/pgt-file.php
* Basic class for PGT file storage
*/
/**
* @class PGTStorageFile
* The PGTStorageFile class is a class for PGT file storage. An instance of
* this class is returned by CASClient::SetPGTStorageFile().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageFile
*/
class PGTStorageFile extends PGTStorage
{
/**
* @addtogroup internalPGTStorageFile
* @{
*/
/**
* a string telling where PGT's should be stored on the filesystem. Written by
* PGTStorageFile::PGTStorageFile(), read by getPath().
*
* @private
*/
var $_path;
/**
* This method returns the name of the directory where PGT's should be stored
* on the filesystem.
*
* @return the name of a directory (with leading and trailing '/')
*
* @private
*/
function getPath()
{
return $this->_path;
}
/**
* a string telling the format to use to store PGT's (plain or xml). Written by
* PGTStorageFile::PGTStorageFile(), read by getFormat().
* This method returns the name of the directory where PGT's should be stored
* on the filesystem.
*
* @return the name of a directory (with leading and trailing '/')
*
* @private
*/
function getPath()
{
return $this->_path;
}
/**
* a string telling the format to use to store PGT's (plain or xml). Written by
* PGTStorageFile::PGTStorageFile(), read by getFormat().
*
* @private
*/
var $_format;
/**
* This method returns the format to use when storing PGT's on the filesystem.
*
* @return a string corresponding to the format used (plain or xml).
*
* @private
*/
function getFormat()
{
return $this->_format;
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageType()
{
return "file";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageInfo()
{
return 'path=`'.$this->getPath().'\', format=`'.$this->getFormat().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageFile().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $format the format used to store the PGT's (`plain' and `xml' allowed).
* @param $path the path where the PGT's should be stored
*
* @public
*/
function PGTStorageFile($cas_parent,$format,$path)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT;
if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH;
// check that the path is an absolute path
if ( $path[0] != '/' ) {
phpCAS::error('an absolute path is needed for PGT storage to file');
}
// store the path (with a leading and trailing '/')
$path = preg_replace('|[/]*$|','/',$path);
$path = preg_replace('|^[/]*|','/',$path);
$this->_path = $path;
// check the format and store it
switch ($format) {
case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN:
case CAS_PGT_STORAGE_FILE_FORMAT_XML:
$this->_format = $format;
break;
default:
phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)');
}
phpCAS::traceEnd();
}
// ########################################################################
// INITIALIZATION
// ########################################################################
/**
* This method is used to initialize the storage. Halts on error.
*
* @public
*/
function init()
{
phpCAS::traceBegin();
// if the storage has already been initialized, return immediatly
if ( $this->isInitialized() )
return;
// call the ancestor's method (mark as initialized)
parent::init();
phpCAS::traceEnd();
}
// ########################################################################
// PGT I/O
// ########################################################################
/**
* This method returns the filename corresponding to a PGT Iou.
*
* @param $pgt_iou the PGT iou.
*
* @return a filename
* @private
*/
function getPGTIouFilename($pgt_iou)
{
phpCAS::traceBegin();
return $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd();
}
/**
* This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
* warning on error.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @public
*/
function write($pgt,$pgt_iou)
{
phpCAS::traceBegin();
$fname = $this->getPGTIouFilename($pgt_iou);
if ( $f=fopen($fname,"w") ) {
if ( fputs($f,$pgt) === FALSE ) {
phpCAS::error('could not write PGT to `'.$fname.'\'');
}
fclose($f);
} else {
phpCAS::error('could not open `'.$fname.'\'');
}
phpCAS::traceEnd();
}
/**
* This method reads a PGT corresponding to a PGT Iou and deletes the
* corresponding file.
* This method returns the filename corresponding to a PGT Iou.
*
* @param $pgt_iou the PGT iou
* @param $pgt_iou the PGT iou.
*
* @return the corresponding PGT, or FALSE on error
*
* @public
* @return a filename
* @private
*/
function read($pgt_iou)
function getPGTIouFilename($pgt_iou)
{
phpCAS::traceBegin();
$pgt = FALSE;
$filename = $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd($filename);
return $filename;
}
/**
* This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
* warning on error.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @public
*/
function write($pgt,$pgt_iou)
{
phpCAS::traceBegin();
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
if ( ($pgt=fgets($f)) === FALSE ) {
phpCAS::trace('could not read PGT from `'.$fname.'\'');
}
if ( $f=fopen($fname,"w") ) {
if ( fputs($f,$pgt) === FALSE ) {
phpCAS::error('could not write PGT to `'.$fname.'\'');
}
fclose($f);
} else {
phpCAS::error('could not open `'.$fname.'\'');
}
phpCAS::traceEnd();
}
/**
* This method reads a PGT corresponding to a PGT Iou and deletes the
* corresponding file.
*
* @param $pgt_iou the PGT iou
*
* @return the corresponding PGT, or FALSE on error
*
* @public
*/
function read($pgt_iou)
{
phpCAS::traceBegin();
$pgt = FALSE;
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
if ( ($pgt=fgets($f)) === FALSE ) {
phpCAS::trace('could not read PGT from `'.$fname.'\'');
}
fclose($f);
}
// delete the PGT file
@unlink($fname);
phpCAS::traceEnd($pgt);
return $pgt;
}
/** @} */
}
/** @} */
}
?>
+188
View File
@@ -0,0 +1,188 @@
<?php
/**
* @file CAS/PGTStorage/pgt-main.php
* Basic class for PGT storage
*/
/**
* @class PGTStorage
* The PGTStorage class is a generic class for PGT storage. This class should
* not be instanciated itself but inherited by specific PGT storage classes.
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorage
*/
class PGTStorage
{
/**
* @addtogroup internalPGTStorage
* @{
*/
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The constructor of the class, should be called only by inherited classes.
*
* @param $cas_parent the CASclient instance that creates the current object.
*
* @protected
*/
function PGTStorage($cas_parent)
{
phpCAS::traceBegin();
if ( !$cas_parent->isProxy() ) {
phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy');
}
phpCAS::traceEnd();
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This virtual method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @public
*/
function getStorageType()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
/**
* This virtual method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
// ########################################################################
// ERROR HANDLING
// ########################################################################
/**
* string used to store an error message. Written by PGTStorage::setErrorMessage(),
* read by PGTStorage::getErrorMessage().
*
* @hideinitializer
* @private
* @deprecated not used.
*/
var $_error_message=FALSE;
/**
* This method sets en error message, which can be read later by
* PGTStorage::getErrorMessage().
*
* @param $error_message an error message
*
* @protected
* @deprecated not used.
*/
function setErrorMessage($error_message)
File diff suppressed because it is too large Load Diff
@@ -1,277 +1,829 @@
<?php
/**
* @file domxml-php4-php5.php
* Require PHP5, uses built-in DOM extension.
* To be used in PHP4 scripts using DOMXML extension.
* Allows PHP4/DOMXML scripts to run on PHP5/DOM.
* (Requires PHP5/XSL extension for domxml_xslt functions)
*
* Typical use:
* <pre>
* {
* if (version_compare(PHP_VERSION,'5','>='))
* require_once('domxml-php4-to-php5.php');
* }
* </pre>
*
* Version 1.5.5, 2005-01-18, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*
* ------------------------------------------------------------------<br>
* Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/
*
* Copyright 2004, Licence: Creative Commons "Attribution-ShareAlike 2.0 France" BY-SA (FR),
* http://creativecommons.org/licenses/by-sa/2.0/fr/
* http://alexandre.alapetite.net/divers/apropos/#by-sa
* - Attribution. You must give the original author credit
* - Share Alike. If you alter, transform, or build upon this work,
* you may distribute the resulting work only under a license identical to this one
* - The French law is authoritative
* - Any of these conditions can be waived if you get permission from Alexandre Alapetite
* - Please send to Alexandre Alapetite the modifications you make,
* in order to improve this file for the benefit of everybody
*
* If you want to distribute this code, please do it as a link to:
* http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*/
function domxml_new_doc($version) {return new php4DOMDocument('');}
function domxml_open_file($filename) {return new php4DOMDocument($filename);}
function domxml_open_mem($str)
{
$dom=new php4DOMDocument('');
$dom->myDOMNode->loadXML($str);
return $dom;
}
function xpath_eval($xpath_context,$eval_str,$contextnode=null) {return $xpath_context->query($eval_str,$contextnode);}
function xpath_new_context($dom_document) {return new php4DOMXPath($dom_document);}
class php4DOMAttr extends php4DOMNode
{
function php4DOMAttr($aDOMAttr) {$this->myDOMNode=$aDOMAttr;}
function Name() {return $this->myDOMNode->name;}
function Specified() {return $this->myDOMNode->specified;}
function Value() {return $this->myDOMNode->value;}
}
class php4DOMDocument extends php4DOMNode
{
function php4DOMDocument($filename='')
{
$this->myDOMNode=new DOMDocument();
if ($filename!='') $this->myDOMNode->load($filename);
}
function create_attribute($name,$value)
{
$myAttr=$this->myDOMNode->createAttribute($name);
$myAttr->value=$value;
return new php4DOMAttr($myAttr,$this);
}
function create_cdata_section($content) {return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);}
function create_comment($data) {return new php4DOMNode($this->myDOMNode->createComment($data),$this);}
function create_element($name) {return new php4DOMElement($this->myDOMNode->createElement($name),$this);}
function create_text_node($content) {return new php4DOMNode($this->myDOMNode->createTextNode($content),$this);}
function document_element() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}
function dump_file($filename,$compressionmode=false,$format=false) {return $this->myDOMNode->save($filename);}
function dump_mem($format=false,$encoding=false) {return $this->myDOMNode->saveXML();}
function get_element_by_id($id) {return new php4DOMElement($this->myDOMNode->getElementById($id),$this);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this);
$i++;
}
return $nodeSet;
}
function html_dump_mem() {return $this->myDOMNode->saveHTML();}
function root() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}
}
class php4DOMElement extends php4DOMNode
{
function get_attribute($name) {return $this->myDOMNode->getAttribute($name);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function has_attribute($name) {return $this->myDOMNode->hasAttribute($name);}
function remove_attribute($name) {return $this->myDOMNode->removeAttribute($name);}
function set_attribute($name,$value) {return $this->myDOMNode->setAttribute($name,$value);}
function tagname() {return $this->myDOMNode->tagName;}
}
class php4DOMNode
{
var $myDOMNode;
var $myOwnerDocument;
function php4DOMNode($aDomNode,$aOwnerDocument)
{
$this->myDOMNode=$aDomNode;
$this->myOwnerDocument=$aOwnerDocument;
}
function __get($name)
{
if ($name=='type') return $this->myDOMNode->nodeType;
elseif ($name=='tagname') return $this->myDOMNode->tagName;
elseif ($name=='content') return $this->myDOMNode->textContent;
else
{
$myErrors=debug_backtrace();
trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
return false;
}
}
function append_child($newnode) {return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}
function append_sibling($newnode) {return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}
function attributes()
{
$myDOMNodeList=$this->myDOMNode->attributes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function child_nodes()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function children() {return $this->child_nodes();}
function clone_node($deep=false) {return new php4DOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);}
function first_child() {return new php4DOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);}
function get_content() {return $this->myDOMNode->textContent;}
function has_attributes() {return $this->myDOMNode->hasAttributes();}
function has_child_nodes() {return $this->myDOMNode->hasChildNodes();}
function insert_before($newnode,$refnode) {return new php4DOMElement($this->myDOMNode->insertBefore($newnode->myDOMNode,$refnode->myDOMNode),$this->myOwnerDocument);}
function is_blank_node()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
if (($node->nodeType==XML_ELEMENT_NODE)||
(($node->nodeType==XML_TEXT_NODE)&&!ereg('^([[:cntrl:]]|[[:space:]])*$',$node->nodeValue)))
return false;
$i++;
}
return true;
}
function last_child() {return new php4DOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);}
function new_child($name,$content)
{
$mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
$mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($content));
$this->myDOMNode->appendChild($mySubNode);
return new php4DOMElement($mySubNode,$this->myOwnerDocument);
}
function next_sibling() {return new php4DOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);}
function node_name() {return $this->myDOMNode->localName;}
function node_type() {return $this->myDOMNode->nodeType;}
function node_value() {return $this->myDOMNode->nodeValue;}
function owner_document() {return $this->myOwnerDocument;}
function parent_node() {return new php4DOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);}
function prefix() {return $this->myDOMNode->prefix;}
function previous_sibling() {return new php4DOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);}
function remove_child($oldchild) {return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);}
function replace_child($oldnode,$newnode) {return new php4DOMElement($this->myDOMNode->replaceChild($oldnode->myDOMNode,$newnode->myDOMNode),$this->myOwnerDocument);}
function set_content($text)
{
if (($this->myDOMNode->hasChildNodes())&&($this->myDOMNode->firstChild->nodeType==XML_TEXT_NODE))
$this->myDOMNode->removeChild($this->myDOMNode->firstChild);
return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($text));
}
}
class php4DOMNodelist
{
var $myDOMNodelist;
var $nodeset;
function php4DOMNodelist($aDOMNodelist,$aOwnerDocument)
{
$this->myDOMNodelist=$aDOMNodelist;
$this->nodeset=array();
$i=0;
if (isset($this->myDOMNodelist))
while ($node=$this->myDOMNodelist->item($i))
{
$this->nodeset[]=new php4DOMElement($node,$aOwnerDocument);
$i++;
}
}
}
class php4DOMXPath
{
var $myDOMXPath;
var $myOwnerDocument;
function php4DOMXPath($dom_document)
{
$this->myOwnerDocument=$dom_document;
$this->myDOMXPath=new DOMXPath($dom_document->myDOMNode);
}
function query($eval_str,$contextnode)
{
if (isset($contextnode)) return new php4DOMNodelist($this->myDOMXPath->query($eval_str,$contextnode->myDOMNode),$this->myOwnerDocument);
else return new php4DOMNodelist($this->myDOMXPath->query($eval_str),$this->myOwnerDocument);
}
function xpath_register_ns($prefix,$namespaceURI) {return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);}
}
if (extension_loaded('xsl'))
{//See also: http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/
function domxml_xslt_stylesheet($xslstring) {return new php4DomXsltStylesheet(DOMDocument::loadXML($xslstring));}
function domxml_xslt_stylesheet_doc($dom_document) {return new php4DomXsltStylesheet($dom_document);}
function domxml_xslt_stylesheet_file($xslfile) {return new php4DomXsltStylesheet(DOMDocument::load($xslfile));}
class php4DomXsltStylesheet
{
var $myxsltProcessor;
function php4DomXsltStylesheet($dom_document)
{
$this->myxsltProcessor=new xsltProcessor();
$this->myxsltProcessor->importStyleSheet($dom_document);
}
function process($dom_document,$xslt_parameters=array(),$param_is_xpath=false)
{
foreach ($xslt_parameters as $param=>$value)
$this->myxsltProcessor->setParameter('',$param,$value);
$myphp4DOMDocument=new php4DOMDocument();
$myphp4DOMDocument->myDOMNode=$this->myxsltProcessor->transformToDoc($dom_document->myDOMNode);
return $myphp4DOMDocument;
}
function result_dump_file($dom_document,$filename)
{
$html=$dom_document->myDOMNode->saveHTML();
file_put_contents($filename,$html);
return $html;
}
function result_dump_mem($dom_document) {return $dom_document->myDOMNode->saveHTML();}
}
}
?>
@@ -1,27 +1,79 @@
<?php
/**
* @file languages/english.php
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CAS Authentication wanted!',
CAS_STR_LOGOUT
=> 'CAS logout wanted!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',
CAS_STR_AUTHENTICATION_FAILED
=> 'CAS Authentication failed!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'The service `<b>%s</b>\' is not available (<b>%s</b>).'
);
?>
@@ -1,28 +1,82 @@
<?php
/**
* @file languages/english.php
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'utilisant le serveur',
CAS_STR_AUTHENTICATION_WANTED
=> 'Authentication CAS nécessaire&nbsp;!',
CAS_STR_LOGOUT
=> 'Déconnexion demandée&nbsp;!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Authentification CAS infructueuse&nbsp;!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Vous n\'avez pas été authentifié(e).</p><p>Vous pouvez soumettre votre requete à nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problème persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
);
?>
+79
View File
@@ -0,0 +1,79 @@
<?php
/**
* @file languages/german.php
* @author Henrik Genssen <hg at mediafactory.de>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'via Server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CAS Authentifizierung erforderlich!',
CAS_STR_LOGOUT
=> 'CAS Abmeldung!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'eigentlich h&auml;ten Sie zum CAS Server weitergeleitet werden sollen. Dr&uuml;cken Sie <a href="%s">hier</a> um fortzufahren.',
CAS_STR_AUTHENTICATION_FAILED
=> 'CAS Anmeldung fehlgeschlagen!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontkatieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Der Dienst `<b>%s</b>\' ist nicht verf&uuml;gbar (<b>%s</b>).'
);
?>
@@ -1,27 +1,79 @@
<?php
/**
* @file languages/greek.php
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',
CAS_STR_AUTHENTICATION_WANTED
=> 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',
CAS_STR_LOGOUT
=> 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'
);
<?php
/**
* @file languages/greek.php
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',
CAS_STR_AUTHENTICATION_WANTED
=> 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',
CAS_STR_LOGOUT
=> 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'
);
?>
+53
View File
@@ -0,0 +1,53 @@
<?php
/**
* @file languages/japanese.php
* @author fnorif (fnorif@yahoo.co.jp)
*
* Now Encoding is EUC-JP and LF
**/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CASによる認証を行います',
CAS_STR_LOGOUT
=> 'CASからログアウトします!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'CASサーバに行く必要があります。自動的に転送されない場合は <a href="%s">こちら</a> をクリックして続行します。',
CAS_STR_AUTHENTICATION_FAILED
=> 'CASによる認証に失敗しました',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>認証できませんでした.</p><p>もう一度リクエストを送信する場合は<a href="%s">こちら</a>をクリック.</p><p>問題が解決しない場合は <a href="mailto:%s">このサイトの管理者</a>に問い合わせてください.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'サービス `<b>%s</b>\' は利用できません (<b>%s</b>).'
);
?>
@@ -1,24 +1,70 @@
<?php
/**
* @file languages/languages.php
* Internationalization constants
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
//@{
/**
* a phpCAS string index
*/
define("CAS_STR_USING_SERVER", 1);
define("CAS_STR_AUTHENTICATION_WANTED", 2);
define("CAS_STR_LOGOUT", 3);
define("CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED", 4);
define("CAS_STR_AUTHENTICATION_FAILED", 5);
define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED", 6);
define("CAS_STR_SERVICE_UNAVAILABLE", 7);
//@}
?>
+4 -3
View File
@@ -1,7 +1,8 @@
CAS-module README
Please read comments from lib.php for auth/cas module
The auth/cas module is using part of the /auth/ldap module. The /auth/ldap directory should exist.
The auth/cas use the PHPCAS project from http://esup-phpcas.sourceforge.net
+1026 -215
View File
File diff suppressed because it is too large Load Diff
+24
View File
@@ -0,0 +1,24 @@
<div class="loginbox clearfix">
<div class="loginpanel">
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string("accesCAS","auth");?></a>
</div>
<br/>
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string("accesNOCAS","auth");?></a>
</div>
</div>
</div>
+706 -65
View File
@@ -1,187 +1,828 @@
<?php
global $CFG;
require_once 'languages.php';
$createoptions[0] = get_string("no");
$createoptions[1] = get_string("yes");
// set to defaults if undefined
if (!isset ($config->hostname)) {
// set to defaults if undefined (CAS)
if (!isset ($config->hostname))
$config->hostname = '';
}
if (!isset ($config->port)) {
if (!isset ($config->port))
$config->port = '';
}
if (!isset ($config->casversion)) {
if (!isset ($config->casversion))
$config->casversion = '';
}
if (!isset ($config->baseuri)) {
if (!isset ($config->baseuri))
$config->baseuri = '';
}
if (!isset ($config->language)) {
if (!isset ($config->language))
$config->language = '';
}
if (!isset ($config->use_cas)) {
$config->use_cas = '';
}
if (!isset ($config->auth_user_create)) {
$config->auth_user_create = '0';
}
if (!isset ($config->create_user)) {
$config->create_user = '0';
}
if (!isset($config->changepasswordurl)) {
$config->changepasswordurl = '';
}
if (!isset ($config->proxycas))
$config->proxycas = '';
if (!isset ($config->logoutcas))
$config->logoutcas = '';
if (!isset ($config->multiauth))
$config->multiauth = '';
// set to defaults if undefined (LDAP)
if (!isset($config->host_url))
{ $config->host_url = ''; }
if (empty($config->ldapencoding))
{ $config->ldapencoding = 'utf-8'; }
if (!isset($config->contexts))
{ $config->contexts = ''; }
if (!isset($config->user_type))
{ $config->user_type = 'default'; }
if (!isset($config->user_attribute))
{ $config->user_attribute = ''; }
if (!isset($config->search_sub))
{ $config->search_sub = ''; }
if (!isset($config->opt_deref))
{ $config->opt_deref = LDAP_DEREF_NEVER; }
if (!isset($config->bind_dn))
{$config->bind_dn = ''; }
if (!isset($config->bind_pw))
{$config->bind_pw = ''; }
if (!isset($config->version))
{$config->version = '2'; }
if (!isset($config->objectclass))
{$config->objectclass = ''; }
if (!isset($config->memberattribute))
{$config->memberattribute = ''; }
if (!isset($config->memberattribute_isdn))
{$config->memberattribute_isdn = ''; }
if (!isset($config->groupecreators))
{$config->groupecreators = ''; }
if (!isset($config->attrcreators))
{$config->attrcreators = ''; }
if (!isset($config->removeuser))
{$config->removeuser = 0; }
$yesno = array( get_string('no'), get_string('yes') );
if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
notify(get_string('auth_ldap_noextension','auth'));
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<tr>
<td colspan="2">
<h4><?php print_string('auth_cas_server_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_use_cas', 'auth') ?>:</td>
<td>
<?php
unset($options);
$options[1] = get_string('yes');
choose_from_menu ($options, 'use_cas', $config->use_cas, get_string('no'), '', '');
?>
</td>
<td><?php print_string('auth_cas_enabled', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_hostname_key', 'auth') ?>:</td>
<td>
<input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
<?php
if (isset($err['hostname'])) {
formerr($err['hostname']);
}
?>
</td>
<td><?php print_string('auth_cas_hostname', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_baseuri_key', 'auth') ?>:</td>
<td>
<input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
<?php
if (isset($err['baseuri'])) {
formerr($err['baseuri']);
}
?>
</td>
<td><?php print_string('auth_cas_baseuri', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_port_key', 'auth') ?>:</td>
<td>
<input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
formerr($err['port']);
}
?>
</td>
<td><?php print_string('auth_cas_port', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_casversion', 'auth') ?>:</td>
<td>
<input name="casversion" type="text" size="30" value="<?php echo $config->casversion ?>" />
<?php
if (isset($err['casversion'])) {
formerr($err['casversion']);
}
?>
</td>
<td><?php print_string('auth_cas_version', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_language_key', 'auth') ?>:</td>
<td>
<?php
choose_from_menu($CASLANGUAGES, 'language', $config->language, '');
?>
</td>
<td><?php print_string('auth_cas_language', 'auth') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_cas_auth_user_create', 'auth') ?>: </td>
<td>
<?php
choose_from_menu($createoptions, 'auth_user_create', $config->auth_user_create, '');
if (isset($err['auth_user_create'])) {
formerr($err['auth_user_create']);
}
?>
</td>
<td>
<?php print_string("auth_user_creation","auth"); ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_create_user_key', 'auth') ?>:</td>
<td align="right"><?php print_string('auth_cas_proxycas_key', 'auth') ?>:</td>
<td>
<?php
unset($options);
$options[0] = get_string('no');
$options[1] = get_string('yes');
choose_from_menu($options, 'create_user', $config->create_user, '');
choose_from_menu ($options, 'proxycas', $config->proxycas, get_string('no'), '', '');
?>
</td>
<td><?php print_string('auth_cas_create_user', 'auth') ?></td>
<td><?php print_string('auth_cas_proxycas', 'auth') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_cas_changepasswordurl', 'auth') ?>: </td>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth') ?>:</td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
formerr($err['changepasswordurl']);
}
unset($options);
$options[1] = get_string('yes');
choose_from_menu ($options, 'logoutcas', $config->logoutcas, get_string('no'), '', '');
?>
</td>
<td><?php print_string('changepasswordhelp', 'auth') ?></td>
<td><?php print_string('auth_cas_logoutcas', 'auth') ?></td>
</tr>
</table>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_multiauth_key', 'auth') ?>:</td>
<td>
<?php
unset($options);
$options[1] = get_string('yes');
choose_from_menu ($options, 'multiauth', $config->multiauth, get_string('no'), '', '');
?>
</td>
<td><?php print_string('auth_cas_multiauth', 'auth') ?></td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_server_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="host_url"><?php print_string('auth_ldap_host_url_key','auth') ?></label></td>
<td>
<input name="host_url" id="host_url" type="text" size="30" value="<?php echo $config->host_url?>" />
<?php if (isset($err['host_url'])) formerr($err['host_url']); ?>
</td>
<td>
<?php print_string('auth_ldap_host_url','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key','auth') ?></label></td>
<td>
<?php
$versions = array();
$versions[2] = '2';
$versions[3] = '3';
choose_from_menu($versions, 'version', $config->version, '');
if (isset($err['version'])) formerr($err['version']);
?>
</td>
<td>
<?php print_string('auth_ldap_version','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="ldapencoding"><?php print_string("auth_ldap_ldap_encoding_key", "auth") ?></label></td>
<td>
<input id="ldapencoding" name="ldapencoding" type="text" value="<?php echo $config->ldapencoding ?>" />
<?php
if (isset($err['ldapencoding'])) {
formerr($err['ldapencoding']);
}
?>
</td>
<td><?php print_string('auth_ldap_ldap_encoding', 'auth') ?></td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_bind_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="bind_dn"><?php print_string('auth_ldap_bind_dn_key','auth') ?></label></td>
<td>
<input name="bind_dn" id="bind_dn" type="text" size="30" value="<?php echo $config->bind_dn?>" />
<?php if (isset($err['bind_dn'])) formerr($err['bind_dn']); ?>
</td><td>
<?php print_string('auth_ldap_bind_dn','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="bind_pw"><?php print_string('auth_ldap_bind_pw_key','auth') ?></label></td>
<td>
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" />
<?php if (isset($err['bind_pw'])) formerr($err['bind_pw']); ?>
</td><td>
<?php print_string('auth_ldap_bind_pw','auth') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_user_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuuser_type"><?php print_string('auth_ldap_user_type_key','auth') ?></label></td>
<td>
<?php choose_from_menu($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?>
<?php if (isset($err['user_type'])) formerr($err['user_type']); ?>
</td>
<td>
<?php print_string('auth_ldap_user_type', 'auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="contexts"><?php print_string('auth_ldap_contexts_key','auth') ?></label></td>
<td>
<input name="contexts" id="contexts" type="text" size="30" value="<?php echo $config->contexts?>" />
<?php if (isset($err['contexts'])) formerr($err['contexts']); ?>
</td>
<td>
<?php print_string('auth_ldap_contexts', 'auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menusearch_sub"><?php print_string('auth_ldap_search_sub_key','auth') ?></label></td>
<td>
<?php choose_from_menu($yesno, 'search_sub', $config->search_sub, ''); ?>
</td>
<td>
<?php print_string('auth_ldap_search_sub','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuopt_deref"><?php print_string('auth_ldap_opt_deref_key','auth') ?></label></td>
<td>
<?php
$opt_deref = array();
$opt_deref[LDAP_DEREF_NEVER] = get_string('no');
$opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, '');
if (isset($err['opt_deref'])) formerr($err['opt_deref']);
?>
</td>
<td>
<?php print_string('auth_ldap_opt_deref','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="user_attribute"><?php print_string('auth_ldap_user_attribute_key','auth') ?></label></td>
<td>
<input name="user_attribute" id="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute?>" />
<?php if (isset($err['user_attribute'])) formerr($err['user_attribute']); ?>
</td>
<td>
<?php print_string('auth_ldap_user_attribute','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="memberattribute"><?php print_string('auth_ldap_memberattribute_key','auth') ?></label></td>
<td>
<input name="memberattribute" id="memberattribute" type="text" size="30" value="<?php echo $config->memberattribute?>" />
<?php if (isset($err['memberattribute'])) formerr($err['memberattribute']); ?>
</td><td>
<?php print_string('auth_ldap_memberattribute','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="memberattribute_isdn"><?php print_string('auth_ldap_memberattribute_isdn_key','auth') ?></label></td>
<td>
<input name="memberattribute_isdn" id="memberattribute_isdn" type="text" size="30" value="<?php echo $config->memberattribute_isdn?>" />
<?php if (isset($err['memberattribute_isdn'])) formerr($err['memberattribute_isdn']); ?>
</td><td>
<?php print_string('auth_ldap_memberattribute_isdn','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="objectclass"><?php print_string('auth_ldap_objectclass_key','auth') ?></label></td>
<td>
<input name="objectclass" id="objectclass" type="text" size="30" value="<?php echo $config->objectclass?>" />
<?php if (isset($err['objectclass'])) formerr($err['objectclass']); ?>
</td>
<td>
<?php print_string('auth_ldap_objectclass','auth') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('coursecreators') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="attrcreators_key"><?php print_string('auth_ldap_attrcreators_key','auth') ?></label></td>
<td>
<input name="attrcreators" id="attrcreators" type="text" size="30" value="<?php echo $config->attrcreators?>" />
<?php if (isset($err['attrcreators'])) formerr($err['attrcreators']); ?>
</td><td>
<?php print_string('auth_ldap_attrcreators','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="groupecreators_key"><?php print_string('auth_ldap_groupecreators_key','auth') ?></label></td>
<td>
<input name="groupecreators" id="groupecreators" type="text" size="30" value="<?php echo $config->groupecreators?>" />
<?php if (isset($err['groupecreators'])) formerr($err['groupecreators']); ?>
</td><td>
<?php print_string('auth_ldap_groupecreators','auth') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_sync_script', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="menuremoveuser"><?php print_string('auth_remove_user_key','auth') ?></label></td>
<td>
<?php
$deleteopt = array();
$deleteopt['0'] = get_string('auth_remove_keep','auth');
$deleteopt['1'] = get_string('auth_remove_suspend','auth');
$deleteopt['2'] = get_string('auth_remove_delete','auth');
choose_from_menu($deleteopt, 'removeuser', $config->removeuser, '');
?>
</td>
<td>
<?php print_string('auth_remove_user','auth') ?>
</td>
</tr>
<?php
$ldapplugin = get_auth_plugin('ldap');
$ldapplugin->config_form(get_config('auth/ldap'), $err);
$help = get_string('auth_ldapextrafields','auth');
$help .= get_string('auth_updatelocal_expl','auth');
$help .= get_string('auth_fieldlock_expl','auth');
$help .= get_string('auth_updateremote_expl','auth');
$help .= '<hr />';
$help .= get_string('auth_updateremote_ldap','auth');
print_auth_lock_options('cas', $user_fields, $help, true, true);
?>
</table>
-8
View File
@@ -1,8 +0,0 @@
<table width="90%" border="0" cellspacing="10" cellpadding="5" align="center" style="font-size: small">
<tr>
<td width="50%" class="required" class="headingblock">
<p align="center"><b><font size="3"><?php formerr($errormsg) ?></font></b></p>
</td>
</tr>
</table>
-18
View File
@@ -1,18 +0,0 @@
<?php
// version $Id$
// Page for forbidden access from CAS
require("../../config.php");
if (!$site = get_site()) {
print_error('nosite', '', '', NULL, true);
}
$loginsite = get_string("loginsite");
$errormsg = get_string("auth_cas_invalidcaslogin", "auth");
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite);
include("forbidden.html");
print_footer();
exit;
?>
-85
View File
@@ -1,85 +0,0 @@
<table width="90%" border="0" cellspacing="10" cellpadding="5" align="center">
<tr>
<?php if ($show_instructions) { ?>
<td width="50%" class="headingblock">
<p align="center"><b><font size="3"><?php print_string("returningtosite") ?></font></b></p>
</td>
<td width="50%" class="headingblock">
<p align="center"><b><font size="3"><?php print_string("firsttime") ?></font></b></p>
</td>
<?php } ?>
</tr>
<tr>
<td width="50%" align="center" valign="top" class="generalbox">
<p><?php print_string("loginusing") ?>:<br />
(<?php print_string("cookiesenabled");?>)
<?php helpbutton("cookies", get_string("cookiesenabled"))?><br /><?php formerr($errormsg) ?>
</p>
<form action="index.php" method="post" id="login">
<table border="0" align="center" style="font-size: small">
<tr>
<td width="100%">
<input type="hidden" name="username" id="username" value="cas" />
<input type="hidden" name="password" id="password" value="cas" />
<input type="submit" value="<?php print_string("auth_cas_logincas", "auth") ?>" />
</td>
</tr>
</table>
</form>
<?php if ($CFG->guestloginbutton) { ?>
<hr width="80%" />
<p><?php print_string("someallowguest") ?>:</p>
<form action="index.php" method="post" id="guestlogin">
<input type="hidden" name="username" value="guest" />
<input type="hidden" name="password" value="guest" />
<input type="submit" value="<?php print_string("loginguest") ?>" />
</form>
<?php } ?>
<?php if (is_internal_auth() ) {
$changepassword = "forgot_password.php";
$changebuttonname = get_string("senddetails");
?>
<hr width="80%" />
<p><?php print_string("forgotten") ?></p>
<form action="<?php p($changepassword) ?>" method="get" id="changepassword">
<input type="submit" value="<?php p($changebuttonname) ?>" />
</form>
<?php } ?>
</td>
<?php if ($show_instructions) { ?>
<td width="50%" valign="top" class="generalbox">
<?php switch ($CFG->auth) {
case "email":
print_string("loginsteps", "", "signup.php");
?>
<div align="center">
<form action="signup.php" method="get" id="signup">
<input type="submit" value="<?php print_string("startsignup") ?>" />
</form>
</div>
<?php break;
case "none":
print_string("loginstepsnone");
break;
default:
$authplugin = get_auth_plugin($CFG->auth);
echo format_text($CFG->auth_instructions);
if (!empty($authplugin->config->user_create) and method_exists($authplugin, 'user_create')) {
?>
<div align="center">
<form action="signup.php" method="get" id="signup">
<input type="submit" value="<?php print_string("startsignup") ?>" />
</form>
</div>
<?php }
}
?>
</td></tr>
<?php } ?>
</table>
+9 -2
View File
@@ -1,10 +1,17 @@
<?PHP
// version $Id$
// List of CAS langages.
// You can add langages in /CAS/langage.
// Please send them to http://esup-phpcas.sourceforge.net
$CASLANGUAGES = array (
"greek" => "Modern Greek",
"english" => "English",
"french" => "French");
?>
?>
-313
View File
@@ -1,313 +0,0 @@
<?php
// $Id$
// author: romualdLorthioir $
//CHANGELOG:
//05.03.2005 replace /login/index.php
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
//Define variables used in page
if (!$site = get_site()) {
print_error('nosite', '', '', NULL, true);
}
if (empty($CFG->langmenu)) {
$langmenu = "";
} else {
$currlang = current_language();
$langs = get_list_of_languages();
if (empty($CFG->loginhttps)) {
$wwwroot = $CFG->wwwroot;
} else {
$wwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
$langmenu = popup_form ("$wwwroot/login/index.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
}
$loginsite = get_string("loginsite");
$casauth = get_auth_plugin('cas');
$ldapauth = get_auth_plugin('ldap');
$frm = false;
$user = false;
if ((!empty($SESSION->wantsurl) and strstr($SESSION->wantsurl,'username=guest')) or $loginguest) {
/// Log in as guest automatically (idea from Zbigniew Fiedorowicz)
$frm->username = 'guest';
$frm->password = 'guest';
} else if (!empty($SESSION->wantsurl) && file_exists($CFG->dirroot.'/login/weblinkauth.php')) {
// Handles the case of another Moodle site linking into a page on this site
include($CFG->dirroot.'/login/weblinkauth.php');
if (function_exists(weblink_auth)) {
$user = weblink_auth($SESSION->wantsurl);
}
if ($user) {
$frm->username = $user->username;
} else {
$frm = data_submitted();
}
} else {
$frm = data_submitted();
}
if ($frm and (get_moodle_cookie() == '')) { // Login without cookie
$errormsg = get_string("cookiesnotenabled");
} else if ($frm) { // Login WITH cookies
$frm->username = trim(moodle_strtolower($frm->username));
if (($frm->username == 'guest') and empty($CFG->guestloginbutton)) {
$user = false; /// Can't log in as guest if guest button is disabled
$frm = false;
} else if (!$user) {
if ($CFG->auth == "cas" && $frm->username != 'guest') { /// Cas SSO case
$user = $casauth->authenticate_user_login($frm->username, $frm->password);
}else{
$user = authenticate_user_login($frm->username, $frm->password);
}
}
update_login_count();
if ($user) {
if (! $user->confirmed ) { // they never confirmed via email
print_header(get_string("mustconfirm"), get_string("mustconfirm") );
print_heading(get_string("mustconfirm"));
print_simple_box(get_string("emailconfirmsent", "", $user->email), "center");
print_footer();
die;
}
$USER = $user;
if (!empty($USER->description)) {
$USER->description = true; // No need to cart all of it around
}
$USER->loggedin = true;
$USER->site = $CFG->wwwroot; // for added security, store the site in the session
sesskey(); // for added security, used to check script parameters
if ($USER->username == "guest") {
$USER->lang = $CFG->lang; // Guest language always same as site
$USER->firstname = get_string("guestuser"); // Name always in current language
$USER->lastname = " ";
}
if (!update_user_login_times()) {
error("Wierd error: could not update login records");
}
set_moodle_cookie($USER->username);
unset($SESSION->lang);
$SESSION->justloggedin = true;
// Restore the calendar filters, if saved
if (intval(get_user_preferences('calendar_persistflt', 0))) {
include_once($CFG->dirroot.'/calendar/lib.php');
calendar_set_filters_status(get_user_preferences('calendar_savedflt', 0xff));
}
//Select password change url
$userauth = get_auth_plugin($USER->auth);
if (method_exists($userauth, 'can_change_password') and $userauth->can_change_password()) {
$passwordchangeurl=$CFG->wwwroot.'/login/change_password.php';
}
// check whether the user should be changing password
if (get_user_preferences('auth_forcepasswordchange', false)) {
if (isset($passwordchangeurl)) {
redirect($passwordchangeurl);
} else {
print_error('auth_cas_broken_password','auth');
}
}
add_to_log(SITEID, "user", "login", "view.php?id=$user->id&course=".SITEID, $user->id, 0, $user->id);
if (user_not_fully_set_up($USER)) {
$urltogo = $CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.SITEID;
// We don't delete $SESSION->wantsurl yet, so we get there later
} else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
$urltogo = $SESSION->wantsurl; /// Because it's an address in this site
unset($SESSION->wantsurl);
} else {
$urltogo = $CFG->wwwroot.'/'; /// Go to the standard home page
unset($SESSION->wantsurl); /// Just in case
}
// check if user password has expired
// Currently supported only for ldap-authentication module
if ($ldapauth->config->expiration == 1) {
$days2expire = $ldapauth->password_expire($USER->username);
if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) {
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div align=\"right\">$langmenu</div>");
notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo);
print_footer();
exit;
} elseif (intval($days2expire) < 0 ) {
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div align=\"right\">$langmenu</div>");
notice_yesno(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo);
print_footer();
exit;
}
}
reset_login_count();
load_all_capabilities(); /// This is what lets the user do anything on the site :-)
redirect($urltogo);
exit;
} else {
if ($CFG->auth == "cas" ) { /// CAS error login
$errormsg = get_string("invalidcaslogin");
phpCAS::logout("$CFG->wwwroot/auth/cas/forbidden.php");
}else{
$errormsg = get_string("invalidlogin");
}
}
}
$user = $casauth->automatic_authenticate($user);
if ($user) {
if (! $user->confirmed ) { // they never confirmed via email
print_header(get_string("mustconfirm"), get_string("mustconfirm") );
print_heading(get_string("mustconfirm"));
print_simple_box(get_string("emailconfirmsent", "", $user->email), "center");
print_footer();
die;
}
$USER = $user;
if (!empty($USER->description)) {
$USER->description = true; // No need to cart all of it around
}
$USER->loggedin = true;
$USER->site = $CFG->wwwroot; // for added security, store the site in the session
sesskey(); // for added security, used to check script parameters
if ($USER->username == "guest") {
$USER->lang = $CFG->lang; // Guest language always same as site
$USER->firstname = get_string("guestuser"); // Name always in current language
$USER->lastname = " ";
}
if (!update_user_login_times()) {
error("Wierd error: could not update login records");
}
set_moodle_cookie($USER->username);
unset($SESSION->lang);
$SESSION->justloggedin = true;
// Restore the calendar filters, if saved
if (intval(get_user_preferences('calendar_persistflt', 0))) {
include_once($CFG->dirroot.'/calendar/lib.php');
calendar_set_filters_status(get_user_preferences('calendar_savedflt', 0xff));
}
//Select password change url
$userauth = get_auth_plugin($USER->auth);
if (method_exists($userauth, 'can_change_password') and $userauth->can_change_password()) {
$passwordchangeurl=$CFG->wwwroot.'/login/change_password.php';
}
// check whether the user should be changing password
if (get_user_preferences('auth_forcepasswordchange', false)) {
if (isset($passwordchangeurl)) {
redirect($passwordchangeurl);
} else {
print_error('auth_cas_broken_password','auth');
}
}
add_to_log(SITEID, "user", "login", "view.php?id=$user->id&course=".SITEID, $user->id, 0, $user->id);
if (user_not_fully_set_up($USER)) {
$urltogo = $CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.SITEID;
// We don't delete $SESSION->wantsurl yet, so we get there later
} else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
$urltogo = $SESSION->wantsurl; /// Because it's an address in this site
unset($SESSION->wantsurl);
} else {
$urltogo = $CFG->wwwroot.'/'; /// Go to the standard home page
unset($SESSION->wantsurl); /// Just in case
}
// check if user password has expired
// Currently supported only for ldap-authentication module
if ($ldapauth->config->expiration == 1) {
$days2expire = $ldapauth->password_expire($USER->username);
if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) {
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div class=\"langmenu\">$langmenu</div>");
notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo);
print_footer();
exit;
} elseif (intval($days2expire) < 0 ) {
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div class=\"langmenu\">$langmenu</div>");
notice_yesno(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo);
print_footer();
exit;
}
}
reset_login_count();
load_all_capabilities(); /// This is what lets the user do anything on the site :-)
redirect($urltogo);
exit;
} else {
if (!$CFG->guestloginbutton) {
$errormsg = get_string("invalidcaslogin");
phpCAS::logout("$CFG->wwwroot/auth/cas/forbidden.php");
}
}
if (empty($errormsg)) {
$errormsg = "";
}
if (empty($SESSION->wantsurl)) {
$SESSION->wantsurl = array_key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER["HTTP_REFERER"] : $CFG->wwwroot.'/';
}
if (get_moodle_cookie() == '') {
set_moodle_cookie('nobody'); // To help search for cookies
}
if (empty($frm->username)) {
$frm->username = get_moodle_cookie() === 'nobody' ? '' : get_moodle_cookie();
$frm->password = "";
}
if (!empty($frm->username)) {
$focus = "login.password";
} else {
$focus = "login.username";
}
if ($CFG->auth == "email" or $CFG->auth == "none" or chop($CFG->auth_instructions) <> "" ) {
$show_instructions = true;
} else {
$show_instructions = false;
}
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div align=\"right\">$langmenu</div>");
include($CFG->dirroot.'/auth/cas/index_form.html');
print_footer();
exit;
// No footer on this page
?>
-15
View File
@@ -1,15 +0,0 @@
<?php
// $Id$
// logout the user from CAS server (destroy the ticket)
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
global $CFG;
if ($CFG->cas_logout) {
require_once($CFG->dirroot.'/config.php');
include_once($CFG->dirroot.'/lib/cas/CAS.php');
phpCAS::client($CFG->cas_version,$CFG->cas_hostname,(int)$CFG->cas_port,$CFG->cas_baseuri);
$backurl = $CFG->wwwroot;
phpCAS::logout($backurl);
}
?>
+29 -22
View File
@@ -182,6 +182,7 @@ class auth_plugin_db extends auth_plugin_base {
}
$authdb->Close();
return $result;
}
@@ -197,7 +198,7 @@ class auth_plugin_db extends auth_plugin_base {
global $CFG;
if ($this->config->passtype === 'internal') {
update_internal_user_password($user, $newpassword);
return update_internal_user_password($user, $newpassword);
} else {
// we should have never been called!
return false;
@@ -390,6 +391,9 @@ class auth_plugin_db extends auth_plugin_base {
function user_exists($username) {
/// Init result value
$result = false;
$textlib = textlib_get_instance();
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->extencoding);
@@ -397,46 +401,40 @@ class auth_plugin_db extends auth_plugin_base {
$rs = $authdb->Execute("SELECT * FROM {$this->config->table}
WHERE {$this->config->fielduser} = '".$this->ext_addslashes($extusername)."' ");
$authdb->Close();
if (!$rs) {
print_error('auth_dbcantconnect','auth');
return false;
} else if ( $rs->RecordCount() ) {
// user exists exterally
$result = $rs->RecordCount();
}
if ( $rs->RecordCount() ) {
// user exists exterally
return $rs->RecordCount();
} else {
// user does not exist externally
return false;
}
$authdb->Close();
return $result;
}
function get_userlist() {
/// Init result value
$result = array();
$authdb = $this->db_init();
// fetch userlist
$rs = $authdb->Execute("SELECT {$this->config->fielduser} AS username
FROM {$this->config->table} ");
$authdb->Close();
if (!$rs) {
print_error('auth_dbcantconnect','auth');
return false;
} else if ( $rs->RecordCount() ) {
while ($rec = rs_fetch_next_record($rs)) {
array_push($result, $rec->username);
}
}
if ( $rs->RecordCount() ) {
$userlist = array();
while ($rec = rs_fetch_next_record($rs)) {
array_push($userlist, $rec->username);
}
return $userlist;
} else {
return array();
}
$authdb->Close();
return $result;
}
/**
@@ -578,7 +576,7 @@ class auth_plugin_db extends auth_plugin_base {
* @return bool
*/
function is_internal() {
return false;
return ($this->config->passtype == 'internal');
}
/**
@@ -607,6 +605,15 @@ class auth_plugin_db extends auth_plugin_base {
}
}
/**
* Returns true if plugin allows resetting of internal password.
*
* @return bool
*/
function can_reset_password() {
return ($this->config->passtype == 'internal');
}
/**
* Prints a form for configuring this authentication plugin.
*
+1 -1
View File
@@ -50,7 +50,7 @@
$yesno = array( get_string('no'), get_string('yes') );
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><label for="host"><?php print_string("auth_dbhost_key", "auth") ?></label></td>
+2 -2
View File
@@ -1,7 +1,7 @@
<!-- No config needed -->
<div align="center"><?php print_string('none'); ?></div>
<div style="text-align: center"><?php print_string('none'); ?></div>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<?php
print_auth_lock_options('email', $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
+3 -3
View File
@@ -88,7 +88,7 @@ class auth_plugin_fc extends auth_plugin_base {
$userinfo = array();
$fpp = new fcFPP($this->config->host, $this->config->port);
$fpp = new fcFPP($this->config->host, $this->config->fppport);
if ($fpp->open()) {
if ($fpp->login($this->config->userid, $this->config->passwd)) {
$userinfo['firstname'] = $fpp->getUserInfo($username,"1202");
@@ -121,7 +121,7 @@ class auth_plugin_fc extends auth_plugin_base {
$fcgroups = array();
$fpp = new fcFPP($this->config->host, $this->config->port);
$fpp = new fcFPP($this->config->host, $this->config->fppport);
if ($fpp->open()) {
if ($fpp->login($this->config->userid, $this->config->passwd)) {
$fcgroups = $fpp->getGroups($username);
@@ -224,7 +224,7 @@ class auth_plugin_fc extends auth_plugin_base {
}
// save settings
set_config('host', $config->user, 'auth/fc');
set_config('host', $config->host, 'auth/fc');
set_config('fppport', $config->fppport, 'auth/fc');
set_config('userid', $config->userid, 'auth/fc');
set_config('passwd', $config->passwd, 'auth/fc');
+1 -1
View File
@@ -24,7 +24,7 @@
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string("auth_fchost_key", "auth") ?>:</td>
+1 -1
View File
@@ -50,7 +50,7 @@ class fcFPP
$conn = fsockopen($host, $port, $errno, $errstr, 5);
if (!$conn)
{
print_error('auth_fcconnfail','auth', array($errno, $errstr));
print_error('auth_fcconnfail','auth', '', array($errno, $errstr));
return false;
}
+1 -1
View File
@@ -15,7 +15,7 @@ if (!isset($config->changepasswordurl)) {
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_imaphost_key', 'auth') ?>: </td>
+219 -27
View File
@@ -48,7 +48,7 @@ class auth_plugin_ldap extends auth_plugin_base {
//hack prefix to objectclass
if (empty($this->config->objectclass)) { // Can't send empty filter
$this->config->objectclass='objectClass=*';
} else if (strpos($this->config->objectclass, 'objectClass=') !== 0) {
} else if (stripos($this->config->objectclass, 'objectClass=') !== 0) {
$this->config->objectclass = 'objectClass='.$this->config->objectclass;
}
@@ -97,7 +97,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
else {
@ldap_close($ldapconnection);
print_error('auth_ldap_noconnect','auth',$this->config->host_url);
print_error('auth_ldap_noconnect','auth','',$this->config->host_url);
}
return false;
}
@@ -273,14 +273,18 @@ class auth_plugin_ldap extends auth_plugin_base {
$newuser['userpassword'] = $extpassword;
break;
default:
print_error('auth_ldap_unsupportedusertype','auth',$this->config->user_type);
print_error('auth_ldap_unsupportedusertype','auth','',$this->config->user_type);
}
$uadd = $this->ldap_add($ldapconnection, $this->config->user_attribute.'="'.$this->ldap_addslashes($userobject->username).','.$this->config->create_context.'"', $newuser);
$uadd = ldap_add($ldapconnection, $this->config->user_attribute.'="'.$this->ldap_addslashes($userobject->username).','.$this->config->create_context.'"', $newuser);
ldap_close($ldapconnection);
return $uadd;
}
function can_reset_password() {
return !empty($this->config->stdchangepassword);
}
/**
* return number of days to user password expires
*
@@ -291,7 +295,7 @@ class auth_plugin_ldap extends auth_plugin_base {
* @return integer
*/
function password_expire($username) {
$result = false;
$result = 0;
$textlib = textlib_get_instance();
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
@@ -302,19 +306,16 @@ class auth_plugin_ldap extends auth_plugin_base {
$sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);
if ($sr) {
$info = $this->ldap_get_entries($ldapconnection, $sr);
if (empty ($info) or empty($info[0][$this->config->expireattr][0])) {
//error_log("ldap: no expiration value".$info[0][$this->config->expireattr]);
// no expiration attribute, password does not expire
$result = 0;
}
else {
$now = time();
$expiretime = $this->ldap_expirationtime2unix($info[0][$this->config->expireattr][0]);
if ($expiretime > $now) {
$result = ceil(($expiretime - $now) / DAYSECS);
}
else {
$result = floor(($expiretime - $now) / DAYSECS);
if (!empty ($info) and !empty($info[0][$this->config->expireattr][0])) {
$expiretime = $this->ldap_expirationtime2unix($info[0][$this->config->expireattr][0], $ldapconnection, $user_dn);
if ($expiretime != 0) {
$now = time();
if ($expiretime > $now) {
$result = ceil(($expiretime - $now) / DAYSECS);
}
else {
$result = floor(($expiretime - $now) / DAYSECS);
}
}
}
} else {
@@ -430,7 +431,8 @@ class auth_plugin_ldap extends auth_plugin_base {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
$value = $textlib->convert($value[0], $this->config->ldapencoding, 'utf-8');
array_push($fresult, $value);
// usernames are __always__ lowercase.
array_push($fresult, moodle_strtolower($value));
if (count($fresult) >= $bulk_insert_records) {
$this->ldap_bulk_insert($fresult, $temptable);
$fresult = array();
@@ -693,7 +695,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$user = get_record('user', 'username', $username, 'mnethostid', $CFG->mnet_localhost_id);
if (empty($user)) { // trouble
error_log("Cannot update non-existent user: ".stripslashes($username));
print_error('auth_dbusernotexist','auth',$username);
print_error('auth_dbusernotexist','auth','',$username);
die;
}
@@ -833,6 +835,21 @@ class auth_plugin_ldap extends auth_plugin_base {
return true; // just change auth and skip update
}
$attrmap = $this->ldap_attributes();
// Before doing anything else, make sure really need to update anything
// in the external LDAP server.
$update_external = false;
foreach ($attrmap as $key => $ldapkeys) {
if (!empty($this->config->{'field_updateremote_'.$key})) {
$update_external = true;
break;
}
}
if (!$update_external) {
return true;
}
$textlib = textlib_get_instance();
$extoldusername = $textlib->convert($olduser->username, 'utf-8', $this->config->ldapencoding);
@@ -840,7 +857,6 @@ class auth_plugin_ldap extends auth_plugin_base {
$search_attribs = array();
$attrmap = $this->ldap_attributes();
foreach ($attrmap as $key => $values) {
if (!is_array($values)) {
$values = array($values);
@@ -861,9 +877,16 @@ class auth_plugin_ldap extends auth_plugin_base {
$user_entry = $this->ldap_get_entries($ldapconnection, $user_info_result);
if (empty($user_entry)) {
$error = 'ldap: Could not find user while updating externally. '.
'Details follow: search base: \''.$user_dn.'\'; search filter: \''.
$this->config->objectclass.'\'; search attributes: ';
foreach ($search_attribs as $attrib) {
$error .= $attrib.' ';
}
error_log($error);
return false; // old user not found!
} else if (count($user_entry) > 1) {
trigger_error("ldap: Strange! More than one user record found in ldap. Only using the first one.");
error_log('ldap: Strange! More than one user record found in ldap. Only using the first one.');
return false;
}
$user_entry = $user_entry[0];
@@ -889,6 +912,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
$ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding);
foreach ($ldapkeys as $ldapkey) {
@@ -1051,6 +1075,23 @@ class auth_plugin_ldap extends auth_plugin_base {
}
break;
case 'ad':
// Passwords in Active Directory must be encoded as Unicode
// strings (UCS-2 Little Endian format) and surrounded with
// double quotes. See http://support.microsoft.com/?kbid=269190
if (!function_exists('mb_convert_encoding')) {
error_log ('You need the mbstring extension to change passwords in Active Directory');
return false;
}
$extpassword = mb_convert_encoding('"'.$extpassword.'"', "UCS-2LE", $this->config->ldapencoding);
$result = ldap_modify($ldapconnection, $user_dn, array('unicodePwd' => $extpassword));
if (!$result) {
error_log('LDAP Error in user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
break;
default:
$usedconnection = &$ldapconnection;
// send ldap the password in cleartext, it will md5 it itself
@@ -1138,7 +1179,7 @@ class auth_plugin_ldap extends auth_plugin_base {
'rfc2307' => 'shadowExpire',
'rfc2307bis' => 'shadowExpire',
'samba' => '', //No support yet
'ad' => '', //No support yet
'ad' => 'pwdLastSet',
'default' => ''
);
return $default;
@@ -1182,9 +1223,11 @@ class auth_plugin_ldap extends auth_plugin_base {
* depends on $this->config->user_type variable
*
* @param mixed time Time stamp readed from ldap as it is.
* @param string $ldapconnection Just needed for Active Directory.
* @param string $user_dn User distinguished name for the user we are checking password expiration (just needed for Active Directory).
* @return timestamp
*/
function ldap_expirationtime2unix ($time) {
function ldap_expirationtime2unix ($time, $ldapconnection, $user_dn) {
$result = false;
switch ($this->config->user_type) {
case 'edir':
@@ -1196,9 +1239,13 @@ class auth_plugin_ldap extends auth_plugin_base {
$sec=substr($time,12,2);
$result = mktime($hr,$min,$sec,$mo,$dt,$yr);
break;
case 'posix':
case 'rfc2307':
case 'rfc2307bis':
$result = $time * DAYSECS; //The shadowExpire contains the number of DAYS between 01/01/1970 and the actual expiration date
break;
case 'ad':
$result = $this->ldap_get_ad_pwdexpire($time, $ldapconnection, $user_dn);
break;
default:
print_error('auth_ldap_usertypeundefined', 'auth');
}
@@ -1216,7 +1263,8 @@ class auth_plugin_ldap extends auth_plugin_base {
case 'edir':
$result=date('YmdHis', $time).'Z';
break;
case 'posix':
case 'rfc2307':
case 'rfc2307bis':
$result = $time ; //Already in correct format
break;
default:
@@ -1315,6 +1363,11 @@ class auth_plugin_ldap extends auth_plugin_base {
ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->version);
}
// Fix MDL-10921
if ($this->config->user_type == 'ad') {
ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);
}
if (!empty($binddn)) {
//bind with search-user
//$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd;
@@ -1337,7 +1390,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
//If any of servers are alive we have already returned connection
print_error('auth_ldap_noconnect_all','auth',$this->config->user_type);
print_error('auth_ldap_noconnect_all','auth', '', $debuginfo);
return false;
}
@@ -1684,6 +1737,145 @@ class auth_plugin_ldap extends auth_plugin_base {
array('\\"', '\\00'), $text);
return $text;
}
/**
* Get password expiration time for a given user from Active Directory
*
* @param string $pwdlastset The time last time we changed the password.
* @param resource $lcapconn The open LDAP connection.
* @param string $user_dn The distinguished name of the user we are checking.
*
* @return string $unixtime
*/
function ldap_get_ad_pwdexpire($pwdlastset, $ldapconn, $user_dn){
define ('ROOTDSE', '');
// UF_DONT_EXPIRE_PASSWD value taken from MSDN directly
define ('UF_DONT_EXPIRE_PASSWD', 0x00010000);
global $CFG;
if (!function_exists('bcsub')) {
error_log ('You need the BCMath extension to use grace logins with Active Directory');
return 0;
}
// If UF_DONT_EXPIRE_PASSWD flag is set in user's
// userAccountControl attribute, the password doesn't expire.
$sr = ldap_read($ldapconn, $user_dn, 'objectclass=*',
array('userAccountControl'));
if (!$sr) {
error_log("ldap: error getting userAccountControl for $user_dn");
// don't expire password, as we are not sure it has to be
// expired or not.
return 0;
}
$info = $this->ldap_get_entries($ldapconn, $sr);
$useraccountcontrol = $info[0]['userAccountControl'][0];
if ($useraccountcontrol & UF_DONT_EXPIRE_PASSWD) {
// password doesn't expire.
return 0;
}
// If pwdLastSet is zero, the user must change his/her password now
// (unless UF_DONT_EXPIRE_PASSWD flag is set, but we already
// tested this above)
if ($pwdlastset === '0') {
// password has expired
return -1;
}
// ----------------------------------------------------------------
// Password expiration time in Active Directory is the composition of
// two values:
//
// - User's pwdLastSet attribute, that stores the last time
// the password was changed.
//
// - Domain's maxPwdAge attribute, that sets how long
// passwords last in this domain.
//
// We already have the first value (passed in as a parameter). We
// need to get the second one. As we don't know the domain DN, we
// have to query rootDSE's defaultNamingContext attribute to get
// it. Then we have to query that DN's maxPwdAge attribute to get
// the real value.
//
// Once we have both values, we just need to combine them. But MS
// chose to use a different base and unit for time measurements.
// So we need to convert the values to Unix timestamps (see
// details below).
// ----------------------------------------------------------------
$sr = ldap_read($ldapconn, ROOTDSE, 'objectclass=*',
array('defaultNamingContext'));
if (!$sr) {
error_log("ldap: error querying rootDSE for Active Directory");
return 0;
}
$info = $this->ldap_get_entries($ldapconn, $sr);
$domaindn = $info[0]['defaultNamingContext'][0];
$sr = ldap_read ($ldapconn, $domaindn, 'objectclass=*',
array('maxPwdAge'));
$info = $this->ldap_get_entries($ldapconn, $sr);
$maxpwdage = $info[0]['maxPwdAge'][0];
// ----------------------------------------------------------------
// MSDN says that "pwdLastSet contains the number of 100 nanosecond
// intervals since January 1, 1601 (UTC), stored in a 64 bit integer".
//
// According to Perl's Date::Manip, the number of seconds between
// this date and Unix epoch is 11644473600. So we have to
// substract this value to calculate a Unix time, once we have
// scaled pwdLastSet to seconds. This is the script used to
// calculate the value shown above:
//
// #!/usr/bin/perl -w
//
// use Date::Manip;
//
// $date1 = ParseDate ("160101010000 UTC");
// $date2 = ParseDate ("197001010000 UTC");
// $delta = DateCalc($date1, $date2, \$err);
// $secs = Delta_Format($delta, 0, "%st");
// print "$secs \n";
//
// MSDN also says that "maxPwdAge is stored as a large integer that
// represents the number of 100 nanosecond intervals from the time
// the password was set before the password expires." We also need
// to scale this to seconds. Bear in mind that this value is stored
// as a _negative_ quantity (at least in my AD domain).
//
// As a last remark, if the low 32 bits of maxPwdAge are equal to 0,
// the maximum password age in the domain is set to 0, which means
// passwords do not expire (see
// http://msdn2.microsoft.com/en-us/library/ms974598.aspx)
//
// As the quantities involved are too big for PHP integers, we
// need to use BCMath functions to work with arbitrary precision
// numbers.
// ----------------------------------------------------------------
// If the low order 32 bits are 0, then passwords do not expire in
// the domain. Just do '$maxpwdage mod 2^32' and check the result
// (2^32 = 4294967296)
if (bcmod ($maxpwdage, 4294967296) === '0') {
return 0;
}
// Add up pwdLastSet and maxPwdAge to get password expiration
// time, in MS time units. Remember maxPwdAge is stored as a
// _negative_ quantity, so we need to substract it in fact.
$pwdexpire = bcsub ($pwdlastset, $maxpwdage);
// Scale the result to convert it to Unix time units and return
// that value.
return bcsub( bcdiv($pwdexpire, '10000000'), '11644473600');
}
}
?>
+2 -2
View File
@@ -63,7 +63,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<tr>
<td colspan="2">
@@ -228,7 +228,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
<tr valign="top" class="required">
<td align="right"><label for="memberattribute_isdn"><?php print_string('auth_ldap_memberattribute_isdn_key','auth') ?></label></td>
<td>
<input name="memberattribute" id="memberattribute_isdn" type="text" size="30" value="<?php echo $config->memberattribute_isdn?>" />
<input name="memberattribute_isdn" id="memberattribute_isdn" type="text" size="30" value="<?php echo $config->memberattribute_isdn?>" />
<?php if (isset($err['memberattribute_isdn'])) formerr($err['memberattribute_isdn']); ?>
</td><td>
<?php print_string('auth_ldap_memberattribute_isdn','auth') ?>
+2 -2
View File
@@ -1,7 +1,7 @@
<!-- No config needed -->
<div align="center"><?php print_string('none'); ?></div>
<div style="text-align:center"><?php print_string('none'); ?></div>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<?php
print_auth_lock_options('manual', $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
+37 -36
View File
@@ -1,4 +1,4 @@
<?php
<?php // $Id$
/**
* @author Martin Dougiamas
@@ -89,7 +89,7 @@ class auth_plugin_mnet extends auth_plugin_base {
}
// session okay, try getting the user
if (!$user = get_complete_user_data('id', $mnet_session->userid)) {
if (!$user = get_record('user', 'id', $mnet_session->userid)) {
echo mnet_server_fault(3, get_string('authfail_usermismatch', 'mnet'));
exit;
}
@@ -115,7 +115,7 @@ class auth_plugin_mnet extends auth_plugin_base {
$userdata['session.gc_maxlifetime'] = ini_get('session.gc_maxlifetime');
$userdata['picture'] = $user->picture;
if (!empty($user->picture)) {
$imagefile = "{$CFG->dataroot}/users/{$user->id}/f1.jpg";
$imagefile = make_user_directory($user->id, true) . "/f1.jpg";
if (file_exists($imagefile)) {
$userdata['imagehash'] = sha1(file_get_contents($imagefile));
}
@@ -208,7 +208,7 @@ class auth_plugin_mnet extends auth_plugin_base {
$mnet_session->confirm_timeout = time() + $this->config->rpc_negotiation_timeout;
$mnet_session->expires = time() + (integer)ini_get('session.gc_maxlifetime');
$mnet_session->session_id = session_id();
if (! $mnet_session->id = insert_record('mnet_session', $mnet_session)) {
if (! $mnet_session->id = insert_record('mnet_session', addslashes_object($mnet_session))) {
error(get_string('databaseerror', 'mnet'));
}
} else {
@@ -217,7 +217,7 @@ class auth_plugin_mnet extends auth_plugin_base {
$mnet_session->confirm_timeout = time() + $this->config->rpc_negotiation_timeout;
$mnet_session->expires = time() + (integer)ini_get('session.gc_maxlifetime');
$mnet_session->session_id = session_id();
if (false == update_record('mnet_session', $mnet_session)) {
if (false == update_record('mnet_session', addslashes_object($mnet_session))) {
error(get_string('databaseerror', 'mnet'));
}
}
@@ -285,20 +285,20 @@ class auth_plugin_mnet extends auth_plugin_base {
$firsttime = false;
// get the local record for the remote user
$localuser = get_record('user', 'username', $remoteuser->username, 'mnethostid', $remotehost->id);
$localuser = get_record('user', 'username', addslashes($remoteuser->username), 'mnethostid', $remotehost->id);
// add the remote user to the database if necessary, and if allowed
// TODO: refactor into a separate function
if (! $localuser->id) {
if (empty($localuser) || ! $localuser->id) {
if (empty($this->config->auto_add_remote_users)) {
error(get_string('nolocaluser', 'mnet'));
}
$remoteuser->mnethostid = $remotehost->id;
if (! insert_record('user', $remoteuser)) {
if (! insert_record('user', addslashes_object($remoteuser))) {
error(get_string('databaseerror', 'mnet'));
}
$firsttime = true;
if (! $localuser = get_record('user', 'username', $remoteuser->username, 'mnethostid', $remotehost->id)) {
if (! $localuser = get_record('user', 'username', addslashes($remoteuser->username), 'mnethostid', $remotehost->id)) {
error(get_string('nolocaluser', 'mnet'));
}
}
@@ -319,7 +319,7 @@ class auth_plugin_mnet extends auth_plugin_base {
// TODO: fetch image if it has changed
if ($key == 'imagehash') {
$dirname = "{$CFG->dataroot}/users/{$localuser->id}";
$dirname = make_user_directory($localuser->id, true);
$filename = "$dirname/f1.jpg";
$localhash = '';
@@ -367,7 +367,7 @@ class auth_plugin_mnet extends auth_plugin_base {
$localuser->mnethostid = $remotepeer->id;
$bool = update_record('user', $localuser);
$bool = update_record('user', addslashes_object($localuser));
if (!$bool) {
// TODO: Jonathan to clean up mess
// Actually, this should never happen (modulo race conditions) - ML
@@ -390,12 +390,12 @@ class auth_plugin_mnet extends auth_plugin_base {
$mnet_session->confirm_timeout = time();
$mnet_session->expires = time() + (integer)$session_gc_maxlifetime;
$mnet_session->session_id = session_id();
if (! $mnet_session->id = insert_record('mnet_session', $mnet_session)) {
if (! $mnet_session->id = insert_record('mnet_session', addslashes_object($mnet_session))) {
error(get_string('databaseerror', 'mnet'));
}
} else {
$mnet_session->expires = time() + (integer)$session_gc_maxlifetime;
update_record('mnet_session', $mnet_session);
update_record('mnet_session', addslashes_object($mnet_session));
}
if (!$firsttime) {
@@ -539,7 +539,7 @@ class auth_plugin_mnet extends auth_plugin_base {
// First up - do we have a record for this course?
if (!array_key_exists($course['remoteid'], $currentcourses)) {
// No record - we must create it
$course['id'] = insert_record('mnet_enrol_course', (object)$course);
$course['id'] = insert_record('mnet_enrol_course', addslashes_object((object)$course));
$currentcourse = (object)$course;
} else {
// Pointer to current course:
@@ -557,7 +557,7 @@ class auth_plugin_mnet extends auth_plugin_base {
}
if ($saveflag) {
update_record('mnet_enrol_course', $currentcourse);
update_record('mnet_enrol_course', addslashes_object($currentcourse));
}
if (isset($currentcourse->assignmentid) && is_numeric($currentcourse->assignmentid)) {
@@ -580,7 +580,7 @@ class auth_plugin_mnet extends auth_plugin_base {
$assignObj->hostid = (int)$MNET_REMOTE_CLIENT->id;
$assignObj->courseid = $course['id'];
$assignObj->rolename = $course['defaultrolename'];
$assignObj->id = insert_record('mnet_enrol_assignments', $assignObj);
$assignObj->id = insert_record('mnet_enrol_assignments', addslashes_object($assignObj));
}
}
@@ -673,15 +673,16 @@ class auth_plugin_mnet extends auth_plugin_base {
ORDER BY
h.name ASC";
$resultset = get_records_sql($query);
$id_providers = array();
$service_providers = array();
foreach($resultset as $hostservice) {
if(!empty($hostservice->idppublish) && !empty($hostservice->spsubscribe)) {
$service_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot);
}
if(!empty($hostservice->idpsubscribe) && !empty($hostservice->sppublish)) {
$id_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot);
if ($resultset = get_records_sql($query)) {
foreach($resultset as $hostservice) {
if(!empty($hostservice->idppublish) && !empty($hostservice->spsubscribe)) {
$service_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot);
}
if(!empty($hostservice->idpsubscribe) && !empty($hostservice->sppublish)) {
$id_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot);
}
}
}
@@ -694,7 +695,7 @@ class auth_plugin_mnet extends auth_plugin_base {
function process_config($config) {
// set to defaults if undefined
if (!isset ($config->rpc_negotiation_timeout)) {
$config->host = '30';
$config->rpc_negotiation_timeout = '30';
}
if (!isset ($config->auto_add_remote_users)) {
$config->auto_add_remote_users = '0';
@@ -884,7 +885,7 @@ class auth_plugin_mnet extends auth_plugin_base {
unset($logEntryObj->username);
$insertok = insert_record('mnet_log', $logEntryObj, false);
$insertok = insert_record('mnet_log', addslashes_object($logEntryObj), false);
if ($insertok) {
$MNET_REMOTE_CLIENT->last_log_id = $logEntryObj->remoteid;
@@ -991,8 +992,8 @@ class auth_plugin_mnet extends auth_plugin_base {
$random100 = rand(0,100);
if ($random100 < 10) { // Approximately 10% of the time.
// nuke olden sessions
$longtime = $timenow - (1 * 3600 * 24);
delete_records_select('mnet_session', "expires < $timenow");
$longtime = time() - (1 * 3600 * 24);
delete_records_select('mnet_session', "expires < $longtime");
}
}
@@ -1005,7 +1006,7 @@ class auth_plugin_mnet extends auth_plugin_base {
*/
function prelogout_hook() {
global $MNET, $CFG, $USER;
if ($USER->auth != 'mnet') {
if (!is_enabled_auth('mnet')) {
return;
}
@@ -1038,14 +1039,14 @@ class auth_plugin_mnet extends auth_plugin_base {
from
{$CFG->prefix}mnet_session s
where
s.username = '$username' AND
s.username = '".addslashes($username)."' AND
s.useragent = '$useragent' AND
s.mnethostid = '{$USER->mnethostid}'";
$mnetsessions = get_records_sql($sql);
$ignore = delete_records('mnet_session',
'username', $username,
'username', addslashes($username),
'useragent', $useragent,
'mnethostid', $USER->mnethostid);
@@ -1080,7 +1081,7 @@ class auth_plugin_mnet extends auth_plugin_base {
global $CFG, $USER, $MNET_REMOTE_CLIENT;
require_once $CFG->dirroot.'/mnet/xmlrpc/client.php';
$userid = get_field('user', 'id', 'mnethostid', $CFG->mnet_localhost_id, 'username', $username);
$userid = get_field('user', 'id', 'mnethostid', $CFG->mnet_localhost_id, 'username', addslashes($username));
$returnstring = '';
$sql = "
@@ -1176,7 +1177,7 @@ class auth_plugin_mnet extends auth_plugin_base {
*/
function kill_child($username, $useragent) {
global $CFG, $MNET_REMOTE_CLIENT;
$session = get_record('mnet_session', 'username', $username, 'mnethostid', $MNET_REMOTE_CLIENT->id, 'useragent', $useragent);
$session = get_record('mnet_session', 'username', addslashes($username), 'mnethostid', $MNET_REMOTE_CLIENT->id, 'useragent', $useragent);
if (false != $session) {
$start = ob_start();
@@ -1260,9 +1261,9 @@ class auth_plugin_mnet extends auth_plugin_base {
function fetch_user_image($username) {
global $CFG;
if ($user = get_record('user', 'username', $username, 'mnethostid', $CFG->mnet_localhost_id)) {
$filename1 = "{$CFG->dataroot}/users/{$user->id}/f1.jpg";
$filename2 = "{$CFG->dataroot}/users/{$user->id}/f2.jpg";
if ($user = get_record('user', 'username', addslashes($username), 'mnethostid', $CFG->mnet_localhost_id)) {
$filename1 = make_user_directory($user->id, true) . "/f1.jpg";
$filename2 = make_user_directory($user->id, true) . "/f2.jpg";
$return = array();
if (file_exists($filename1)) {
$return['f1'] = base64_encode(file_get_contents($filename1));
@@ -1331,7 +1332,7 @@ class auth_plugin_mnet extends auth_plugin_base {
*/
function can_login_remotely($username, $mnethostid) {
$accessctrl = 'allow';
$aclrecord = get_record('mnet_sso_access_control', 'username', $username, 'mnet_host_id', $mnethostid);
$aclrecord = get_record('mnet_sso_access_control', 'username', addslashes($username), 'mnet_host_id', $mnethostid);
if (!empty($aclrecord)) {
$accessctrl = $aclrecord->accessctrl;
}
+8 -6
View File
@@ -2,7 +2,7 @@
// set to defaults if undefined
if (!isset($config->rpc_negotiation_timeout)) {
$config->host = '30';
$config->rpc_negotiation_timeout = '30';
}
if (!isset ($config->auto_add_remote_users)) {
$config->auto_add_remote_users = '0';
@@ -15,7 +15,8 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<div id="mnetconfig">
<table cellspacing="0" cellpadding="5">
<tr valign="top" class="required">
<td align="right"><?php print_string('rpc_negotiation_timeout', 'auth'); ?>: </td>
@@ -59,29 +60,30 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
<td colspan="3"><?php print_string('auth_mnet_roamin', 'auth'); ?>: </td>
</tr>
<?php
foreach($id_providers as $host):
foreach($id_providers as $host) {
?>
<tr valign="top" class="required">
<td align="right"><?php echo $host['name']; ?>: </td>
<td colspan="2"><?php echo $host['wwwroot']; ?> </td>
</tr>
<?php
endforeach;
}
?>
<tr valign="top" class="required">
<td colspan="3"><?php print_string('auth_mnet_roamout', 'auth'); ?>: </td>
</tr>
<?php
foreach($service_providers as $host):
foreach($service_providers as $host) {
?>
<tr valign="top" class="required">
<td align="right"><?php echo $host['name']; ?>: </td>
<td colspan="2"><?php echo $host['wwwroot']; ?> </td>
</tr>
<?php
endforeach;
}
// print_auth_lock_options('mnet', $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
?>
</table>
</div>
+1 -1
View File
@@ -12,7 +12,7 @@ if (!isset($config->changepasswordurl)) {
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_nntphost_key', 'auth') ?>: </td>

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