Compare commits

..

1011 Commits

Author SHA1 Message Date
Martin Dougiamas eabbb121bb Moodle 2.0.2 release 2011-02-21 13:05:57 +01:00
Petr Skoda d20b9662fc emergency release 2011-02-18 20:01:50 +01:00
Eloy Lafuente (stronk7) 78106a24ad Merge branch 'em_MDL-25944_20_forummail' of git://github.com/skodak/moodle 2011-02-18 18:42:45 +01:00
Eloy Lafuente (stronk7) 395181f9bb Merge branch 'master' of git.moodle.org:/git/integration 2011-02-18 18:25:18 +01:00
Eloy Lafuente (stronk7) f5c452a3b3 Merge branch 'em_MDL-26476_20_grp' of git://github.com/skodak/moodle 2011-02-18 18:25:04 +01:00
Petr Skoda ed3eb9ea74 Merge branch 'PULL-314' of git://github.com/mudrd8mz/moodle 2011-02-18 18:20:44 +01:00
David Mudrak ed79b89b85 MDL-26010 Reformatting SQL of the previous Andrew's fix
I have reformatted the SQL according to the style used in Moodle code to
improve readability of the query. Added sql_compare_text() to the right
side of the comparison, even though the current callers provide integers
here (just in case).
2011-02-18 17:33:37 +01:00
Andrew Davis 42291c6161 MDL-26010 External blog synchronization removes non-relevant post records 2011-02-18 17:19:41 +01:00
Petr Skoda 18ff4d427e MDL-25944 fix broken images in forum emails and fix invalid $group variable name 2011-02-18 11:00:43 +01:00
Petr Skoda 12923c92b1 MDL-26476 fix incorrect fetching of user groups in modinfo 2011-02-17 18:19:41 +01:00
Eloy Lafuente (stronk7) 3b3e2cecf3 MDL-26361 scorm - fix upgrade on change to not null
Every time one column is changed from null to not null
we must ensure that there aren't nulls at all or the
DDL statement will fail, as was reported here. The
simplest way, just apply for the default when the column is null.
2011-02-17 17:25:44 +01:00
Petr Skoda 99faefb29b weekly release 2011-02-17 01:21:29 +01:00
Eloy Lafuente (stronk7) 2e629eb861 Merge branch 'w07_MDL-26452_20_resmess' of git://github.com/skodak/moodle 2011-02-16 21:51:12 +01:00
Petr Skoda f3a7f485c4 MDL-26452 fix resource mod regression breaking upgrade on Windows 2011-02-16 21:41:04 +01:00
Petr Skoda 3bc644ce70 Merge branch 'MDL-26405_take_two' of git://github.com/stronk7/moodle 2011-02-16 20:24:54 +01:00
Eloy Lafuente (stronk7) 0149e6c713 MDL-26405 restore - dispatch able to skip branches
after this change any restore_structure_step processor
method is able to instruct the dispatcher about to skip
any path below it. Until now, we were doing the checks on
each child processor method, but that was inneficient and
prone to errors (easy to miss the check in a child so some
orphaned piezes of restore may be causing mess here and there).
Once implemented, it's simlpy a matter of the parent deciding if
all its children must be processed or no. Easier for developers
and also small speed improvement because avoids unnecesary
dispatching/processing to happen.

Surely only will be used in parts of core, like in question_categories,
saving 50-60 sub processors (sub-paths) to be dispatched.
2011-02-16 19:13:56 +01:00
Petr Skoda c9e12de4e3 Merge branch 'MDL-26405_qtype_exception_wip' of git://github.com/stronk7/moodle 2011-02-16 09:59:14 +01:00
Aparup Banerjee 37695a6ff6 glossary MDL-22970 uid is reserved in ORACLE! changed to userid 2011-02-16 04:46:20 +01:00
Eloy Lafuente (stronk7) 0ff7159edb MDL-26405 restore - incorrectly thrown exception 2011-02-15 23:28:00 +01:00
Eloy Lafuente (stronk7) 534f22d141 Merge branch 'w07_MDL-26381_20_changepw' of git://github.com/skodak/moodle 2011-02-15 22:03:00 +01:00
Petr Skoda 7ea77a571f MDL-26381 prevent security warning when changing password and loginhttps is enabled 2011-02-15 21:54:29 +01:00
Eloy Lafuente (stronk7) c04c06dc8e Merge branch 'MDL-25616_recent_messages' of git://github.com/andyjdavis/moodle
Conflicts fixed:
	message/index.php
	message/lib.php
2011-02-15 19:26:21 +01:00
Eloy Lafuente (stronk7) 07e21f6054 Merge branch 'w07_MDL-26211_20_https' of git://github.com/skodak/moodle 2011-02-15 16:45:22 +01:00
Petr Skoda 2a9c0d0578 MDL-26211 improve detection of https from _SERVER 2011-02-15 15:33:29 +01:00
Petr Skoda d83bad412a MDL-26119 fixing regression caused by previous merge in PULL-294
We can not use empty() on function directly, the PHP docs were incorrect.
2011-02-15 15:06:24 +01:00
Eloy Lafuente (stronk7) da622b497b Merge branch 'w07_MDL-25778_20_defaultcity' of git://github.com/skodak/moodle 2011-02-15 12:40:43 +01:00
Eloy Lafuente (stronk7) 9aaa767c80 Merge branch 'w07_MDL-26351_20_instquotes' of git://github.com/skodak/moodle 2011-02-15 12:32:39 +01:00
Eloy Lafuente (stronk7) 418b3b6e98 MDL-26414 gloosary - fix wrong init introduced by MDL-26371 2011-02-15 10:53:23 +01:00
Petr Skoda 64529cb6d2 Merge branch 'MDL-26119_message_logging' of git://github.com/andyjdavis/moodle 2011-02-15 10:39:54 +01:00
jeromemoodle c73f196391 MDL-26179 implement the new 5 registration use cases 2011-02-15 10:24:32 +01:00
Petr Skoda 438e22cc50 MDL-26351 fix property and docs typo
Credit goes to David Mudrak.
2011-02-15 09:46:35 +01:00
Aparup Banerjee fb473042ae glossary MDL-22970 changed fieldname so that MSSQL does not complain about same fieldnames
something should be done about this in the driver
2011-02-15 09:33:25 +01:00
Petr Skoda 9449d0c5e8 MDL-25778 fix default country and city on user upload form and revert change in auth plugins
Auth plugins should have separate defaults from site defaults).
2011-02-15 09:13:33 +01:00
andyjdavis 3a00a167c6 message MDL-26119 fixed up the logged URL 2011-02-15 14:24:13 +08:00
andyjdavis bcab42daf2 message MDL-25616 adding recent conversations and recent notifications screens 2011-02-15 11:17:38 +08:00
Eloy Lafuente (stronk7) aabd2f0064 Merge branch 'w07_MDL-24125_20_admintreecache' of git://github.com/skodak/moodle 2011-02-15 01:38:12 +01:00
Eloy Lafuente (stronk7) b180a11998 Merge branch 'MDL-26236' of git://github.com/timhunt/moodle 2011-02-15 01:16:33 +01:00
Eloy Lafuente (stronk7) bcbb590227 Merge branch 'MDL-26365' of git://github.com/timhunt/moodle 2011-02-15 01:03:23 +01:00
Eloy Lafuente (stronk7) 46388c9cf9 Merge branch 'MDL-26369' of git://github.com/timhunt/moodle 2011-02-15 00:58:01 +01:00
Aparup Banerjee fe1776b9f2 MDL-22970 glossary - perf. improvements in recent activity 2011-02-15 00:33:13 +01:00
Eloy Lafuente (stronk7) 2623f6bef2 Merge branch 'w07_MDL-25778_20_defaultcity' of git://github.com/skodak/moodle 2011-02-14 23:24:52 +01:00
Petr Skoda 2453531f03 Merge branch 'MDL-26337' of git://github.com/timhunt/moodle 2011-02-14 22:15:30 +01:00
Petr Skoda 3fa0670a98 Merge branch 'MDL-26109' of git://github.com/nebgor/moodle 2011-02-14 22:10:37 +01:00
Petr Skoda 5d41c24d9f Merge branch 'MDL-26312-workshop-upgrade' of git://github.com/mudrd8mz/moodle 2011-02-14 21:45:57 +01:00
Petr Skoda 7a8fe6fa41 Merge branch 'MDL-25863_automated_backups_wip' of git://github.com/stronk7/moodle 2011-02-14 21:42:50 +01:00
David Mudrak 0c3c0de198 MDL-26312 Workshop: unset temporary arrays in upgrade code
Spotted by Petr Skoda during the code review.
2011-02-14 21:38:50 +01:00
Eloy Lafuente (stronk7) 8afbe44f7d MDL-25863 backup - fix removal of old automated backup, both in filearea and filesystem 2011-02-14 21:38:45 +01:00
Petr Skoda 9ceaf7b5a0 Merge branch 'm20_MDL-26212_resizefix' of git://github.com/danmarsden/moodle 2011-02-14 21:37:37 +01:00
Eloy Lafuente (stronk7) 02cf691951 MDL-25863 backup - take rid of dupe code for filename calculations 2011-02-14 21:36:27 +01:00
Petr Skoda cbbc272542 Merge branch 'MDL-26371_distinct_text' of git://github.com/stronk7/moodle 2011-02-14 21:19:35 +01:00
Petr Skoda 251e5a8b62 Merge branch 'MDL-22146_backup_course_format_wip' of git://github.com/stronk7/moodle 2011-02-14 21:08:19 +01:00
Petr Skoda 995b6ff605 Merge branch 'MDL-26229_restore_attempts_wip' of git://github.com/stronk7/moodle 2011-02-14 21:02:49 +01:00
Petr Skoda e027bfcfaa Merge branch 'MDL-24898_strip_and_trunc_subjects_wip' of git://github.com/stronk7/moodle 2011-02-14 20:57:13 +01:00
Petr Skoda a60a943696 Merge branch 'MDL-25553_lesson_jumpto_wip' of git://github.com/stronk7/moodle 2011-02-14 20:39:31 +01:00
Petr Skoda 47a13ff99a Merge branch 'MDL-25612_rss_block' of git://github.com/stronk7/moodle 2011-02-14 20:37:28 +01:00
Petr Skoda d2592c9b54 Merge branch 'MDL-26399_oracle_restore_wip' of git://github.com/stronk7/moodle 2011-02-14 20:34:58 +01:00
Eloy Lafuente (stronk7) 15ffec3698 Merge branch 'w07_MDL-25626_20_completionerror' of git://github.com/skodak/moodle 2011-02-14 20:15:37 +01:00
Petr Skoda fa7f750c60 MDL-25778 add defaultcity option
This is based on patch by Jonathan Harker.
2011-02-14 20:10:50 +01:00
Eloy Lafuente (stronk7) 89bf60cdbc Merge branch 'MDL-26338' of git://github.com/timhunt/moodle 2011-02-14 19:57:38 +01:00
Eloy Lafuente (stronk7) d84fe4c8a6 MDL-26399 restore - fix oracle/mssql problems 2011-02-14 19:42:57 +01:00
Petr Skoda 2e98a7475a MDL-25626 fix previous incorrect fix incorrect cm id in completion report 2011-02-14 19:41:05 +01:00
Eloy Lafuente (stronk7) 1ae279b448 Merge branch 'MDL-26356' of git://github.com/ppichet/moodle 2011-02-14 18:29:46 +01:00
Eloy Lafuente (stronk7) 68e05ea6e6 Merge branch 'MDL-26332' of git://github.com/timhunt/moodle 2011-02-14 18:26:33 +01:00
Eloy Lafuente (stronk7) 69c53045ba Merge branch 'mdl-26299' of git://github.com/mackensen/moodle 2011-02-14 18:23:56 +01:00
Eloy Lafuente (stronk7) 396dca7cb9 Partially merge w07_MDL-25575_20_contexttrouble. See PULL-299 2011-02-14 17:58:21 +01:00
Petr Skoda cde44edc7a MDL_24125 admin tree fast category lookup 2011-02-14 17:47:43 +01:00
Eloy Lafuente (stronk7) 7d87147203 Merge branch 'w07_MDL-26142_20_immediatelly' of git://github.com/skodak/moodle 2011-02-14 17:38:22 +01:00
Eloy Lafuente (stronk7) 0dd8cb88e9 Merge branch 'w07_MDL-23939_20_completeuser' of git://github.com/skodak/moodle 2011-02-14 17:10:29 +01:00
Eloy Lafuente (stronk7) 76b7e2d1d6 Merge branch 'w07_MDL-26389_20_profile' of git://github.com/skodak/moodle 2011-02-14 15:58:26 +01:00
Petr Skoda 81b58cc227 MDL-26389 improve profile and search engine privacy 2011-02-14 15:42:26 +01:00
Eloy Lafuente (stronk7) 4acc624d62 Merge branch 'w07_MDL-26131_20_collapsible' of git://github.com/skodak/moodle 2011-02-14 15:06:28 +01:00
Eloy Lafuente (stronk7) f0e28c7e67 Merge branch 'w07_MDL-26223_20_calblock' of git://github.com/skodak/moodle 2011-02-14 14:38:02 +01:00
Eloy Lafuente (stronk7) a49d8aa25a Merge branch 'w07_MDL-25974_20_switchhidden' of git://github.com/skodak/moodle 2011-02-14 14:23:05 +01:00
Eloy Lafuente (stronk7) 0db846acda Merge branch 'w07_MDL-25998_20_enrolrole' of git://github.com/skodak/moodle 2011-02-14 12:41:16 +01:00
Eloy Lafuente (stronk7) d2a201c83b Merge branch 'w07_MDL-26314_20_initcall' of git://github.com/skodak/moodle 2011-02-14 12:35:18 +01:00
Eloy Lafuente (stronk7) 222a500b31 Merge branch 'w07_MDL-26383_20_blogupg' of git://github.com/skodak/moodle 2011-02-14 12:31:50 +01:00
David Mudrak f593111b67 MDL-26312 Workshop: data integrity check to detect eventual course_modules corruption
Because of a bug in Workshop upgrade code, multiple workshop course_modules can
potentially point to a single workshop instance. The chance is pretty low as in most cases,
the upgrade failed. But under certain circumstances, workshop could be upgraded with
this data integrity issue. We want to detect it now and let the admin know.
2011-02-14 10:11:42 +01:00
Petr Skoda a8759c65e4 Merge branch 'AMOS-install-strings' of git://github.com/mudrd8mz/moodle 2011-02-14 09:52:28 +01:00
Petr Skoda db30cfca84 MDL-25215 fix file.JPG.jpg extension problems 2011-02-14 09:50:07 +01:00
Petr Skoda 419814db02 Merge branch 'm20_MDL-25215_filepicker_saveas' of git://github.com/dongsheng/moodle 2011-02-14 09:43:06 +01:00
AMOS bot 0ef1f80e3b Automatic installer lang files (20110214) 2011-02-14 09:36:04 +01:00
Petr Skoda cbe4cbc268 Merge branch 'MDL-26353-database-import-help' of git://github.com/mudrd8mz/moodle 2011-02-14 09:20:53 +01:00
Petr Skoda 3c5b312b8d Merge branch 'MDL-25991_actionnav' of github.com:skodak/moodle 2011-02-14 08:57:58 +01:00
Dan Marsden 71550f6fa1 MDL-26212 - fix scorm player size on resize of browser window - bump scorm version as JS is changed. Kudos to Piers for patch 2011-02-14 14:50:43 +13:00
Eloy Lafuente (stronk7) 478d281815 Merge branch 'w07_MDL-26153_20_yuicombo' of git://github.com/skodak/moodle 2011-02-14 02:10:11 +01:00
Eloy Lafuente (stronk7) 102cb3c1a6 Merge branch 'w07_MDL-26294_20_byteserving' of git://github.com/skodak/moodle 2011-02-14 02:08:06 +01:00
Eloy Lafuente (stronk7) 0e9fe664b6 Merge branch 'w07_MDL-26307_20_dbport' of git://github.com/skodak/moodle 2011-02-14 02:00:19 +01:00
Eloy Lafuente (stronk7) 64c74b8f7b Merge branch 'w07_MDL-25626_20_completionerror' of git://github.com/skodak/moodle 2011-02-14 01:53:45 +01:00
Eloy Lafuente (stronk7) 264184625d Merge branch 'w07_MDL-26355_20_installsize' of git://github.com/skodak/moodle 2011-02-14 01:50:55 +01:00
Eloy Lafuente (stronk7) 378906a273 Merge branch 'MDL-26274_rating_delete' of git://github.com/andyjdavis/moodle 2011-02-14 01:48:03 +01:00
Eloy Lafuente (stronk7) 2e6bd88f3b Merge branch 'w07_MDL-26376_20_shib' of git://github.com/skodak/moodle 2011-02-14 01:44:08 +01:00
Eloy Lafuente (stronk7) 42bdecde6d Merge branch 'w07_MDL-26380_20_mediafilterperf' of git://github.com/skodak/moodle 2011-02-14 01:41:19 +01:00
Eloy Lafuente (stronk7) 64ff7d5c14 Merge branch 'w07_MDL-26351_20_instquotes' of git://github.com/skodak/moodle 2011-02-14 01:25:44 +01:00
Eloy Lafuente (stronk7) 345f4176dc Merge branch 'w07_MDL-26030_20_mediafilter' of git://github.com/skodak/moodle 2011-02-14 01:09:07 +01:00
Eloy Lafuente (stronk7) c87a7e44e8 Merge branch 'w07_MDL-26379_20_minify' of git://github.com/skodak/moodle 2011-02-14 00:56:02 +01:00
Eloy Lafuente (stronk7) c0d0dd4a5a Merge branch 'w07_MDL-26352_20_metacourse' of git://github.com/skodak/moodle 2011-02-14 00:52:09 +01:00
Eloy Lafuente (stronk7) 798e6fcba2 Merge branch 'w07_MDL-26271_20_forumsearch' of git://github.com/skodak/moodle 2011-02-14 00:38:21 +01:00
Eloy Lafuente (stronk7) b60f77ca29 Merge branch 'w07_MDL-26322_20_wantsurl' of git://github.com/skodak/moodle 2011-02-14 00:19:08 +01:00
Eloy Lafuente (stronk7) a537e50725 MDL-24898 external blogs - strip html and truncate subject 2011-02-13 23:03:55 +01:00
Petr Skoda 28765cfcb5 MDL-25575 fix broken block support in get_courseid_from_context() 2011-02-13 18:59:53 +01:00
Petr Skoda 9c14c1c55b MDL-26223 prevent getting content of hidden blocks in edit mode 2011-02-13 18:14:55 +01:00
Petr Skoda 3b073254bc MDL-26314 fix phpdocs typo 2011-02-13 17:44:01 +01:00
Petr Skoda 44303ca67a MDL-25974 fix access to activities when role switched in hidden course and some coding style strict comparison fixes
The problem with strict comparison of numerical values fails badly if one is int and the other is string, moodle core apis do not guarantee return types much.
2011-02-13 16:17:47 +01:00
Petr Skoda d07f2def92 MDL-25998 fix default manual enrol role 2011-02-13 13:58:18 +01:00
Petr Skoda ad9ab4dfe5 MDL-26131 fix several collapsible_region issues
1/ the $default was not passed from print_collapsible_region()
2/ incorrect php docs describing $userpref
3/ missing empty() check on $userpref
2011-02-13 11:52:09 +01:00
Petr Skoda 743fff98dc MDL-26142 fix immediately spelling in strings, comments and code 2011-02-13 11:36:46 +01:00
Petr Skoda ae3a794781 MDL-26355 increase size of installer forms fields 2011-02-13 10:52:28 +01:00
Petr Skoda b3929ae981 MDL-26383 add missing bloglevelupgrade admin section 2011-02-13 10:22:19 +01:00
Petr Skoda 4f97de7624 MDL-23939 do not load groups and profile for guest user because they can not have both 2011-02-12 23:22:22 +01:00
Petr Skoda cc10c0b979 MDL-23939 minor course_display coding style improvements and inline docs 2011-02-12 23:06:11 +01:00
Aparup Banerjee 13801a49a2 MDL-23939 lazy load course_display with new course_get_display()
This change speeds up user login and makes the session smaller.
2011-02-12 22:45:17 +01:00
Petr Skoda 6e6034e550 MDL-26153 fix yui combo loading for images with numbers in file name 2011-02-12 21:56:03 +01:00
Petr Skoda dd3b7e7dfc MDL-26294 fix byteserving regression
Credit goes to James Mitchell.
2011-02-12 20:39:53 +01:00
Eloy Lafuente (stronk7) 3612c3be4a MDL-25612 sql - make rss_client block cross-db 2011-02-12 20:38:03 +01:00
Petr Skoda 9e9543e54b MDL-26307 fix dbport and dbsocket support when creating mysql database 2011-02-12 20:08:49 +01:00
Petr Skoda a2ee26bf3e MDL-26030 more mediaplugin fixes
Improved youtube id parsing, fixed url quoting and fixed unittests.
2011-02-12 19:47:52 +01:00
Petr Skoda b69f9a08d9 MDL-25626 fix incorrect cm id in completion report
credit goes to Aaron Barnes
2011-02-12 17:35:41 +01:00
Eloy Lafuente (stronk7) e07c51c481 MDL-26371 sql - avoid distinct + text in lesson essay & report 2011-02-12 17:34:03 +01:00
Eloy Lafuente (stronk7) b37d06c2ed MDL-26371 sql - avoid distinct + text in glossary search 2011-02-12 17:05:32 +01:00
Petr Skoda cd138b26f1 MDL-26376 fix incorrect Shibboleth string and undefined property during first config saving 2011-02-12 17:00:36 +01:00
Petr Skoda e68789c559 MDL-26380 improve perf of mediaplugin filter if no links found in text 2011-02-12 16:48:32 +01:00
Petr Skoda a2d242bc09 MDL-26351 add support for postgresql running with standard_conforming_strings 2011-02-12 16:16:52 +01:00
Eloy Lafuente (stronk7) f320cb76c3 MDL-26371 sql - avoid distinct + text in db enrol 2011-02-12 15:46:44 +01:00
Rossiani Wijaya 3f5192c088 MDL-26030 update filter regex and create unittest for filter mediaplugin 2011-02-12 12:23:04 +01:00
Petr Skoda ed7f5ee27c MDL-26379 remove unused readme 2011-02-12 11:11:44 +01:00
Petr Skoda 1d29fc9e5d MDL-26379 disable Minify URI builder and allow only execution of Minify from Moodle codebase 2011-02-12 11:11:22 +01:00
Petr Skoda d21feffdd7 MDL-26352 ignore invalid course_meta entries during upgrade
This fixes upgrade problems when course_meta points to deleted course or somebody hacked the table contents manually.
2011-02-12 10:27:43 +01:00
Petr Skoda b1d5d0155b MDL-26271 fix borked sql parameters in forum_search_posts and add missing modinfo field
This is the perfect example why there must not be duplicate parameter names in SQL queries.
2011-02-12 10:11:27 +01:00
Petr Skoda 9337cf32ca MDL-26329 fix incorrect draft url rewriting when slasharguments off
tinymce editor encodes '/' in the ?file= parameter, we have to decode %2F before doing our standard @@PLUGINFILE@@ processing.
2011-02-12 09:43:14 +01:00
Eloy Lafuente (stronk7) bd9e662953 MDL-25553 lesson restore - add missing jumpto remapping. Credit goes to Mike Churchward 2011-02-12 04:02:10 +01:00
Eloy Lafuente (stronk7) 7cff4927be MDL-26229 backup & restore - fix quiz & lesson conflicts 2011-02-12 03:03:26 +01:00
Eloy Lafuente (stronk7) 945962a45d MDL-26229 restore - prevent tag-conflicting structures to be created 2011-02-12 02:40:38 +01:00
Eloy Lafuente (stronk7) 5539e69862 MDL-26229 restore - parser improvements (repetitions and skipped tags) 2011-02-12 02:19:02 +01:00
David Mudrak dd8ab1fb4a MDL-26353 Database activity module: display help icon with the new help strings
This commit makes the new strings added by Helen used at the Import
entries page. Note that the syntax of the strings had to be fixed as
there must not be leading whitespace before the asterisk in Markdown format.

Also as requested by Helen, the wording or export/import links is
improved now.

As a bonus for free, the patch fixes incorrect API usage of get_record()
and friends.
2011-02-12 00:02:20 +01:00
Helen Foster 76179aac08 MDL-26353 Database activity module new help string 2011-02-11 23:09:02 +01:00
Tim Hunt 2e5ce83f11 MDL-26369 fix notice caused by the fix for MDL-26098. 2011-02-11 14:15:43 +00:00
Petr Skoda b792a64ab2 MDL-26322 always allow https in login local redirection test
This fixes problems for sites that use loginhtts where the redirection after login did not work for pages that require https such as the forgotten passowrds page.
2011-02-11 11:24:30 +01:00
Tim Hunt 5ec3e4a8eb MDL-26365 New GIFT unit test. 2011-02-11 10:15:26 +00:00
Petr Skoda d480b970b7 MDL-25991 add icon when action_link used in navigation
Alos removing old TODO.
2011-02-11 10:01:06 +01:00
Sam Hemelryk 625943586b navigation MDL-25991 Fixed reference to output in core_renderer 2011-02-11 16:26:20 +08:00
andyjdavis 66cb20f6c0 rating MDL-26274 made rating_ajax.php use the current scale rather than the scale from the users previously submitted rating 2011-02-11 15:15:49 +08:00
David Mudrak d0fb170520 MDL-26312 Workshop: fixed upgrade of module instances from 1.9 to 2.0
The patch changes workshop_upgrade_module_instances() so that it
processes old workshop records ordered by their id and it keeps the
instances id by using import_record() instead of insert_record().
Thanks to this, there is no mapping of workshop ids needed so the
function workshop_upgrade_workshop_id_mappings() is dropped and all
callers use plain workshop record.
2011-02-11 07:43:04 +01:00
ppichet ff6b824e6d MDL-26356:Correcting the texts of Numerical Units grading select element
Signed-off-by: ppichet <pichet.pierre@uqam.ca>
2011-02-10 23:50:30 -05:00
Aparup Banerjee dde36f9d65 blocks MDL-26109 adding docking option to empty blocks as well. 2011-02-11 12:36:19 +08:00
Eloy Lafuente (stronk7) a90659d6ba DL-22146 backup & restore - course formats remaining hooks 2011-02-11 00:07:32 +01:00
Tim Hunt c991ecb49d MDL-26236 random essay questions do not work due to bad regex.
Essays can have multi-line answers that start with a newline, which breaks the regex here.
2011-02-10 23:06:22 +00:00
Eloy Lafuente (stronk7) e5169d5229 MDL-22146 backup & restore - copy/paste fix 2011-02-10 15:36:03 +01:00
Eloy Lafuente (stronk7) 4ab111b9bf MDL-22146 backup & restore - extending the backup plugins API 2011-02-10 12:14:00 +01:00
Eloy Lafuente (stronk7) 1e37c39180 MDL-22146 backup & restore - extending the restore plugins API 2011-02-10 11:34:41 +01:00
Eloy Lafuente (stronk7) 4fda584f28 MDL-22146 backup & restore - course formats first cut 2011-02-10 10:37:36 +01:00
Dongsheng Cai 7d2882c476 MDL-25215, file extension should remain unchanged when using save as field in filepicker UI 2011-02-10 09:40:09 +08:00
Tim Hunt dc3826eed7 MDL-26338 fix mixed types in quiz reports SQL. This was breaking Oracle 2011-02-09 20:48:21 +00:00
Tim Hunt 8711360225 MDL-26337 Improve close_window. Fix bug when $reloadopener is false, and better usability when it is true. 2011-02-09 19:02:31 +00:00
Eloy Lafuente (stronk7) d911c72bf9 MDL-26333 dml - fix test (AS not in tables/views) 2011-02-09 18:21:37 +01:00
Eloy Lafuente (stronk7) f30a13ab2b MDL-26333 ddl - better/safer temp column names 2011-02-09 17:36:57 +01:00
Tim Hunt b729648032 MDL-26332 cannot type Enter into a textarea in a quiz.
This was breaking the essay question type.
2011-02-09 14:52:30 +00:00
Petr Skoda f7d843d167 weekly release 2011-02-09 12:26:58 +01:00
Sam Hemelryk ada93b58fb Revert "message MDL-26119 now logs when a user sends a message" because the log URL generated is incorrect
This reverts commit 88c9987e89.
2011-02-09 16:25:39 +08:00
Eloy Lafuente (stronk7) cd03ecce8e Merge branch 'MDL-24870_rss_error' of git://github.com/andyjdavis/moodle 2011-02-08 10:21:55 +01:00
Eloy Lafuente (stronk7) 2f564be4e5 Merge branch 'MDL-24355_20_tagcorrelations_rev1' of git://github.com/samhemelryk/moodle 2011-02-08 00:11:40 +01:00
Petr Skoda 4478743ca4 MDL-26265 use cm_info in PAGE->cm because it has more useful information; add context property to cm_info 2011-02-07 23:11:43 +01:00
Petr Skoda f2f45270ee Merge branch 'MDL-26267' of git://github.com/samhemelryk/moodle 2011-02-07 23:07:16 +01:00
Petr Skoda 81c29ae06d Merge branch 'MDL-26266' of git://github.com/samhemelryk/moodle 2011-02-07 23:05:08 +01:00
Eloy Lafuente (stronk7) 9ac8ff207c dml-sqlsrv MDL-26025 whitespace fix 2011-02-07 22:33:26 +01:00
Eloy Lafuente (stronk7) 9597afb572 Merge branch 'MDL-26025' of git://github.com/samhemelryk/moodle 2011-02-07 22:26:33 +01:00
Eloy Lafuente (stronk7) 5df4947cb8 Merge branch 'w06_MDL-26234_20_customfields' of git://github.com/skodak/moodle 2011-02-07 22:21:21 +01:00
Eloy Lafuente (stronk7) 9beb04e1d5 Merge branch 'w06_MDL-26290_20_mysqlport' of git://github.com/skodak/moodle 2011-02-07 21:56:07 +01:00
Petr Skoda c055cebfbb Merge branch 'MDL-25780' of git://git.luns.net.uk/moodle 2011-02-07 21:49:32 +01:00
Eloy Lafuente (stronk7) e32d5f9b88 Merge branch 'w06_MDL-26256_20_collator' of git://github.com/skodak/moodle 2011-02-07 21:41:04 +01:00
Petr Skoda 476b123a72 Merge branch 'm20_MDL-25468_coding_error' of git://github.com/dongsheng/moodle 2011-02-07 21:37:16 +01:00
Petr Skoda 8c4a6a4fe8 Merge branch 'MDL-21250-capitalized-strings' of git://github.com/mudrd8mz/moodle 2011-02-07 21:31:35 +01:00
Petr Skoda a052bf8ba0 Merge branch 'AMOS-install-strings' of git://github.com/mudrd8mz/moodle 2011-02-07 21:28:20 +01:00
Eloy Lafuente (stronk7) 8fc84ff1c1 Merge branch 'w06_MDL-26219_20_upgradelog' of git://github.com/skodak/moodle 2011-02-07 20:22:29 +01:00
Petr Skoda bb8b29715a MDL-26219 fix borked upgrade logging and add new fileversion column 2011-02-07 20:00:20 +01:00
Charles Fulton 7038944105 MDL-26299: missing break causes incorrect value for unitrole 2011-02-07 09:53:31 -08:00
Helen Foster 72d484ddb6 MDL-21250 capital letters removal 2011-02-07 15:55:18 +01:00
Eloy Lafuente (stronk7) 20ba9a2e47 Merge branch 'MDL-17357-duplicate-strings' of git://github.com/mudrd8mz/moodle 2011-02-07 15:53:15 +01:00
David Mudrak d5b7f35d65 MDL-17357 Removed duplicate string definitions 2011-02-07 15:08:07 +01:00
Sam Hemelryk 0032523aed Merge branch 'PULL-226-workshop' of git://github.com/mudrd8mz/moodle 2011-02-07 17:58:12 +08:00
David Mudrak 32ea207a48 MDL-26298 Workshop: fixed trivial typos in phpDoc blocks 2011-02-07 10:49:34 +01:00
David Mudrak d239b952a5 MDL-26296 Workshop: trivial change in manual allocator CSS
When only two rows of the allocations table are displayed with the new
allocation highlighted, it is better not highlight the odd row.
2011-02-07 10:49:30 +01:00
Sam Hemelryk 6ae16d7fff Merge branch 'w06_MDL-26262_20_onlineblock' of git://github.com/skodak/moodle 2011-02-07 16:31:38 +08:00
AMOS bot a4f9369548 Automatic installer lang files (20110207) 2011-02-07 09:27:45 +01:00
Dongsheng Cai 100e0d4989 NAVIGATION MDL-25468 remove optional_param from navigationlib.php, use override_active_url to help find the correct node 2011-02-07 16:25:58 +08:00
Sam Hemelryk 9cb70adc33 Merge branch 'w06_MDL-26238_20_group' of git://github.com/skodak/moodle 2011-02-07 16:20:02 +08:00
Sam Hemelryk 9377348eb0 Merge branch 'w06_MDL-26221_20_courserole' of git://github.com/skodak/moodle 2011-02-07 16:11:50 +08:00
Sam Hemelryk dedda4abc3 Merge branch 'MDL-26272' of git://github.com/stronk7/moodle 2011-02-07 16:03:27 +08:00
Sam Hemelryk c1a974983a Merge branch 'MDL-26245-typo_in_exception_string' of git://github.com/mudrd8mz/moodle 2011-02-07 15:41:26 +08:00
Sam Hemelryk 82bbf32d3c Merge branch 'MDL-26252-import-groups-help' of git://github.com/mudrd8mz/moodle 2011-02-07 15:32:23 +08:00
Sam Hemelryk d44327efd9 Merge branch 'MDL-26119_message_logging' of git://github.com/andyjdavis/moodle 2011-02-07 15:16:40 +08:00
Sam Hemelryk 89652edd6c Merge branch 'MDL-26242' of git://github.com/timhunt/moodle 2011-02-07 15:13:53 +08:00
Sam Hemelryk 449adacbc3 Merge branch 'MDL-25639' of git://git.luns.net.uk/moodle 2011-02-07 14:21:24 +08:00
Sam Hemelryk 1ca95a13f3 Merge branch 'MDL-25874' of git://git.luns.net.uk/moodle 2011-02-07 14:01:00 +08:00
Sam Hemelryk e8d6d24729 Merge branch 'm20_MDL-25671_data_template_editor' of git://github.com/dongsheng/moodle 2011-02-07 13:50:36 +08:00
Sam Hemelryk ed4801f4f0 Merge branch 'MDL-25939' 2011-02-07 13:40:51 +08:00
Sam Hemelryk e896935574 MDL-25939 Fixed whitespace issues in the splash theme 2011-02-07 13:40:43 +08:00
Sam Hemelryk 2addb4ba1b mod-workshop MDL-26267 workshop_extend_navigation argument 4 is now always going to be a cm_info object 2011-02-07 13:20:09 +08:00
Sam Hemelryk f0dcc21259 navigation MDL-26266 Refactored code to ensure when loading activities is a cm_info object 2011-02-07 12:16:13 +08:00
Sam Hemelryk 046ff94ec8 dml-sqlsrv MDL-26025 Fixed up typo in simpletests and added a couple more tests 2011-02-07 11:23:30 +08:00
Sam Hemelryk fe1dd7ebde dml-sqlsrv MDL-26025 Removed use of property to track rownumber field in favor of always unsetting it 2011-02-07 10:46:50 +08:00
Sam Hemelryk 7e1bd89d32 sqlsrv MDL-26025 Fixed up numerous issues with the limit_to_top_n function 2011-02-07 10:33:49 +08:00
Petr Skoda 0b661c7d52 MDL-26256 detect missing collator support and use workaround instead 2011-02-06 22:27:25 +01:00
Petr Skoda 8c4b142cb2 MDL-26290 add experimental windows mysqli named pipe support 2011-02-06 22:11:28 +01:00
Petr Skoda 801dea0605 MDL-26262 fix online users block error on non-course pages 2011-02-06 22:04:44 +01:00
Petr Skoda 77f9f23b0f MDL-26290 make sure ini_get('mysqli.default_port') returns number 2011-02-06 21:21:23 +01:00
Petr Skoda bb98eea114 MDL-26234 fix fatal user upload error when custom text area field present
Please note this does not fix problems with the actual upload of custon text area fields.
2011-02-06 20:57:21 +01:00
Charles Fulton 9250bf8172 MDL-26238 remove deprecated second parameter from groups_get_group() calls 2011-02-06 18:15:36 +01:00
Petr Skoda 8f0eb9fd7a MDL-26221 add missing course/lib.php include when using make_categories_list() 2011-02-06 17:58:47 +01:00
Eloy Lafuente (stronk7) 195a0848ec MDL-26272 ratings - fix uses breaking after last modinfo changes 2011-02-04 17:30:51 +01:00
David Mudrak 51abc39695 MDL-26188 Workshop: get rid of a method that is not used anyway
The protected method get_allocations_recordset() is a relict from
earlier development phases of Workshop module. Removing it as it
confuses recent Eloy's recordset usage detection tool.
2011-02-04 14:33:48 +01:00
David Mudrak f672d6a0f5 Fixed import groups page layout and navigation
While working on MDL-26252, I realized that group/import.php page had
issues with layout. Side blocks were missing and the breadcrumb navigation
broken (leading to a non-existing script and having the link to the
current course duplicated).

This patch sets the standard layout for the page so that block are
displayed, fixes the page position in the navigation tree and the
breadcrumb navigation.
2011-02-04 10:45:30 +01:00
David Mudrak b74ceb3ff5 MDL-26252 Added help icon at import groups page
AMOS BEGIN
 MOV [importgroups,core],[importgroups,core_group]
AMOS END
2011-02-04 10:45:30 +01:00
David Mudrak 73f99ca18f MDL-26245 Fixed typo in dbtransfer exception string 2011-02-04 10:45:21 +01:00
Petr Skoda 54b7b5993f emergency weekly release
fixes fatal error in mod/workshop and other places caused by missing backwards compatibility with old cminfo stdClass
2011-02-04 09:31:15 +01:00
Sam Hemelryk 1e4cb18940 lib-modinfolib MDL-26264 cm_info and course_modinfo classes both now extend stdClass 2011-02-04 16:22:57 +08:00
andyjdavis 3ad3f24808 rss MDL-24870 fixed the capability checks to access module rss feeds 2011-02-04 10:27:52 +08:00
andyjdavis d95a02faa9 rss MDL-24870 latest news block was supplying the wrong context ID when creating its RSS feed link 2011-02-03 15:24:27 +08:00
andyjdavis 88c9987e89 message MDL-26119 now logs when a user sends a message 2011-02-03 13:37:01 +08:00
Sam Hemelryk 78defd5c64 tags MDL-24355 Improved computation of tag correlations. Thanks Jonathan Robson for the 1.9 patch. 2011-02-03 10:06:25 +08:00
Tim Hunt 5f11e00db1 MDL-26242 quiz reports. No students in course => get_in_or_equal doesn't like empty arrays error 2011-02-02 16:40:14 +00:00
Dongsheng Cai 08a7fbb027 mod-data MDL-25671 disable editor in data list template editor will not save the changes 2011-02-02 22:17:15 +08:00
Petr Skoda eef3578af0 weekly release 2011-02-02 14:10:02 +01:00
Petr Skoda 260d857de3 MDL-25834 revert unresolved PULL-174 2011-02-02 14:03:44 +01:00
Petr Skoda e27b5b6b29 Merge branch 'MDL-26237' of git://github.com/stronk7/moodle 2011-02-02 13:49:16 +01:00
Eloy Lafuente (stronk7) bd654f0ced MDL-26237 code coverage - prevent execution of not used stuff 2011-02-02 11:21:01 +01:00
Petr Skoda 5a6094137d MDL-25942 fix another Oracle compatibility issue 2011-02-02 09:59:56 +01:00
Dan Marsden db1f94ce4e MDL-26201 fix Lang - Thanks Petr 2011-02-02 09:23:24 +01:00
Petr Skoda ffcb837973 MDL-26177 compare 255 chars when checking custom field uniqueness 2011-02-02 09:15:42 +01:00
Sam Hemelryk 78f0f64d47 blog MDL-25981 PULL-162 Removed typehinting in blog after changed from stdClass to cm_info 2011-02-02 10:37:33 +08:00
Petr Skoda af0a06cb5a MDL-26177 fix non-working unique custom field check 2011-02-01 14:34:31 +01:00
Eloy Lafuente (stronk7) 909d2b8f63 MDL-25791 quiz - bump version 2011-02-01 09:37:36 +01:00
Eloy Lafuente (stronk7) 278de0eb52 Merge branch 'MDL-25791_20_quizdb_rev1' of git://github.com/samhemelryk/moodle 2011-02-01 09:35:49 +01:00
Sam Hemelryk 16da818528 mod-quiz MDL-25791 Fixed database discrepancies between a fresh install and an upgraded site within the Quiz module 2011-02-01 12:54:16 +08:00
Eloy Lafuente (stronk7) 12fc00c951 Merge branch 'm20_MDL-25501_wiki_upgrade_improvement' of git://github.com/dongsheng/moodle 2011-02-01 01:53:47 +01:00
Petr Skoda 46df3c6059 Merge branch 'MDL-25981' 2011-01-31 22:44:17 +01:00
Petr Skoda 4714815123 MDL-25981 fix inverted instanceof in require_login 2011-01-31 22:35:17 +01:00
Petr Skoda d6f4508c36 MDL-25981 add missing global DB when fetching course modinfo 2011-01-31 22:23:34 +01:00
Petr Skoda d4fb0e26e2 MDL-25981 make sure cm is defined 2011-01-31 22:19:36 +01:00
Eloy Lafuente (stronk7) eb183178c8 Merge branch 'w05_MDL-26034_20_myprofile' of git://github.com/skodak/moodle 2011-01-31 20:10:27 +01:00
Petr Skoda b6f3e4f8f0 Merge branch 'MDL-26098' of git://github.com/timhunt/moodle 2011-01-31 19:25:41 +01:00
Eloy Lafuente (stronk7) 9de8515b2e MDL-26201 scorm & js - CSS changes => version bump 2011-01-31 19:23:31 +01:00
Eloy Lafuente (stronk7) 8e1ad9c60f Merge branch 'm20_MDL-26201_forcejs' of git://github.com/danmarsden/moodle 2011-01-31 19:14:55 +01:00
Eloy Lafuente (stronk7) 9f58e26db6 Merge branch 'w05_MDL-26046_20_noemailever' of git://github.com/skodak/moodle 2011-01-31 18:02:02 +01:00
Eloy Lafuente (stronk7) e030faee3e Take out debugging & merge branch 'w05_MDL-26198_20_completion' of git://github.com/skodak/moodle 2011-01-31 17:43:22 +01:00
Eloy Lafuente (stronk7) 45289c3e79 Merge branch 'w05_MDL-26196_20_tags' of git://github.com/skodak/moodle 2011-01-31 17:17:48 +01:00
Eloy Lafuente (stronk7) b6a0ec4238 Merge branch 'w05_MDL-26140_20_experimental' of git://github.com/skodak/moodle 2011-01-31 16:17:13 +01:00
Eloy Lafuente (stronk7) d98c661428 Merge branch 'w05_MDL-26104_20_blockconflick' of git://github.com/skodak/moodle 2011-01-31 16:02:51 +01:00
Eloy Lafuente (stronk7) 133a9b738e Merge branch 'w05_MDL-25921_20_tablemissing' of git://github.com/skodak/moodle 2011-01-31 16:01:02 +01:00
Eloy Lafuente (stronk7) e89a57dc10 Fixed conflicts & merge branch 'MDL-17201_index' of git://github.com/andyjdavis/moodle 2011-01-31 15:34:40 +01:00
Eloy Lafuente (stronk7) 9700d6835d Merge branch 'w05_MDL-26172_20_groupupgrade' of git://github.com/skodak/moodle 2011-01-31 15:17:33 +01:00
Eloy Lafuente (stronk7) 7164db694c Merge branch 'w05_MDL-26189_20_imse' of git://github.com/skodak/moodle 2011-01-31 14:57:22 +01:00
Petr Skoda 57d51199b7 Merge branch 'AMOS-install-strings' of git://github.com/mudrd8mz/moodle 2011-01-31 14:26:03 +01:00
Petr Skoda 8afc38bd39 Merge branch 'MDL-25708' of git://github.com/stronk7/moodle 2011-01-31 14:21:53 +01:00
stabijoh 6290dddd35 MDL-25939-2 Updated fix for Splah theme blog labels 2011-01-31 07:23:49 -05:00
Petr Skoda 6fde0dac70 MDL-26189 protect imsenterprise enrol file 2011-01-31 13:22:55 +01:00
Eloy Lafuente (stronk7) 43bbf28849 Merge branch 'w05_MDL-26182_20_nginx' of git://github.com/skodak/moodle 2011-01-31 12:33:16 +01:00
Sam Hemelryk 2b1f6ced64 Merge branch 'MDL-26178' of git://github.com/timhunt/moodle 2011-01-31 17:47:30 +08:00
Dan Marsden 334d8b94f5 SCORM MDL-25850 - check for viewscores cap before adding score to toc 2011-01-31 17:38:01 +08:00
Sam Hemelryk 1f5a33439e Merge branch 'm20_MDL-26176_cleanup' of github.com:danmarsden/moodle 2011-01-31 17:16:56 +08:00
Sam Hemelryk dfc05681f2 Merge branch 'm20_MDL-25781_TOC_fix' of git://github.com/danmarsden/moodle 2011-01-31 17:06:53 +08:00
Petr Skoda cb3c4b448e Merge branch 'MDL-25942' of git://github.com/stronk7/moodle 2011-01-31 09:38:51 +01:00
Petr Skoda bee34e2b6d Merge branch 'MDL-26177' of git://github.com/timhunt/moodle 2011-01-31 09:36:15 +01:00
Sam Hemelryk d44d6448db Merge branch 'w05_MDL-26069_20_filecheck' of git://github.com/skodak/moodle 2011-01-31 16:28:28 +08:00
Petr Skoda a84299fee5 Merge branch 'm20_MDL-25895_repository_ajax' of git://github.com/dongsheng/moodle 2011-01-31 09:06:31 +01:00
Petr Skoda 63786031f2 Merge branch 'MDL-25573_m20' of git://github.com/rwijaya/moodle 2011-01-31 09:04:29 +01:00
Petr Skoda 1c6a1e12aa Merge branch 'MDL-25291_20_admintreeflag' of git://github.com/samhemelryk/moodle 2011-01-31 08:56:25 +01:00
Rossiani Wijaya 469aa3ba50 create youtube playlist filter. Fixed regex, removed addslash_js, use variable param instead of url because the variable contains the value of the url parameter. 2011-01-31 15:03:58 +08:00
Sam Hemelryk cf59f747d0 Merge branch 'MDL-25913' 2011-01-31 14:58:08 +08:00
Sam Hemelryk 3fd8c6055e MDL-25931 Fixed up whitespace during integration. 2011-01-31 14:57:48 +08:00
Sam Hemelryk 0c6ab77c58 Merge branch 'MDL-25914' 2011-01-31 14:41:04 +08:00
Sam Hemelryk af5222b1bd MDL-25914 Fixed whitespace in binarius theme core.css 2011-01-31 14:40:54 +08:00
Sam Hemelryk 1c4b778376 Merge branch 'MDL-25892' of git://github.com/epsd/moodle 2011-01-31 14:16:46 +08:00
Sam Hemelryk 16ce82a4d3 Merge branch 'MDL-25834' 2011-01-31 14:10:12 +08:00
Sam Hemelryk 8874905e77 MDL-25834 Fixed white space issues during integration 2011-01-31 14:09:57 +08:00
Sam Hemelryk 3721781dfe Merge branch 'MDL-26168' of git://github.com/timhunt/moodle 2011-01-31 13:50:21 +08:00
Sam Hemelryk 60177f84a8 Merge branch 'MDL-25786' of git://github.com/epsd/moodle 2011-01-31 13:31:40 +08:00
Sam Hemelryk 13b9fe035c Merge branch 'MDL-25723' of git://github.com/epsd/moodle 2011-01-31 13:17:26 +08:00
Sam Hemelryk 8dadee2499 Merge branch 'MDL-21250-capitalized_strings' of git://github.com/mudrd8mz/moodle 2011-01-31 13:05:09 +08:00
Sam Hemelryk 299a3e7081 Merge branch 'MDL-26158' 2011-01-31 12:09:53 +08:00
Sam Hemelryk 2c1aa96042 MDL-26158 fixed xhtml problem 2011-01-31 12:09:43 +08:00
Dan Marsden 30bce58eb9 SCORM MDL-26201 setting to allow admin to force users to enable JS in their browser before allowing them to view/use SCORM objects. 2011-01-31 16:53:10 +13:00
Sam Hemelryk 3e6d0ac628 Merge branch 'w05_MDL-25743_20_selfenrol' of git://github.com/skodak/moodle 2011-01-31 11:52:40 +08:00
AMOS bot 4723b4b33e Automatic installer lang files (20110130) 2011-01-30 21:57:11 +01:00
Petr Skoda 9cedb80c5d MDL-26198 fix CSRF and missing access control + fix xhtml strict 2011-01-30 21:50:04 +01:00
Petr Skoda ff03c5b6b5 MDL-26198 make user_has_role_assignment() check parent contexts too 2011-01-30 21:49:22 +01:00
Eloy Lafuente (stronk7) 62d3738246 MDL-25942 upgrade - fix use of reserved word in binding 2011-01-30 19:59:13 +01:00
Petr Skoda 73de6fa06f MDL-26196 fix param validation 2011-01-30 19:27:04 +01:00
Eloy Lafuente (stronk7) cc65dc366d MDL-25708 recordsets - found one more recent use. fixed. 2011-01-30 13:43:06 +01:00
Petr Skoda c259e5f636 MDL-25921 show error when module table is missing 2011-01-30 13:02:42 +01:00
Petr Skoda dc80b14251 MDL-26140 hide unfinished experimental DTL pages 2011-01-30 11:50:19 +01:00
Petr Skoda 28ec73dc5b MDL-26182 add detection of misconfigured nginx server 2011-01-30 11:38:16 +01:00
Petr Skoda 38d93cb0ff MDL-26046 prevent jabber messages wehn noemailever active
Standardise also the debug when emailing message.
2011-01-30 11:01:27 +01:00
Petr Skoda c1ddac83b3 MDL-26104 fix blocknameconflict component in get_string()
creadit goes to Howard Miller
2011-01-29 19:37:56 +01:00
Petr Skoda 73af286bc8 MDL-26172 skip invalid group records during upgrade 2011-01-29 19:20:34 +01:00
Petr Skoda 31da70cce4 MDL-26158 fix form printing and processing 2011-01-29 18:04:50 +01:00
Petr Skoda 893fe4b6b2 MDL-26069 detect missing file postprocessing 2011-01-29 17:50:12 +01:00
Tim Hunt 25f44c72bd custom profile fields MDL-26177 fields with unique were broken because you cannot use get_field with TEXT columns. 2011-01-29 15:42:09 +00:00
Tim Hunt 3fa5724a1f javascript MDL-26098 manual grading was not working when quiz_attempts.id and question_attempts.id were out of synch. 2011-01-29 14:03:02 +00:00
Tim Hunt 3708abd0f2 javascript MDL-26098 make the review this question in a previous state popup work. 2011-01-29 13:59:51 +00:00
Tim Hunt 1db6b9b886 javascript MDL-26098 close_window and close_window_reloading_opener were both broken. 2011-01-29 13:55:47 +00:00
Tim Hunt 2cb01c9205 mod_quiz MDL-26178 it let you try to preview a quiz with several empty pages.
You should not be allowed to preview an empty quiz, to make it correctly detect this case.
2011-01-29 12:11:10 +00:00
Dan Marsden 39340358b4 MDL-26176 - cleanup garbage/pointless code 2011-01-29 21:27:12 +13:00
Dan Marsden 7cc7cf58f5 SCORM MDL-25781 fix links in TOC on view.php 2011-01-29 21:27:12 +13:00
Dan Marsden 08868f58e4 SCORM MDL-25781 fix links in TOC on view.php 2011-01-29 21:25:26 +13:00
Tim Hunt 5bb96cf618 qtype_multianswer MDL-26168 fix invalid HTML from the editing form.
Fix by Tony Levi. Thanks.
2011-01-28 12:20:01 +00:00
Helen Foster 82b15e2811 MDL-21250 capital letters removal
Also some spotted leading and trailing whitespace was removed from some
strings.
2011-01-27 16:24:30 +01:00
Sam Hemelryk 7e90d3a450 navigation MDL-25291 Added a session variable so that admin tree is skipped if it is found to be empty. 2011-01-27 15:54:11 +08:00
Daren Chandisingh e92977d3de [MDL-25780] Fixed missing error string substitution 2011-01-26 15:20:28 +00:00
Daren Chandisingh 6110e008cb [MDL-25639] Fixed page output before redirection 2011-01-26 12:28:35 +00:00
Petr Skoda 0ab727fb35 MDL-26034 myprofile block cleanup 2011-01-26 13:26:46 +01:00
Petr Skoda 03531e2790 MDL-25743 fix inverted timestart/end logic 2011-01-26 13:26:31 +01:00
Petr Skoda ae36bc3dd8 MDL-26117 skip invalid resource records during upgrade 2011-01-26 13:24:33 +01:00
sam marshall 0d8b6a69ce lib MDL-25981 Improved modinfo
This commit:
a) moves modinfo code into new library modinfolib.php
b) uses classes instead of stdClass objects, allowing a huge amount of documentation (and IDE completion)
c) adds hooks so that plugins other than forum can display messages like forum's 'unread', and plugins other than label can display html (apart from/as well as their view.php link) on the course view page
d) removes current hacks for forum and label (mainly in print_section but also across the code), replacing with new 'content' and similar variables [this is the reason for the changes in blocks, etc]
e) reduces size of modinfo in database (only when rebuilt) by excluding empty fields

The change is intended to be backward compatible and does not affect the format of modinfo in database.
2011-01-26 10:29:16 +00:00
Petr Skoda 8cdc85ac62 weekly release 2011-01-25 19:30:03 +01:00
Sam Hemelryk ac36bda238 PULL-157, MDL-26116 Fixed merge conflicts 2011-01-25 12:18:05 +08:00
andyjdavis 0d92d04f2e profiles MDL-17201 added an index on the table user_info_data 2011-01-25 11:58:35 +08:00
Dongsheng Cai b1db1b6e8a MDL-26116, added default value to tag_instance.tiuserid field 2011-01-25 11:24:03 +08:00
Eloy Lafuente (stronk7) 29650825ad PULL-99, MDL-25929 progresstrackedroles out. Fixed conflicts and whitespace 2011-01-24 11:55:57 +01:00
Eloy Lafuente (stronk7) a81d26ac36 NOBUG: Fix whitespace 2011-01-24 11:43:59 +01:00
Eloy Lafuente (stronk7) 21c91e2e11 Merge branch 'wip-MDL-26044' of git://github.com/sammarshallou/moodle 2011-01-24 10:48:08 +01:00
Sam Hemelryk 912d099cc9 Merge branch 'MDL-25637' 2011-01-24 16:20:51 +08:00
Sam Hemelryk 80c1289773 MDL-25637 Fixed whitespace 2011-01-24 16:20:30 +08:00
Aparup Banerjee 2b9ce62e23 performance MDL-25637 converted tabs to spaces 2011-01-24 15:49:18 +08:00
Sam Hemelryk c9b2e8bf61 Merge branch 'w04_MDL-26035_20_installtest' of git://github.com/skodak/moodle 2011-01-24 15:05:55 +08:00
Aparup Banerjee b692e4aa29 Performance MDL-25637 moved static count/sizeof functions out of for loop conditions 2011-01-24 14:51:21 +08:00
Aparup Banerjee f179cdb73e performance MDL-25637 some of more similar performance tweaks to come 2011-01-24 14:51:21 +08:00
Sam Hemelryk c053c86c5b Merge branch 'w04_MDL-26066_20_dbenrol' of git://github.com/skodak/moodle 2011-01-24 13:26:51 +08:00
Sam Hemelryk b6c7558c2d Merge branch 'w04_MDL-26096_20_catenrol' of git://github.com/skodak/moodle 2011-01-24 11:57:06 +08:00
Sam Hemelryk 0243d7eb2f Merge branch 'w04_MDL-25855_20_filerequire' of git://github.com/skodak/moodle 2011-01-24 11:51:38 +08:00
Sam Hemelryk 2e725dd72b Merge branch 'MDL-26061-no_remote_users' of git://github.com/mudrd8mz/moodle.git with changes 2011-01-24 11:38:29 +08:00
Sam Hemelryk 48b01a217c MDL-26061 Revised new string before integration. 2011-01-24 11:37:29 +08:00
Sam Hemelryk c7a8c36233 Merge branch 'w04_MDL-26008_20_creator' of git://github.com/skodak/moodle 2011-01-24 11:10:40 +08:00
Sam Hemelryk 12cd15aeaa Merge branch 'w04_MDL-26106_20_lebletypo' of git://github.com/skodak/moodle 2011-01-24 11:07:29 +08:00
Sam Hemelryk 4fd25ab95c Merge branch 'm20_MDL-26063_SCORM_grouping' of git://github.com/danmarsden/moodle 2011-01-24 11:02:07 +08:00
Sam Hemelryk 88c3ba8c06 Merge branch 'w04_MDL-26041_20_resources' of git://github.com/skodak/moodle 2011-01-24 11:00:27 +08:00
Sam Hemelryk f8b214e1cd Merge branch 'w04_MDL-26045_20_onlineblock' of git://github.com/skodak/moodle 2011-01-24 10:45:46 +08:00
Sam Hemelryk e53a87dcb5 Merge branch 'MDL-25841' of git://github.com/timhunt/moodle 2011-01-24 10:31:34 +08:00
Sam Hemelryk ab8bc2ee1c Merge branch 'MDL-25884' of git://github.com/timhunt/moodle 2011-01-24 10:20:22 +08:00
Sam Hemelryk 34b681701a Merge branch 'MDL-26059' of git://github.com/timhunt/moodle 2011-01-24 10:08:32 +08:00
Petr Skoda cde91f5a9b MDL-26096 added missing return 2011-01-23 20:10:10 +01:00
Petr Skoda 99d19c13ae MDL-25855 some more missing filelib includes 2011-01-23 18:34:41 +01:00
Petr Skoda e83a6a22d4 MDL-26106 fix lable typo
credit goes to fautrero
2011-01-23 15:36:06 +01:00
Petr Skoda 87e88690b2 MDL-26066 fix invalid type comparison when course id used and typo fix 2011-01-23 14:56:28 +01:00
Petr Skoda 3e858ea737 MDL-26035 more detection of invalid plugin dir names 2011-01-23 14:27:51 +01:00
Petr Skoda 25b355b623 MDL-26008 improved creator role description 2011-01-23 12:53:12 +01:00
Petr Skoda a915dedb2a MDL-26041 do not include lables in the list of resources 2011-01-23 12:32:08 +01:00
Eloy Lafuente (stronk7) cd5fdfd87a MDL-25708 recordsets - tag and user directory 2011-01-22 13:34:28 +01:00
Eloy Lafuente (stronk7) cfd62f13a1 MDL-25708 recordsets - url module 2011-01-22 12:54:40 +01:00
Eloy Lafuente (stronk7) a1d870aa95 MDL-25708 recordsets - survey module 2011-01-25 19:59:02 +01:00
Eloy Lafuente (stronk7) 676874df1d MDL-25708 recordsets - scorm module 2011-01-25 19:59:02 +01:00
Eloy Lafuente (stronk7) 8ce9a2b26d MDL-25708 recordsets - resource module 2011-01-25 19:59:01 +01:00
Eloy Lafuente (stronk7) 3f2efc20ad MDL-25708 recordsets - page and quiz modules 2011-01-25 19:59:01 +01:00
Eloy Lafuente (stronk7) a8307c22c2 MDL-25708 recordsets - imscp and lesson modules 2011-01-25 19:59:01 +01:00
Eloy Lafuente (stronk7) ec577b0538 MDL-25708 recordsets - glossary module 2011-01-25 19:59:01 +01:00
Eloy Lafuente (stronk7) 56d1c48f24 MDL-25708 recordsets - forum module 2011-01-25 19:59:01 +01:00
Eloy Lafuente (stronk7) 05c707dacc MDL-25708 recordsets - folder module 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) 6b1b1d0339 MDL-25708 recordsets - assignment and data modules 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) 20222a3d7b MDL-25708 recordsets - fix message/lib.php 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) 1b42e67747 MDL-25708 recordsets - fix lib/grade/xxx stuff 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) be981316f4 MDL-25708 recordsets - fix file_storage 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) 5a4a7b425b MDL-25708 recordsets - fix upgradelib and dml stuff 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) 419178d713 MDL-25708 recordsets - fix completion 2011-01-25 19:59:00 +01:00
Eloy Lafuente (stronk7) b967c54185 MDL-25708 recordsets - fix events/grade/group/moodle libs 2011-01-25 19:58:59 +01:00
Eloy Lafuente (stronk7) afa559e9bc MDL-25708 recordsets - fix accesslib and datalib uses 2011-01-25 19:58:59 +01:00
Eloy Lafuente (stronk7) fc5016fcc8 MDL-25708 recordsets - fix group dir uses 2011-01-25 19:58:59 +01:00
Eloy Lafuente (stronk7) a0c3fc6304 MDL-25708 recordsets - fix course & enrol dir uses 2011-01-25 19:58:59 +01:00
Eloy Lafuente (stronk7) 755d2c74f6 MDL-25708 recordsets - fix admin dir uses 2011-01-25 19:58:59 +01:00
Daren Chandisingh fe4457ae29 [MDL-25874] Handle 'Cancel' action when editing lessons 2011-01-20 11:07:14 +00:00
Dan Marsden c371e39316 SCORM MDL-26063 incorrect context used - thanks to Matteo Scaramuccia for fix 2011-01-20 10:40:22 +13:00
David Mudrak d47b972fa9 MDL-26061 Prevent fatal error in remote enrolment client when there are no roaming users 2011-01-19 19:39:19 +01:00
Petr Skoda fb7dd39ce7 MDL-26045 fix invalid sql join when separate group mode enabled 2011-01-19 15:40:20 +01:00
Petr Skoda 17e03900c9 weekly release 2011-01-19 14:13:54 +01:00
Tim Hunt 90c2f51031 qtype_multianswer MDL-25841 feedback pop-up was appearing in the wrong place.
It seems that overlib was getting confused by its div being inside another positioned div. The simplest solution is to not create the div at all. Then the overlib JS creates it when needed, and that works.
2011-01-18 23:30:40 +00:00
Tim Hunt 151c2284dd quiz MDL-25884 mod/quiz/index.php broken when logged in as a student. 2011-01-18 23:17:46 +00:00
Tim Hunt 2c00fa161e qformat_gift MDL-26059 fails to import truefalse questions with answer true. 2011-01-18 21:38:34 +00:00
sam marshall 89b4ffe617 completion MDL-25929 Added upgrade change to remove unused setting 2011-01-18 12:55:58 +00:00
sam marshall 27d6ab5712 lib MDL-26044 Optimise moodle_url based on profiler data 2011-01-18 12:39:51 +00:00
Sam Hemelryk 69f9e678a3 Merge branch 'MDL-25988_20_wip_enrolroles' of git://github.com/skodak/moodle 2011-01-18 17:41:23 +08:00
Sam Hemelryk a1e26b5e46 gradebook MDL-20617 Fixed SQL formatting 2011-01-18 17:17:14 +08:00
andyjdavis a071dbb66b gradebook MDL-20617 added more control over what columns are displayed on the user report 2011-01-18 17:13:06 +08:00
Sam Hemelryk 13738840b2 Merge branch 'MDL-26031_20_wip_guestsession' of git://github.com/skodak/moodle 2011-01-18 15:40:50 +08:00
Sam Hemelryk 07d4c7ac6e Merge branch 'MDL-26007_20_wip_enverror' of git://github.com/skodak/moodle 2011-01-18 15:34:43 +08:00
Sam Hemelryk dcad74e406 Merge branch 'MDL-25910_20_wip_mysqlsocket' of git://github.com/skodak/moodle 2011-01-18 14:18:24 +08:00
Sam Hemelryk e5654cad1e Merge branch 'MDL-25754_20_wip' of git://github.com/skodak/moodle 2011-01-18 13:47:31 +08:00
Sam Hemelryk ec9b044d12 Merge rebased branch 'MDL-25769' of git://github.com/andyjdavis/moodle.git 2011-01-18 12:03:11 +08:00
Sam Hemelryk 25081b95f9 gradebook MDL-25769 Fixed SQL syntax formatting 2011-01-18 11:56:21 +08:00
andyjdavis f2491a11a1 gradebook MDL-25769 switched a query over to use named params 2011-01-18 11:56:20 +08:00
andyjdavis 2dc5e58466 gradebook MDL-25769 fixed some problems identified by peer review 2011-01-18 11:56:06 +08:00
andyjdavis 387815db61 gradebook MDL-25769 fixed up the grader report 2011-01-18 11:49:46 +08:00
andyjdavis b61e4f4624 gradebook MDL-25769 fixed grade/import/lib.php get_unenrolled_users_in_import() 2011-01-18 11:49:46 +08:00
andyjdavis ef8f084cc6 gradebook MDL-25769 fixed the loading of users in the grader report 2011-01-18 11:49:40 +08:00
Sam Hemelryk 3d12d1682e Merge branch 'MDL-25887' of git://github.com/andyjdavis/moodle.git 2011-01-18 10:56:51 +08:00
Sam Hemelryk e8aad16f7e gradebook MDL-25887 Fixed whitespace 2011-01-18 10:55:36 +08:00
Petr Skoda e565c9baf7 Merge branch 'MDL-25789' of git://github.com/samhemelryk/moodle 2011-01-17 21:22:43 +01:00
Petr Skoda 696a6ee12f Merge branch 'MDL-25790' of git://github.com/samhemelryk/moodle 2011-01-17 21:13:07 +01:00
Petr Skoda 2f20e23ba6 MDL-25791 PULL-125 reverting commits that create null problems during upgrade 2011-01-17 21:08:05 +01:00
Petr Skoda 1f50b85867 Merge branch 'MDL-25791' of git://github.com/samhemelryk/moodle 2011-01-17 20:52:31 +01:00
Petr Skoda 9c170a4323 Merge branch 'MDL-25792' of git://github.com/samhemelryk/moodle 2011-01-17 20:49:53 +01:00
Petr Skoda 5cfe8aecb8 Merge branch 'MDL-25672' of git://github.com/samhemelryk/moodle 2011-01-17 20:45:53 +01:00
Petr Skoda 295710b069 Merge branch 'MDL-25750' of git://github.com/samhemelryk/moodle 2011-01-17 20:42:17 +01:00
Petr Skoda dd265e3091 Merge branch 'MDL-25987' of git://github.com/timhunt/moodle 2011-01-17 20:25:56 +01:00
Petr Skoda 39e316e167 Merge branch 'MDL-25722' of git://github.com/timhunt/moodle 2011-01-17 20:22:26 +01:00
Petr Skoda c6947dd878 Merge branch 'MDL-26029' of git://github.com/timhunt/moodle 2011-01-17 20:20:43 +01:00
Petr Skoda af929b8d09 Merge branch 'MDL-25881' of git://git.luns.net.uk/moodle 2011-01-17 19:12:33 +01:00
Petr Skoda bb871bc4ca Merge branch 'workshop_random_allocator' of git://github.com/mudrd8mz/moodle 2011-01-17 19:02:55 +01:00
Petr Skoda a477c0da6e Merge branch 'MDL-25980-mnet_remote_enrolment' of git://github.com/mudrd8mz/moodle 2011-01-17 19:01:02 +01:00
Petr Skoda 3827ee9415 Merge branch 'AMOS-install-strings' of git://github.com/mudrd8mz/moodle 2011-01-17 18:57:22 +01:00
John Stabinger a7302c7128 MDL-25913 fix for Arialist custom menu 2011-01-17 12:33:00 -05:00
Petr Skoda 673a8f7781 MDL-26031 purge timed-out sessions of guest user 2011-01-17 18:25:00 +01:00
Tim Hunt 897fee6b6f unit tests MDL-26029 fix notices from CheckSpecifiedFieldsExpectation. 2011-01-17 16:19:26 +00:00
John Stabinger 2e84ebda4d MDL-25892 fix for nonzero theme layout 2011-01-17 09:15:08 -05:00
Tim Hunt c97325f6e8 quiz MDL-25722 get rid of annoying alerts when quiz is in 'secure' mode.
See http://moodle.org/mod/forum/discuss.php?d=165772, where people have tried out this fix and found that it works.
2011-01-17 13:34:46 +00:00
John Stabinger 91227f9cee MDL-25914 fix for Binarius custom menu 2011-01-17 07:44:06 -05:00
John Stabinger 2553bf60e2 MDL-25834 fix for Overlay theme custom menu 2011-01-17 07:20:08 -05:00
AMOS bot 64edd130f3 Automatic installer lang files (20110117) 2011-01-17 10:26:47 +01:00
Sam Hemelryk 9498654c1d Merge branch 'MDL-17884_m20' of git://github.com/rwijaya/moodle 2011-01-17 16:00:20 +08:00
Sam Hemelryk fe1f367a11 Merge branch 'MDL-25729_m20' of git://github.com/rwijaya/moodle 2011-01-17 15:54:27 +08:00
Sam Hemelryk ca08b132e3 Merge branch 'MDL-25860_20_wip_grpblocks' of git://github.com/skodak/moodle 2011-01-17 15:36:10 +08:00
Sam Hemelryk 83be8fce3a Merge branch 'MDL-25973_20_wip_charset' of git://github.com/skodak/moodle 2011-01-17 15:24:01 +08:00
Sam Hemelryk c4592a2ac0 Merge branch 'MDL-25971' of git://github.com/timhunt/moodle 2011-01-17 15:12:18 +08:00
Dongsheng Cai a7db0a260e MDL-25895, prevent repository_ajax.php being downloaded by IE when php file is associated with other programs 2011-01-17 13:56:57 +08:00
Sam Hemelryk 616e81cee9 Merge branch 'MDL-25962_20_wip_removeyui' of git://github.com/skodak/moodle 2011-01-17 13:17:04 +08:00
Sam Hemelryk 242c4319ab Merge branch 'MDL-25936_wip' of git://github.com/skodak/moodle 2011-01-17 13:08:33 +08:00
Sam Hemelryk bec662a0f6 Merge branch 'MDL-25837_wip' of git://github.com/skodak/moodle 2011-01-17 11:35:06 +08:00
Sam Hemelryk 227d6da5d8 Merge branch 'MDL-25907_wip' 2011-01-17 10:53:24 +08:00
Sam Hemelryk 3b15d04013 sessions MDL-25907 Fixed typo prior to integration 2011-01-17 10:48:00 +08:00
Sam Hemelryk 0f13630691 Merge branch 'MDL-25836_wip' of git://github.com/skodak/moodle 2011-01-17 10:17:40 +08:00
Sam Hemelryk c5ea8d0bcc Merge branch 'MDL-25935-user_picture_fields' of git://github.com/mudrd8mz/moodle 2011-01-17 09:35:34 +08:00
Petr Skoda 5f01417372 MDL-26007 fix error message when can not found env data 2011-01-16 20:47:22 +01:00
David Mudrak 241e58e44b MDL-25982 Workshop: users from the same group may be excluded from allocation in visible group mode
If the Workshop is in the visible group mode, members of the same group
can be now optionally excluded from random allocation for a given user.
2011-01-16 19:38:56 +01:00
David Mudrak a1dc301ed5 MDL-25523 Workshop: not-grouped users are excluded from allocation in visible group mode
There was a bug as these users were ignored only as squares but not as
circles. This patch makes sure that no new allocation are added to
not-grouped users in visible group mode. However, the options 'Remove current
allocations' and 'Add self-assessments' apply to them intentionally.

Also, the user is warned if there are some not-grouped users found in a
workshop in visible groups mode or separate groups mode.
2011-01-16 19:38:37 +01:00
Dan Poltawski 3b9a74ce53 course reports MDL-25881 - incorrect string 2011-01-16 14:58:41 +00:00
John Stabinger defbd5b0f5 MDL-25723 fix for all course listing in IE 2011-01-14 14:23:10 -05:00
Tim Hunt 1650a33cb4 qtype admin MDL-25987 also allow question type settings to be on an admin_externalpage. 2011-01-14 19:10:47 +00:00
Petr Skoda 3093ce8021 MDL-25988 fixed overriding of roles variable
credit goes to Michael Landis
2011-01-14 19:04:55 +01:00
Tim Hunt 63b5318e86 qtype admin MDL-25987 use get_plugin_list, rather than including questionlib.php.
This should be a small be significant performance win for people who are logged in as admin.
2011-01-14 17:26:31 +00:00
David Mudrak 47ce9385e8 MDL-25526 Workshop: fixed random allocation of reviews
The patch wraps that foreach ($circles as $circleid => $circle)
loop by yet another one for() loop. Reviews are allocated iteratively
now. During the first iteration, we try to make sure that at least one
circle link exists. During the second iteration, we try to allocate two,
etc. Circles are shuffled at the beginning of each iteration.
This is supposed to improve the randomness of the allocation.

The patch also fixes shuffle_assoc() implementation. The previous
implementation actually did not work at all. Also, that removed called
to shuffle_assoc() was redundant here.
2011-01-14 14:20:41 +01:00
John Stabinger 217947351b MDL-25786 fix for magazine theme 2011-01-14 06:57:44 -05:00
David Mudrak 538dcf896c NOMDL MNet remote enrolment client: display a button to go back to the course selection
Without this button, the user has to go through the admin menu again,
selecting the same host. This improves the usability when enrolling
local users to multiple remote courses.
2011-01-14 12:53:01 +01:00
Petr Skoda 3c1293fe97 MDL-25910 custom socket location for postgresql driver, improved config-dist.php info 2011-01-14 12:11:49 +01:00
David Mudrak 34685a5992 MDL-25980 MNet: missing remotecourseid parameter in SQL clearing stale cache records
Because the remotecourseid parameter was missing in SQL, all cache
records for other courses from that host were cleared.
2011-01-14 11:31:57 +01:00
David Mudrak 4841fda1bc NOMDL MNet: Fixed incorrect remote course ID passed
The param is deprecated anyway, it had to be blindly copied from a
legacy code.
2011-01-14 11:31:26 +01:00
Sam Hemelryk e4e19a65f9 mod-quiz MDL-25791 bumped version number, rebased patch, and removed unwanted phpdoc global 2011-01-14 17:49:12 +08:00
Sam Hemelryk b3abfc46e3 mod-quiz MDL-25791 Added conditions around upgrade code so that it is only executed if needed 2011-01-14 17:44:10 +08:00
Sam Hemelryk 0022ea3669 mod-quiz MDL-25791 Fixed database discrepancies between a fresh install and an upgraded site within the Quiz module 2011-01-14 17:44:06 +08:00
Petr Skoda 7c725a24b3 MDL-25860 adding missing blocks to groupings page 2011-01-14 10:41:12 +01:00
Petr Skoda 79ac5a8cf2 MDL-25910 add support for custom mysql socket location 2011-01-14 10:20:04 +01:00
Petr Skoda 8a7703ce53 MDL-25973 add missing charset 2011-01-14 09:32:17 +01:00
Sam Hemelryk 6d02316093 lib-db MDL-25790 Added missing rating indexs on existing 2.0 sites 2011-01-14 16:19:12 +08:00
Sam Hemelryk ffec817ed3 lib-db MDL-25789 Corrected discrepancies in old upgrade code and install.xml 2011-01-14 15:36:59 +08:00
Sam Hemelryk 15257dd181 lib-db MDL-25790 Added code to drop adodb_logsql if it exists 2011-01-14 15:26:48 +08:00
Rossiani Wijaya 2d572444e1 MDL-17884: Add test_download_file_content and componentlib to unittest. Credit goes to Tomasz Muras 2011-01-14 14:52:24 +08:00
Sam Hemelryk 43c984578a lib-db MDL-25790 Fixed up version numbers now that 2.0.1 has been released 2011-01-14 14:22:46 +08:00
Dongsheng Cai 79f0bac62e WIKI MDL-25501 1. check if wiki entry exists before insert new entry 2. check wiki version record mimetype, if it is not empty, try to export the content to file pool 2011-01-14 14:17:24 +08:00
Sam Hemelryk 39f0ceb2cb lib-db MDL-25790 Added conditional checks around upgrade code so that it is only executed if needed. See MDL-25789 2011-01-14 11:52:52 +08:00
Sam Hemelryk 2bddef731a lib-db MDL-25790 Added upgrade code to fix database discrepancies between a fresh install and an upgrade 2011-01-14 11:52:52 +08:00
Rossiani Wijaya 5419885ff8 MDL-25729_m20: fix invalid string in splash theme 2011-01-14 11:20:55 +08:00
Sam Hemelryk 631cefc35f mod-scorm MDL-25792 Changed forcecompleted to have lenght 1 and bumbed version number 2011-01-14 11:09:59 +08:00
Sam Hemelryk b964171cbf mod-scorm MDL-25792 Fixed database discrepancies between a fresh install and an upgraded site within the SCORM module 2011-01-14 11:01:30 +08:00
Sam Hemelryk 5dd7e903ff lib-db-access MDL-25672 editingteacher can no longer delete courses by default. 2011-01-14 10:23:37 +08:00
Sam Hemelryk 3e82d63328 theme-overlay MDL-25750 Fixed overflow problem with report layout. 2011-01-14 10:15:24 +08:00
Petr Skoda 34b93e39a6 MDL-25754 improved tag sanitisation and fixed tag autocomplete 2011-01-13 23:40:43 +01:00
Tim Hunt 1a09fa6dfa html_writer MDL-25971 Support disabled => boolean, as well as disabled => disabled in html_writer::select. 2011-01-13 19:28:54 +00:00
Petr Skoda 8a13ce4def MDL-25962 removing obsolete YUI 2.8.1 library 2011-01-13 10:13:52 +01:00
Petr Skoda 4cb02426ff MDL-25936 fixed user upload when manual plugin not first 2011-01-12 22:07:48 +01:00
Ashley Holman 85b8f8dfd0 MDL-25837 adding missing modinfo course property 2011-01-12 21:44:16 +01:00
Petr Skoda 4e70708de9 MDL-25837 detect invalid course parameter when getting fast modinfo 2011-01-12 21:40:34 +01:00
Ashley Holman d0c3f54770 MDL-25907 purge sessions of not-logged-in users 2011-01-12 20:14:00 +01:00
Petr Skoda 79abc6d1eb MDL-25836 fixed stripped src attribute from script tag 2011-01-12 19:33:18 +01:00
Petr Skoda 5a7f931ee5 weekly version bump 2011-01-12 10:50:18 +01:00
Petr Skoda f4f374176d Merge branch 'MDL-25596-fixed' of git://github.com/samhemelryk/moodle 2011-01-12 09:57:18 +01:00
Sam Hemelryk 0022a97f24 blocks-navigation MDL-25596 Fixed notice when block config doesn't already exist 2011-01-12 09:53:08 +08:00
Petr Skoda 90c42e0f43 MDL-25501 reverting PULL-95 2011-01-11 22:53:16 +01:00
Petr Skoda 65beff8ea4 Merge branch 'AMOS-install-strings' of git://github.com/mudrd8mz/moodle 2011-01-11 16:21:58 +01:00
AMOS bot b9fe01bf1a Automatic installer lang files (20110111) 2011-01-11 16:08:58 +01:00
andyjdavis 99c228aa11 gradebook MDL-25887 closed a file handle that was being left open and added more descriptive grade item titles 2011-01-11 16:11:02 +08:00
andyjdavis 83e364c465 gradebook MDL-25887 removed some commented out code 2011-01-11 11:58:02 +08:00
andyjdavis df2f526877 gradebook MDL-25887 fixed a problem with grade import user mapping 2011-01-11 11:50:04 +08:00
Eloy Lafuente (stronk7) 742d877eaf Merge branch 'MDL-25793' of git://github.com/samhemelryk/moodle 2011-01-11 00:33:56 +01:00
David Mudrak 9ecbf8018f MDL-25935 user_picture::unalias() now handles null values correctly 2011-01-11 00:27:42 +01:00
Eloy Lafuente (stronk7) ff14fd71fd Merge branch 'MDL-24521' of git://github.com/samhemelryk/moodle 2011-01-10 23:20:30 +01:00
Eloy Lafuente (stronk7) a9af868943 Merge branch 'MDL-24561_forum_subscribe_sesskey' of git://github.com/mudrd8mz/moodle 2011-01-10 21:38:13 +01:00
Eloy Lafuente (stronk7) a3c896ae4d Merge branch 'm20_MDL-25794_sections_typo' of git://github.com/danmarsden/moodle 2011-01-10 21:22:02 +01:00
sam marshall b64a827c4d completion MDL-25929 Reordered SQL to make it clearer (after tim's review) 2011-01-10 15:35:46 +00:00
sam marshall 1c6ed50500 completion MDL-25929 Remove progresstrackedroles option 2011-01-10 15:20:24 +00:00
Petr Skoda 4bbcdcec0d Merge branch 'wip-MDL-25927' of git://github.com/sammarshallou/moodle 2011-01-10 15:16:22 +01:00
sam marshall 2af26b123d completion MDL-25927 Added old function back as deprecated, to preserve API compatibility 2011-01-10 14:08:10 +00:00
Petr Skoda 9c15755633 Merge branch 'm20_MDL-25501_wiki_upgrade_improvement' of git://github.com/dongsheng/moodle 2011-01-10 14:54:53 +01:00
Petr Skoda 4761e6334f Merge branch 'm20_MDL-25669_course_sortorder' of git://github.com/dongsheng/moodle 2011-01-10 14:51:22 +01:00
Petr Skoda d0dbd5a345 Merge branch 'm20_MDL-25219_question_text' of git://github.com/dongsheng/moodle 2011-01-10 14:44:26 +01:00
Petr Skoda 6fa8c7ea86 Merge branch 'MDL-25596' of git://github.com/samhemelryk/moodle 2011-01-10 14:41:04 +01:00
Petr Skoda 0e3fdf10c2 Merge branch 'MDL-24984' of git://git.luns.net.uk/moodle 2011-01-10 14:38:16 +01:00
Petr Skoda 5301285d87 Merge branch 'MDL-24742' of git://git.luns.net.uk/moodle 2011-01-10 14:37:21 +01:00
Petr Skoda 2f1b1abc83 Merge branch 'MDL-25232' of git://git.luns.net.uk/moodle 2011-01-10 14:35:38 +01:00
Petr Skoda e168f8cca6 Merge branch 'MDL-25675' of git://git.luns.net.uk/moodle 2011-01-10 14:34:18 +01:00
Petr Skoda 29612524f3 Merge branch 'MDL-25854' of git://github.com/samhemelryk/moodle 2011-01-10 14:31:21 +01:00
Petr Skoda d32c077bf6 Merge commit 'ed5c4cf44d0b38e129ad57747dfaf16d9677d465' 2011-01-10 14:21:15 +01:00
Petr Skoda b2d6484598 Merge commit '246cc0e6b52f455dcb1ab23039202d7498d91d30'
Conflicts:
	course/request.php
2011-01-10 14:12:34 +01:00
sam marshall 563e97b8b9 completion MDL-25927 Change print_help_icon to display_help_icon (returns html instead of printing) 2011-01-10 13:04:54 +00:00
Petr Skoda b2f806cd92 Merge branch 'MDL-25886-user_picture_fields' of git://github.com/mudrd8mz/moodle 2011-01-10 13:43:00 +01:00
Sam Hemelryk d481e2a8e3 mod-wiki MDL-25793 Bumped version number and adjusted version number in new upgrade code. 2011-01-10 17:31:40 +08:00
Sam Hemelryk 4b3c86b152 Merge branch 'MDL-24133' of git://git.luns.net.uk/moodle 2011-01-10 16:40:30 +08:00
Sam Hemelryk 5539372b27 Merge branch 'MDL-25909' of git://git.luns.net.uk/moodle 2011-01-10 16:36:49 +08:00
Sam Hemelryk 0017173f1a Merge branch 'MDL-23393' of git://git.luns.net.uk/moodle 2011-01-10 16:26:17 +08:00
Sam Hemelryk 1cc0c36e04 Merge branch 'MDL-23425' of git://git.luns.net.uk/moodle 2011-01-10 16:12:50 +08:00
Sam Hemelryk 03364f9e2f Merge branch 'MDL-25869' of git://git.luns.net.uk/moodle 2011-01-10 16:10:46 +08:00
Sam Hemelryk 726bc52504 Merge remote branch 'mouneyrac/MDL-25768' 2011-01-10 16:01:08 +08:00
Sam Hemelryk 6b9240c55e Merge branch 'MDL-23657' of git://git.luns.net.uk/moodle 2011-01-10 13:39:44 +08:00
Sam Hemelryk 9e41043ca4 Merge branch 'MDL-23224' of git://github.com/mouneyrac/moodle 2011-01-10 13:33:48 +08:00
Sam Hemelryk 1861a2875a Merge branch 'MDL-24299' of git://git.luns.net.uk/moodle 2011-01-10 13:10:33 +08:00
Sam Hemelryk 34e54bbb62 Merge branch 'MDL-25478' of git://git.luns.net.uk/moodle 2011-01-10 13:02:52 +08:00
Sam Hemelryk 0d2d7a6553 Merge branch 'MDL-25709-2' of git://git.luns.net.uk/moodle 2011-01-10 12:08:10 +08:00
Dongsheng Cai 77064d2b4f WIKI MDL-25501 1. check if wiki entry exists before insert new entry 2. check wiki version record mimetype, if it is not empty, try to export the content to file pool 2011-01-10 10:07:34 +08:00
Dongsheng Cai 3acbe663af MDL-25669, fix_course_sortorder should check MAX_COURSE_CATEGORIES limit, and print debugging message when the number of courses in a category reach the limit 2011-01-10 09:57:15 +08:00
Dan Marsden 2e3c31bca3 SCORM MDL-25794 fix db call to use select_menu to pass into single_select renderer - also fix small typo for label/lable 2011-01-10 11:22:50 +13:00
Dan Poltawski ed4a7e4b07 forum MDL-25232 - fix unbalanced divs 2011-01-09 21:11:01 +00:00
Paul Vaughan 43fa145137 course/lib MDL-24984 - fix lack of spacing on category list
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-09 20:35:21 +00:00
Dan Marsden ed5c4cf44d SCORM MDL-25891 typo causing general exception for some SCORM objects - thanks to Hais Deakin for report/fix 2011-01-10 09:24:16 +13:00
Dan Poltawski 7de9bfad15 course-format-weeks MDL-24742 dont redefine maincontent
It was breaking XHTML validation due to duplicate id
2011-01-09 20:02:21 +00:00
Dan Poltawski e594fc8d13 mod/data MDL-24133 - footer called before header 2011-01-09 19:31:25 +00:00
Myles Carrick 94b8fa5aad course: MDL-23425 use correct config setting in check for displaying course request buttons
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-09 18:28:41 +00:00
Dan Poltawski 9268148966 blog MDL-23393 - Tidy up preferences form
Make form display set value and use mforms type checking
2011-01-09 18:03:58 +00:00
Dan Poltawski 065bee4b70 forum MDL-25909 - Fix undefined variable 2011-01-08 15:19:41 +00:00
Dan Poltawski 15217303ae blocks/rss_client MDL-25869 Prevent sharing id
The form was generating an element id of "header", causing theme
breakage
2011-01-08 00:17:33 +00:00
David Mudrak 5c0d03ea1c MDL-25886 method to convert aliased fields returned by user_picture::fields() back to unaliased form
The new public static method user_picture::unalias() picks the user
picture fields from the given record and maps the properties back to
unaliased form so that the result can be rendered.
Also fixes a forgotten bug in previous commit and adds a unit test for
both aliasing and unaliasing.
2011-01-07 14:05:25 +01:00
David Mudrak 9958e561d8 MDL-25886 allow user_picture::fields() to be used multiple times within a single query
When user table is joined twice or more within a single query, it is
important to be able to provide aliases to all returned files. This
patch adds optional parameter that, if provided, is used as a prefix
for columns aliases. Does not apply to the 'id' column, use $idalias for
that.
2011-01-07 02:12:43 +01:00
Dongsheng Cai 365e53d1d4 QUESTION MDL-25219 fixed image links in description question type, credit to Sam Hemelryk 2011-01-06 15:29:07 +08:00
Sam Hemelryk 8e5c23e04f blocks-navigation MDL-25596 Fixed up redundant AJAX calls when navigation was limited by config 2011-01-06 11:50:01 +08:00
Sam Hemelryk 603087b87e enrol MDL-25522 Fixed up duplicate fields in search_other_users method that was causing problems in Oracle 2011-01-06 10:20:28 +08:00
Andrew Robert Nicols 218a465980 lib/ajax/ MDL-25675 Use className instead of classList.toString()
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-05 23:26:28 +00:00
David Mudrak c56ed7bb85 MDL-24561 forum: require sesskey for the course-wide subscriptions
mod/forum/index.php allows to subscribe to and unsubscribe from all
forums in the course. However, sesskey was not checked here.
2011-01-05 13:01:46 +01:00
David Mudrak 6f7d65c724 MDL-24561 forum subscription checks sesskey
The only case when sesskey is not available is when we came to
subscribe.php from a link in email. In that case, we display a
confirmation page that redirects back providing the sesskey.
All other links to subscribe.php are fixed now so they provide sesskey
as a parameter.
I also polished $mode parameter handling a bit because the check
against empty string was not correct as the value is cast to PARAM_INT.
2011-01-05 13:01:46 +01:00
Petr Skoda 46f4c3932f weekly release 2011-01-05 11:54:01 +01:00
jeromemoodle 1ede3cb37f javascript lib MDL-23224 dropdown onclick event is not trigger in Chrome 2011-01-05 16:12:52 +08:00
andyjdavis 246cc0e6b5 course MDL-25831 removed trailing whitespace 2011-01-05 15:08:18 +08:00
jeromemoodle 6a658c9173 community hub finder MDL-25768 private hubs weren't displayed in the hub list 2011-01-05 14:27:54 +08:00
Sam Hemelryk 712b55e1ba javascript MDL-24521 Fixed confirm dialog bug. Kudos to John Anderson for his work on the patch and James Brisland for help testing. 2011-01-05 14:02:42 +08:00
Sam Hemelryk dfcf4e0819 Merge branch 'MDL-25525' of git://git.luns.net.uk/moodle 2011-01-04 13:47:55 +08:00
andyjdavis a170818189 course MDL-25831 made course request notifications work 2011-01-04 13:35:08 +08:00
Sam Hemelryk 724125bdd4 Merge branch 'MDL-25657' of git://git.luns.net.uk/moodle 2011-01-04 13:30:32 +08:00
Sam Hemelryk 1be9192173 mod-wiki MDL-25793 Fixed database discrepancies between a fresh install and an upgraded site within the Wiki module 2011-01-04 09:43:45 +08:00
Dan Poltawski 047c3b6cd3 lib/accesslib.php MDL-25709 - fix docs 2011-01-03 23:41:10 +00:00
Dan Poltawski e60a00f9a4 blocks/calendar_month MDL-23657 - don't assume id param is courseid
This was casuing context creation on invalid courses..

There remains a problem with previous/next buttons on non course pages.
2011-01-03 23:21:44 +00:00
Tomasz Muras 936a0ae07e roles/assign MDL-24299 Fix back link
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-03 21:09:32 +00:00
Sergey Vidusov ebb32067bf MDL-25478 - stop fatal errors adding blocks on the module edit page
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-03 19:09:56 +00:00
Adam Olley adc3cfc744 calendar/lib.php MDL-25525 - Tooltip icons broken
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-03 18:26:50 +00:00
Dan Poltawski 03a50532be user/filters MDL-25657 Obsolete reference to timestart 2011-01-03 18:08:30 +00:00
Petr Skoda b095f16947 Merge branch 'MDL-25847' of git://git.luns.net.uk/moodle 2011-01-03 18:16:04 +01:00
Petr Skoda 89881a345b MDL-25589 removing extra align value 2011-01-03 18:08:44 +01:00
Petr Skoda e1ce9a6670 Merge branch 'MDL-25589' of git://git.luns.net.uk/moodle 2011-01-03 18:02:44 +01:00
Petr Skoda 6a81ececb3 Merge branch 'MDL-25808' of git://git.luns.net.uk/moodle 2011-01-03 17:59:53 +01:00
Petr Skoda 01f6035ea1 Merge branch 'MDL-25822' of git://git.luns.net.uk/moodle 2011-01-03 17:53:51 +01:00
Dan Poltawski 50542ff06a user/profile.php MDL-25847 - Missing library dependency 2011-01-03 16:49:30 +00:00
Dan Poltawski f8f384b5b4 coursereqest MDL-25589 set context 2010-12-30 15:56:35 +00:00
Dan Poltawski b5a49647e2 course/approval.php MDL-25589 Table misaligned 2010-12-30 15:52:52 +00:00
Dan Poltawski 85fd37d396 enrol/meta MDL-25808 - error when deleting metacourse
Using incorrect dmllib function & testing on non-existant courseid column
2010-12-30 15:10:32 +00:00
Dan Poltawski 9e202d38c8 statistics MDL-25822 Fix broken navigation 2010-12-30 12:42:50 +00:00
Dan Poltawski f9c2702ece statistics MDL-25822 Fix get_records_sql returning non-unique first column 2010-12-30 12:42:41 +00:00
Dan Poltawski 5b903967de statistics MDL-25822 multiple values in get_field_sql
A variety of get_field_sql calls returning multiple values, switched
to using MIN/MAX selects.
2010-12-30 10:30:07 +00:00
Tim Lock 6c7b6efcf6 courseoverview report MDL-25727 Graphs Broken
Typo preventing graphs from displaying

Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2010-12-30 09:50:21 +00:00
Petr Skoda c63ebd4311 weekly version 2010-12-29 17:48:42 +01:00
Petr Skoda 07f31e9f82 MDL-25813 fixed silly typo 2010-12-28 22:33:26 +01:00
Eloy Lafuente (stronk7) a3b474ffa0 Merge branch 'wip-MDL-25370' of git://github.com/sammarshallou/moodle 2010-12-27 17:55:35 +01:00
Eloy Lafuente (stronk7) 1ac3e1f208 Merge branch 'MDL-25720' of git://github.com/timhunt/moodle 2010-12-27 16:36:17 +01:00
Eloy Lafuente (stronk7) e5137f247e MDL-25341 blogs import - unused vars and mktime() fix 2010-12-27 16:20:39 +01:00
Eloy Lafuente (stronk7) b7c1da93ec MDL-25341 blogs import - minor whitespace clean 2010-12-27 15:56:58 +01:00
Eloy Lafuente (stronk7) e38610e4d4 Merge branch 'blog_MDL-25341_entry_sync' of git://github.com/andyjdavis/moodle 2010-12-27 15:55:14 +01:00
Petr Skoda bf97304ac3 Merge branch 'MDL-25596' of git://github.com/samhemelryk/moodle 2010-12-27 13:51:25 +01:00
Petr Skoda c81f657b4a MDL-22449 bumping major version to lang invalidate caches and fix phpdocs 2010-12-27 13:48:10 +01:00
Petr Skoda c03b6176a6 Merge branch 'm20_MDL-22449_wiki_help_buttons' of git://github.com/dongsheng/moodle 2010-12-27 13:44:54 +01:00
Petr Skoda 1310964bb3 Merge branch 'MDL-24860_messaging_providers' of git://github.com/andyjdavis/moodle
Conflicts:
	mod/lesson/version.php
2010-12-27 13:39:20 +01:00
Petr Skoda 8729e5999f Merge branch 'MDL-25321-R1' of git://github.com/samhemelryk/moodle 2010-12-27 12:46:01 +01:00
Petr Skoda 82517e2b78 Merge branch 'MDL-25749' of git://github.com/stronk7/moodle 2010-12-27 12:41:29 +01:00
Petr Skoda 554efaebae MDL-25682 bumping major version to invalidate JS caches 2010-12-27 12:39:40 +01:00
Petr Skoda e2bbe5ff7d Merge branch 'MDL-25682' of git://github.com/danpoltawski/moodle 2010-12-27 12:37:37 +01:00
Petr Skoda afaeb83ce1 MDL-25676 bumping version number to invalidate JS caches 2010-12-27 12:35:07 +01:00
Petr Skoda c72077c4ed Merge branch 'MDL-25676' of git://github.com/danpoltawski/moodle 2010-12-27 12:31:19 +01:00
Petr Skoda 1af9fd3879 Merge branch 'MDL-25761_data_portfolio' of git://github.com/mudrd8mz/moodle 2010-12-27 12:29:15 +01:00
Petr Skoda 9bb5a6f037 Merge branch 'MDL-25186_m20a' of git://github.com/rwijaya/moodle 2010-12-27 12:25:06 +01:00
Petr Skoda 3b8929e84b Merge branch 'MDL-25713_m2_recordset' 2010-12-27 12:05:22 +01:00
Petr Skoda c3b1c4f097 MDL-25713 fixing trailing whitespace 2010-12-27 12:04:26 +01:00
sam marshall f140ee3d17 accessibility MDL-24613 Fixed (sort of) bug with rtl languages 2010-12-27 11:43:08 +01:00
Petr Skoda 5221d1b569 Bumping to 2.0.1 2010-12-25 23:20:58 +01:00
andyjdavis 2948757873 blog MDL-25341 fixed 2 more whitespace issues 2010-12-24 09:31:58 +08:00
sam marshall cd092eceee cron MDL-25370 Update to use simpler api to get component directory 2010-12-23 10:32:42 +00:00
Sam Hemelryk 8ad24c1a44 navigation MDL-25596 Fixed whitespace issue 2010-12-23 16:55:52 +08:00
Sam Hemelryk 48d8d09063 navigation MDL-25596 Improvements for the navigation blocks JS
The biggest change is that the navigation block has been converted to a proper YUI module.
The following are the other changes made at the same time:
 * A loading icon is displayed when a branch is being loaded by AJAX.
 * Fixed a bug where you could trigger multiple AJAX requests by rapidly clicking an unloaded branch.
 * Fixed a bug where empty branches weren't being marked as such after a successful AJAX load.
 * When docked the width of the blocks dock panel is now inspected an increased if required to try avoid horizontal scrolling.
 * Removed the no longer needed inclusion of the YUI2 dom library from the navigation and settings block.
 * Expandable nodes are now passed as JS data allowing the navigation JS to be initialised through block_navigation::get_required_javascript.
 * AJAX is now focused around the branch in question rather than the tree in general.
 * Expansion of branches is now delegated to the tree rather than being an individual event on all branches.
 * Tidied up the code in general removing unneeded-unused parameters.
2010-12-23 11:21:07 +08:00
Sam Hemelryk 875851a195 dml-sqlserver MDL-25321 Changed bigint-1 to a variable and used that instead of the int 2010-12-23 11:01:12 +08:00
andyjdavis fc61acce12 gradebook MDL-25713 now closing the recordset even when theres a problem 2010-12-23 10:07:08 +08:00
Sam Hemelryk 35d19ea685 dml-sqlserver MDL-25321 Fixed limit_to_top_n function that was breaking badly. 2010-12-23 10:02:08 +08:00
Eloy Lafuente (stronk7) 4cf2e5d571 MDL-25749 dml - pgsql fix for integer-exclusive concats 2010-12-22 18:50:05 +01:00
Eloy Lafuente (stronk7) e8615eaf0e MDL-25749 dml - added integer-exclusive concat tests 2010-12-22 18:48:45 +01:00
Andrew Robert Nicols a8a44f2845 MDL-25682 Set the iconsmall class correctly on all section icons.
When using AJAX the icons are not styled correctly. I've taken out
all of the non-css style from the move icon since this is all covered
by the iconsmall and img classes anyway.

Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2010-12-22 15:23:07 +00:00
Andrew Robert Nicols 1a0d7bd785 MDL-25676 Add back missing test for editing_assign class
This had caused the assign roles button disappeared in AJAX view.

Note - this does not fix the issue with the cloned buttons being resized
(MDL-25682)

Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2010-12-22 14:51:03 +00:00
Tim Hunt 652599ecc3 MDL-25720 moodlelib new PARAM_RAW_TRIMMED.
Will be required by the new question engine.
2010-12-22 10:51:48 +00:00
Rossiani Wijaya 39f2bbf3fb MDL-25186: add environmental check to recommend PHP 5.3.3 2010-12-22 16:45:17 +08:00
Petr Skoda f056cb544d Updated the master build version 2010-12-22 08:29:03 +01:00
andyjdavis 694fb770b9 blog MDL-25341 removed another whitespace 2010-12-22 13:29:01 +08:00
andyjdavis c484c852f4 blog MDL-25341 removed some whitespaces inserted by netbeans 2010-12-22 13:27:46 +08:00
andyjdavis bb8a75e72d blog MDL-25341 fixed some whitespace issues 2010-12-22 13:24:55 +08:00
andyjdavis 54672f15b4 lesson MDL-24860 added mod/lesson/db/messages.php 2010-12-22 12:12:35 +08:00
andyjdavis d8f1412819 message MDL-24860 fixed messaging code in mod_lesson and marked spots that are directly sending email 2010-12-22 12:05:49 +08:00
Eloy Lafuente (stronk7) b739d51be6 MDL-25674 fix phpdocs 2010-12-21 19:19:35 +01:00
sam marshall e4a626b983 cron MDL-25370 Update Petr's changes to fix bug regarding lastcron, add comments/doc 2010-12-21 16:37:22 +00:00
Petr Skoda b554173562 MDL-25370 general cron support for nearly all plugin types 2010-12-21 15:18:29 +00:00
David Mudrak ee314f4019 MDL-25761 Database module: missing portfolio library inclusion
Portfolios are not officially supported in Database module yet. But this
missing library inclusion is a coding error because the class defined in
the library is already used in the code.
2010-12-21 10:40:19 +01:00
Petr Skoda ab12793355 Merge branch 'xhprof' of git://github.com/stronk7/moodle 2010-12-20 22:59:20 +01:00
Eloy Lafuente (stronk7) 6af80cae01 MDL-24600 profiling - add xhprof integration 2010-12-20 21:41:45 +01:00
Eloy Lafuente (stronk7) dde5bfbcf7 MDL-25178 glossary - add completionentries rule 2010-12-20 20:02:04 +01:00
Petr Skoda ab6e79718c Merge branch 'MDL-25632' of git://github.com/samhemelryk/moodle 2010-12-20 19:21:20 +01:00
Dongsheng Cai b72ca9f81a category editing MDL-21671 fixed deprecated function call, check capability when parent category changed 2010-12-20 19:03:14 +01:00
Dongsheng Cai 450498bff1 MDL-21671, site level categroy manage capability when edit category, credits to Vadim Dvorovenko 2010-12-20 19:03:14 +01:00
Eloy Lafuente (stronk7) 6fe79e7fba MDL-25656 glossary filter - make alias links to work 2010-12-20 18:25:50 +01:00
Tim Hunt d9c26e2174 blocklib MDL-25654 fix API inconsistency be renaming add_pretend_block to add_fake_block.
I added a deprecated method add_pretend_block that forwards to add_fake_block, so old code should be break. However, I aslo updated all the callers in core code.
2010-12-20 18:22:37 +01:00
Eloy Lafuente (stronk7) 958c04e450 Merge branch 'master' of git.moodle.org:/git/integration 2010-12-20 17:02:02 +01:00
Dongsheng Cai cc26cb3b33 MDL-10783, added span class and tag title 2010-12-20 17:00:34 +01:00
Dongsheng Cai 7b8b366218 Linking wiki pages to other moodle stuff by tag, and remove an unused function in wiki 2010-12-20 17:00:34 +01:00
David Mudrak 800bd78548 MDL-25647 mnet: fixed checkbox handling at peer services form
We must use advcheckbox here so that unticked checkbox is considered as
0 and not as not-submitted in this case.
2010-12-20 16:58:25 +01:00
Tim Hunt ccdd15962a MDL-25715 simpletestlib new expectations for testing renderer output.
With unit tests.
2010-12-20 16:24:23 +01:00
Tim Hunt 6cc09234be MDL-24060 text_to_html tests. Make sure alt text for LaTeX images doesn't break. 2010-12-20 15:01:43 +01:00
Petr Skoda 07cd46d84d MDL-25674 detection of invalid $user parameter when synchronising user enrolments 2010-12-20 14:41:18 +01:00
Petr Skoda c35ae13691 MDL-25674 forum must send full user record when setting up different session user in cron 2010-12-20 14:41:17 +01:00
Petr Skoda 5d6ab05435 MDL-25674 prevent modification of cached admin record 2010-12-20 14:41:17 +01:00
Eloy Lafuente (stronk7) 011c956ba1 Merge branch 'm20_MDL-14934_excel_time' of github.com:dongsheng/moodle 2010-12-20 12:21:21 +01:00
Rossiani Wijaya 81284044d8 Fix course ajax to be compatible with language packs. 2010-12-20 12:15:16 +01:00
Eloy Lafuente (stronk7) 94aff78e40 NOBUG: Some more testing of integration server 2010-12-20 12:05:16 +01:00
Sam Hemelryk d1b0cfa85e NOBUG: Testing the setup of the integration server 2010-12-20 18:23:53 +08:00
Dongsheng Cai b83f54f895 MDL-23930 fixed javascript insert into tinymce 2010-12-20 18:07:15 +08:00
andyjdavis 2f9ea7d78e gradebook MDL-25713 switched grade_object fetch_all_helper() over to using a recordset 2010-12-20 16:39:46 +08:00
andyjdavis 50ff50daaa blog MDL-25341 added removal of deleted external blog posts 2010-12-20 14:58:02 +08:00
andyjdavis cc52e53dd1 blog MDL-20617 adding checking for deleted blog posts 2010-12-20 11:16:11 +08:00
andyjdavis afce96f07b blog MDL-25341 updated external blog syncing code after peer review 2010-12-17 09:46:46 +08:00
andyjdavis 9829e3d8fa blog MDL-25341 made external blog syncronization not delete all previously retreieved blog posts 2010-12-16 16:21:41 +08:00
Dongsheng Cai 869bbb302b MDL-14934 fixed excel time in master branch, credits to Jonathon Fowler 2010-12-15 16:26:26 +08:00
Sam Hemelryk 86d99db3a0 mod-lesson MDL-25632 Fixed incorrect comment in matching question code. 2010-12-15 13:12:33 +08:00
Sam Hemelryk 26063f4b55 mod-lesson MDL-25632 Fixed bug where the number of attempts on a question for the current lesson attempt was being wrongly calculated. 2010-12-15 13:12:33 +08:00
Sam Hemelryk 981debb706 mod-lesson MDL-25632 Fixed bug whereby excess answers were being created when creating a page and then when updating it 2010-12-15 13:12:33 +08:00
Sam Hemelryk 1c510e2ee1 mod-lesson MDL-25632 Added support for displaying and progressing through a question page with no answers 2010-12-15 13:12:33 +08:00
Sam Hemelryk 36a60f0ff6 mod-lesson MDL-25632 Added upgrade code to correct page jumps for matching questions after Moodle 1.9 upgrade. 2010-12-15 13:12:33 +08:00
Sam Hemelryk 9170dea7d6 mod-lesson MDL-25632 Set a default jump to display when a question has no answers (after 1.9 upgrade) 2010-12-15 13:12:33 +08:00
Sam Hemelryk 2a03a824c4 mod-lesson MDL-25632 Fixed undefined var notice for responseformat in the lesson report. 2010-12-15 13:12:33 +08:00
Eloy Lafuente (stronk7) f4c23f03dc MDL-25609 frontpage combo list - avoid filter linking too much 2010-12-15 00:05:39 +01:00
Martin Dougiamas 88e5c58677 This is my last commit to CVS. Goodbye old friend - you've served us well. 2010-12-14 07:39:48 +00:00
Moodle Robot 602f1c10dd Updated the HEAD build version to 20101214 2010-12-14 00:51:53 +00:00
AMOS bot 430ecb29fc Automatic installer lang files (20101214) 2010-12-14 00:40:11 +00:00
Petr Skoda 2df1126b2d MDL-25663 debugging does not print html any more in CLI mode 2010-12-13 20:53:19 +00:00
Petr Skoda 883deb3eb5 MDL-25659 fixed borked creation of enrol instances enrol/database, fixed detection of misconfigured sync 2010-12-13 20:48:29 +00:00
Dongsheng Cai d92b5e7f01 mod-wiki MDL-22449 wiki module needs more help text 2010-12-14 02:43:17 +08:00
Petr Skoda 12c3ba99e7 MDL-25659 fixed overriding of fields variable and improved coding style in similar places
credit goes to Bill Johnson
2010-12-13 18:07:40 +00:00
sam marshall 546380244f cron MDL-25370 Added support for course report cron
- Adds support for course report cron
- Moves existing admin report cron support to end of cron function
- Adds new core API get_plugin_list_with_function

note: default shipping course and admin reports do not use cron
function, this is only to support plugins.
2010-12-13 13:00:44 +00:00
Andrew Davis 8d9db9e549 gradebook MDL-24330 unit tests now function differently so produce different results 2010-12-13 06:55:32 +00:00
Moodle Robot 8aba33660e Updated the HEAD build version to 20101213 2010-12-13 00:49:02 +00:00
Moodle Robot a49e07fbf7 Updated the HEAD build version to 20101212 2010-12-12 00:49:04 +00:00
AMOS bot 98a40ee4e2 Automatic installer lang files (20101212) 2010-12-12 00:40:09 +00:00
Moodle Robot e6d7ac56a0 Updated the HEAD build version to 20101211 2010-12-11 00:49:01 +00:00
AMOS bot 884b5e680a Automatic installer lang files (20101211) 2010-12-11 00:40:09 +00:00
David Mudrak 07f59c9049 NOMDL mnet: do not display 'All Hosts' in the Network servers block 2010-12-10 22:18:26 +00:00
Dongsheng Cai cd4559654d "MDL-25634 Filepicker upload should handle files which exceed max_post_size directive in php.ini" 2010-12-10 04:13:09 +00:00
Dongsheng Cai 1298a11935 "MDL-25633 Filepicker upload should display better error report" 2010-12-10 03:16:59 +00:00
Andrew Davis 2b574cc4e0 gradebook MDL-24330 massively reduced grade objects unit tests execution time so I can actually run them 2010-12-10 03:05:49 +00:00
Moodle Robot 25fa031fd8 Updated the HEAD build version to 20101210 2010-12-10 00:50:04 +00:00
AMOS bot e5b2142f7a Automatic installer lang files (20101210) 2010-12-10 00:40:09 +00:00
Eloy Lafuente 20d3bf6100 MDL-25418 glossary - fix incorrect LOWER() call also present in glossary import & entry export functionalities 2010-12-09 22:50:23 +00:00
David Mudrak fda6946eb2 MDL-22676 language customization: enlarge the input textarea fields
This patch combines the solution submitted by Ray Guo (computed
min-height) and the one used in AMOS (set the height of the textarea so
that it takes all available space in the row).
2010-12-09 11:48:55 +00:00
Petr Skoda 424d60d9c1 MDL-25623 fix incorrect use of DISTINCT on text fields 2010-12-09 11:02:53 +00:00
Petr Skoda a290625efb fixed incorrect progress bar name 2010-12-09 09:09:21 +00:00
Aparup Banerjee 000c881e98 lib MDL-25595 added dbport option handling to mssql connect() 2010-12-09 07:01:03 +00:00
Andrew Davis 323409c54c message MDL-25240 switched personal messages from FORMAT_PLAIN to FORMAT_MOODLE 2010-12-09 06:39:53 +00:00
Andrew Davis 4e226c99d5 message MDL-25240 add explanatory comment 2010-12-09 06:39:10 +00:00
Petr Skoda 3bcc53cd83 MDL-25607 respect visibility of news forum in the Latest news block 2010-12-09 06:23:18 +00:00
Aparup Banerjee bac1401534 lib MDL-25532 added dbport handling for during db creation 2010-12-09 06:18:20 +00:00
Petr Skoda 59186c92b3 MDL-25614 add missing group lib 2010-12-09 06:14:38 +00:00
Andrew Davis 77fb01833e rss MDL-25563 made the rss block unescape item URLs to prevent double escaping 2010-12-09 03:02:26 +00:00
Moodle Robot 026011c098 Updated the HEAD build version to 20101209 2010-12-09 00:49:16 +00:00
AMOS bot 90f4a864f7 Automatic installer lang files (20101209) 2010-12-09 00:40:09 +00:00
David Mudrak 7e514cd768 MDL-25619 portfolio: exported HTML output can not be cleaned 2010-12-08 23:20:04 +00:00
Helen Foster f085c3eccb MDL-21250 capital letters removal 2010-12-08 19:47:46 +00:00
Helen Foster 351d05ead4 MDL-21250 capital letters removal 2010-12-08 19:42:42 +00:00
Helen Foster 9825422e02 MDL-21250 capital letters removal 2010-12-08 19:34:47 +00:00
Helen Foster 600962e843 MDL-21250 capital letters removal 2010-12-08 19:16:17 +00:00
Helen Foster c8761a0b23 MDL-21250 capital letters removal 2010-12-08 15:37:34 +00:00
Helen Foster bbe6f6e113 MDL-21250 capital letters removal and greylisted string removal 2010-12-08 15:35:52 +00:00
Helen Foster e5a0920419 MDL-21250 capital letters removal 2010-12-08 14:34:03 +00:00
Helen Foster dcc5fd59f8 MDL-21250 capital letters removal also license info added 2010-12-08 11:01:20 +00:00
Helen Foster 6fa35f8aae MDL-21250 capital letters removal 2010-12-08 10:50:53 +00:00
Petr Skoda 3aa2fd20c0 MDL-25593 added missing filelib include
credit goes to Adam Olley
2010-12-08 08:15:21 +00:00
Petr Skoda 320e50b783 MDL-25472 support non-standard dir separators in zip archives and other anomalies 2010-12-08 08:08:45 +00:00
Petr Skoda 8d33799d46 MDL-25543 fixed borked preupgrade script support
credit goes to Chris B Stones
2010-12-08 07:51:00 +00:00
Petr Skoda 2168425a9e MDL-25611 more browser detection cleanup and improvements
general WebKit support, adding version support for android, fixing android browser name (engine name first), adding more tests
2010-12-08 07:39:58 +00:00
Petr Skoda 0667103514 MDL-25611 browser detection cleanup and improvements 2010-12-08 06:51:54 +00:00
Sam Hemelryk 82721a2f9f NOBUG: Fixed up annoying type in moodle_page @property list 2010-12-08 02:04:47 +00:00
Sam Hemelryk afc45eb160 navigation MDL-25578 Fixed up navbar when viewing categories. 2010-12-08 02:03:07 +00:00
Moodle Robot 668c450956 Updated the HEAD build version to 20101208 2010-12-08 00:49:40 +00:00
AMOS bot d57043de88 Automatic installer lang files (20101208) 2010-12-08 00:40:09 +00:00
Petr Skoda e67cfbd4c7 MDL-23733 Disable TinyMCE on iPod Touch and Android devices
Credit goes to Paul Nicholls
2010-12-07 15:49:57 +00:00
David Mudrak d1571da6c8 MDL-25068 forum: fixed error string usage
The string [cannotsubscribe,mod_forum] is supposed to be used for group
membership check only. I have fixed the two other usages of the string.
Note that the condition if (forum_subscribe()) was useless as the
function return true values only now after $DB conversion.
2010-12-07 12:34:35 +00:00
David Mudrak 9a3adb2032 NOMDL forum: fixed the string wording to match the current code condition
Previous string was used together with the legacy:guest capability.
However, the current code checks is_enrolled() instead. This led to a
weird situation when non-enrolled admin or manager could not subscribe
to a forum and the error message was completely confusing for them.
2010-12-07 12:34:11 +00:00
David Mudrak 99eb51d9e4 MDL-22114 forum: fixed PAGE url param set
I am pretty sure Sam overlooked this is in the commit afef965e
2010-12-07 12:33:24 +00:00
David Mudrak 95d28f044e MDL-25524 workshop: fixed random allocator removing current allocations
The bug was in filter_current_assessments() being applied before get_unkept_assessments()
so actually no current assessment records could be detected.
2010-12-07 11:39:50 +00:00
Tim Hunt 6eee65e4b5 deprecatedlib NOBUG fix typo. 2010-12-07 10:34:15 +00:00
Sam Hemelryk 0f229b906f output MDL-25597 Bumping version after the three new settings were added. 2010-12-07 08:50:18 +00:00
Sam Hemelryk 90e920c7f4 output MDL-25597 Added three new config settings that allow you to add additional HTML to every page. 2010-12-07 08:48:38 +00:00
Aparup Banerjee feaddca9e9 lib MDL-25532 added dbport option to mysqli driver 2010-12-07 07:30:35 +00:00
David Mudrak b876a003b4 MDL-25588 report_customlang: removed redundant safe path check
Only the $lang part of the the path comes from the browser and it is
checked in get_localpack_location() anyway.
2010-12-07 06:08:51 +00:00
Moodle Robot 2f698d2a0b Updated the HEAD build version to 20101207 2010-12-07 00:49:33 +00:00
David Mudrak ff7670e79b MDL-25582 Fixed inconsistence in FEATURE_MOD_INTRO evaluation 2010-12-06 16:07:31 +00:00
john St 162f4e19d9 fix for magazine theme MDL-25581 2010-12-06 16:00:16 +00:00
David Mudrak 44790d21ec MDLSITE-1162 .gitignore file for Moodle git mirror 2010-12-06 12:57:38 +00:00
Petr Skoda 365bf67699 MDL-25536 fixed incorrect reading of plugin options in imsenterprise enrol plugin 2010-12-06 05:52:55 +00:00
Sam Hemelryk 83da094204 NOBUG: Removed unused variable 2010-12-06 03:21:01 +00:00
Moodle Robot db7cab67c7 Updated the HEAD build version to 20101206 2010-12-06 00:54:02 +00:00
Dongsheng Cai 70cb0769d5 "COMMENTING MDL-25540 fixed bullet point displayed over user pics, credits to Davo Smith" 2010-12-05 18:44:01 +00:00
Dongsheng Cai a9f19d81b9 "DATA MODULE MDL-25564 fixed $PAGE->url, credits to Davo Smith" 2010-12-05 18:36:44 +00:00
Dongsheng Cai 7be06fa535 "MDL-25529 revert changes, it broke module instance creating page" 2010-12-05 18:01:33 +00:00
jerome mouneyrac 4a67d7c84d course MDL-25529 $introeditor not declared in some cases (=> it was displaying php notice when adding the official newmodule template) 2010-12-05 08:24:33 +00:00
Moodle Robot 70913ab324 Updated the HEAD build version to 20101205 2010-12-05 00:51:35 +00:00
AMOS bot ac952d6b87 Automatic installer lang files (20101205) 2010-12-05 00:40:09 +00:00
Helen Foster 90699ee515 removing backslash 2010-12-04 19:44:51 +00:00
Moodle Robot 183614cdde Updated the HEAD build version to 20101204 2010-12-04 00:53:41 +00:00
AMOS bot e59a0f862f Automatic installer lang files (20101204) 2010-12-04 00:40:09 +00:00
Pierre Pichet fe75941008 MDL-25535 Testing default values when editing numerical options 2010-12-03 14:57:30 +00:00
Aparup Banerjee 93b4ecb2cd enrol MDL-25522 removed extra redundant definition of field names in query causing oracle issues 2010-12-03 09:31:31 +00:00
Petr Skoda de2d81fad5 MDL-25459 removing option to set picture and tags in admin profile setup form, we can use these only after setup is finished 2010-12-03 05:26:17 +00:00
Moodle Robot de8a84e3e4 Updated the HEAD build version to 20101203 2010-12-03 00:49:18 +00:00
Helen Foster 4997ee5543 MDL-21250 capital letters removal 2010-12-02 21:48:04 +00:00
Helen Foster 1973cf9be8 MDL-21250 capital letters removal 2010-12-02 19:18:08 +00:00
Helen Foster f705b4347a MDL-21250 capital letters removal 2010-12-02 18:22:19 +00:00
David Mudrak d774e8171a MDL-25316 quiz_get_extra_capabilities() does not need to fetch subcapabilities explicitly 2010-12-02 16:51:52 +00:00
David Mudrak 61869c550f MDL-25316 capabilities defined in subplugins are available when overriding the module permissions 2010-12-02 16:51:41 +00:00
Helen Foster e6f6fa179b MDL-21250 capital letters removal 2010-12-02 16:48:22 +00:00
Helen Foster ae1790109d MDL-21250 capital letters removal 2010-12-02 16:18:41 +00:00
Helen Foster 7a35fe4ffd MDL-21250 capital letters removal 2010-12-02 15:42:24 +00:00
Sam Marshall 9ea98a6e15 local NOBUG Improved my settings example (probably typical usage) in local/readme.txt 2010-12-02 11:26:55 +00:00
Sam Hemelryk cf5a0dbdd4 course-reports MDL-24173 Course reports now use the report page layout + minor tweaks to the serenity theme. 2010-12-02 07:31:48 +00:00
Dongsheng Cai 75d138a312 "MDL-25497, fixed Non-JavaScript file uploader generates warnings, credits to Tim Lock" 2010-12-02 07:26:25 +00:00
Sam Hemelryk 480f906e25 block-navigation MDL-23838 There is now an option that you can enable so that categories in the navigation are links as well. 2010-12-02 07:13:07 +00:00
Aparup Banerjee 2282039660 search MDL-25153 fixed performance problem 2010-12-02 06:24:50 +00:00
Sam Hemelryk 57bedaeeea output-custommenu MDL-25447 Fixed up the processing of the custom menu removing the hard-coded single step down 2010-12-02 06:11:27 +00:00
Petr Skoda 621df74e00 MDL-25474 do not try to use caching for dynamic JS - it can not work 2010-12-02 05:46:09 +00:00
Petr Skoda 6d5b79c51d MDL-25474 do not use html editor for css and js editing 2010-12-02 05:35:26 +00:00
Sam Hemelryk 1ded6e1f69 theme-base MDL-25498 Fixed up z-index overlay issue with YUI3 custom menu. 2010-12-02 05:20:37 +00:00
Moodle Robot 669a26af48 Updated the HEAD build version to 20101202 2010-12-02 00:50:07 +00:00
Sam Marshall 2528fe1408 local NOBUG Added another settings example (probably typical usage) to the excellent documentation about local plugins 2010-12-01 17:48:58 +00:00
Helen Foster bea9531a78 MDL-25475 lang string update thanks to Inaki Arenaza and Angelo Pappano 2010-12-01 12:17:44 +00:00
David Mudrak 4b457a71cc MDL-25369 mnet: do not show deleted peers in the remote enrolment client 2010-12-01 10:00:18 +00:00
Eloy Lafuente 3e7d386625 MDL-25418 glossary - fixed and improved duplicate entries buggy queries 2010-12-01 09:23:18 +00:00
David Mudrak 9c5cafd6d7 NOMDL Fixed profile pictures size in the list of participants
Because the 'size' option was not specified, the renderer used the
default size 35 for both modes. Therefore, the f2.png profile picture
was used even though the detailed expects 100x100 pictures. With this
patch, both sizes are specified explicitly and do not rely on the
default value.
2010-12-01 08:53:05 +00:00
jerome mouneyrac ed2441128f webservice MDL-21658 add moodle_add_groupmembers, moodle_create_groups, moodle_delete_groupmembers, moodle_delete_groups unit tests 2010-12-01 08:20:52 +00:00
Sam Hemelryk 2138d893f8 output MDL-25445 Corrected standard_end_of_body_html, returns rather than echoes now as suggested by docs and use. Kudos Urs for spotting. 2010-12-01 06:04:05 +00:00
Moodle Robot 164768bbb6 Updated the HEAD build version to 20101201 2010-12-01 00:49:06 +00:00
Andrew Davis 0077f57198 gradebook MDL-16103 prevented outcomes in gradebook showing the same icon as the activity they are attached to as it makes them hard to find. 2010-11-30 09:03:43 +00:00
jerome mouneyrac e76e431c66 webservice MDL-21658 add moodle_group_get_groupmembers() and moodle_group_get_course_groups() unit test functions 2010-11-30 07:52:05 +00:00
jerome mouneyrac 3acb709515 webservice MDL-21658 add moodle_role_unassign() unit test function 2010-11-30 06:18:05 +00:00
jerome mouneyrac cae9c119c6 webservice MDL-21658 add moodle_role_assign() unit test function 2010-11-30 05:51:52 +00:00
jerome mouneyrac ceb1bad4ad webservice MDL-25444 indicate which field are unexpected in case of web service error 2010-11-30 01:55:17 +00:00
Moodle Robot a7a1dbd632 Updated the HEAD build version to 20101130 2010-11-30 00:52:28 +00:00
Helen Foster 9936e3b00f MDL-21250 capital letters removal 2010-11-29 16:23:19 +00:00
Helen Foster af842c4309 MDL-21250 capital letters removal 2010-11-29 16:03:59 +00:00
Helen Foster 5735fefc93 MDL-21250 capital letters removal 2010-11-29 15:49:58 +00:00
Helen Foster 2a1a268136 MDL-25426 typo fix 2010-11-29 15:39:10 +00:00
David Mudrak 95840a8e7b MDL-24939 block mnet_hosts now displays error message if the dependencies test fails
The site must be switch at least to DEBUG_NORMAL level and
$CFG->debugdisplay must be turned on. It helps administrators to detect
the problems in their MNet setups.
2010-11-29 13:44:28 +00:00
David Mudrak 0b5549de93 Workshop index page cleanup 2010-11-29 12:24:16 +00:00
David Mudrak 32a979e9a8 MDL-25436 workshop: fixed deprecated function call
Credit goes to Paul Ortman for the patch.
2010-11-29 12:23:42 +00:00
jerome mouneyrac a9f07c4130 webservice MDL-21658 add moodle_user_update_users() unit test function 2010-11-29 09:15:14 +00:00
Dongsheng Cai d2d1db7a84 "MDL-25406 WIKI, use swid instead of wid, gid, uid" 2010-11-29 08:30:15 +00:00
Dongsheng Cai 33ea845ab2 "MDL-25406 WIKI, fixed wid parameter" 2010-11-29 08:25:03 +00:00
Sam Hemelryk c89fa3fe4c mod-forum MDL-25386 Fixed up the navigation for the forum. 2010-11-29 06:27:22 +00:00
jerome mouneyrac d1d0788d47 webservice MDL-21658 add moodle_user_delete_users() unit test function + fix moodle_user_get_users_by_id unit test + add support of options for the SOAP client (important to force synchronous SOAP mode) 2010-11-29 06:26:38 +00:00
Sam Hemelryk c3863f0d56 theme-standardold MDL-25431 Fixed up a block header display issue in standardold ie6 and added readme file 2010-11-29 06:03:33 +00:00
Moodle Robot a7703e6aa3 Updated the HEAD build version to 20101129 2010-11-29 00:51:40 +00:00
AMOS bot 1aa620373c Automatic installer lang files (20101129) 2010-11-29 00:40:10 +00:00
Moodle Robot 382b132fdd Updated the HEAD build version to 20101128 2010-11-28 00:49:45 +00:00
AMOS bot ec87333479 Automatic installer lang files (20101128) 2010-11-28 00:40:08 +00:00
Moodle Robot 21505b1f7b Updated the HEAD build version to 20101127 2010-11-27 00:51:13 +00:00
AMOS bot 8c28461917 Automatic installer lang files (20101127) 2010-11-27 00:40:09 +00:00
Sam Marshall 3371ff92da Conditional activities MDL-24180 Change wording of 'accessible' dates to 'access', make a bit more consistent 2010-11-26 13:52:16 +00:00
David Mudrak b68af0358e MDL-21250 Fixed uppercase characters in blog strings 2010-11-26 11:13:58 +00:00
David Mudrak cfa11fd610 Fixed a string usage - no placeholder is expected here 2010-11-26 09:42:02 +00:00
David Mudrak 82c3f5d848 Do not record encrypted XML-RPC responses in error_log
Such an information is not readable anyway and it make debugging
actually harder. If somebody needs it, they can uncomment the line.
2010-11-26 09:20:28 +00:00
David Mudrak 42ae4ff290 MNet: fixed wrong column name in SQL cleanup code 2010-11-26 09:20:16 +00:00
David Mudrak ee4cd8f16d Prevent MNet error message when multiple records for the user are found in mnet_session table 2010-11-26 09:20:06 +00:00
David Mudrak 35d76df31d MDL-25367 user images are sent a received over MNet during SSO again 2010-11-26 09:19:55 +00:00
David Mudrak 13b78fda00 Profile fields to be synced via MNet now respect the 'use defaults' option 2010-11-26 09:19:44 +00:00
David Mudrak 19414fa47b Fixed trivial typo in a string 2010-11-26 09:17:43 +00:00
Sam Hemelryk ed6af5425c navigation MDL-25397 Converted use of can_edit_category to check capabilities instead. 2010-11-26 06:07:46 +00:00
Sam Hemelryk c55e1d2945 navigation MDL-25410 Fixed up marking of active item/items and fixed blog links on navigation so they only display for current user. 2010-11-26 06:04:59 +00:00
Petr Skoda b0b63da977 MDL-25400 user_created/updated events not generated at login 2010-11-26 02:36:09 +00:00
Moodle Robot bc8a69951a Updated the HEAD build version to 20101126 2010-11-26 00:51:36 +00:00
AMOS bot 4151217945 Automatic installer lang files (20101126) 2010-11-26 00:40:09 +00:00
Andrew Davis ae27608564 rating MDL-22412 removed references to legacy ratings tables 2010-11-25 06:40:27 +00:00
Dan Marsden a7ab614d3a SCORM MDL-25298 escape html vars correctly - thanks to Xavier Paz for report/fix 2010-11-25 01:32:03 +00:00
AMOS bot 683513daee Automatic installer lang files (20101125) 2010-11-25 00:40:09 +00:00
Piers Harding ef297a213d MDL-24738 - fix up height and width calculations for scorm player 2010-11-24 22:57:38 +00:00
Moodle Robot 4905617e40 Updated the HEAD build version to 20101125 2010-11-24 17:40:47 +00:00
Martin Dougiamas 64063ad95a Bump version number to 2.0! 2010-11-24 17:11:30 +00:00
Eloy Lafuente 77151075dc NOBUG: Changed to _sql() variant to properly use sql_compare_text(). Kudos to aparup for latest improvs. in where_clause() 2010-11-24 14:55:29 +00:00
Eloy Lafuente 636444e8b6 MDL-25019 backup - course_startdate may not exist 2010-11-24 10:46:15 +00:00
Tim Hunt f2956c9813 quiz editing MDL-25391 creating a new question and adding it directly to the quiz was broken.
Thanks to Chad Outten for finding this before it was too late, and skodak for the review.
2010-11-24 09:05:22 +00:00
Dongsheng Cai ad85f2629d "NOMDL, fixed wiki upgrade, credits to David Mudrak" 2010-11-24 08:50:29 +00:00
Andrew Davis 156205fc97 message MDL-25380 preventing html tags appearing in emailed messages when a message is sent to course participants 2010-11-24 04:17:52 +00:00
Petr Skoda a864e5ddc3 MDL-24699 fixed performance and other potential problems in update_user_record 2010-11-24 02:52:26 +00:00
jerome mouneyrac 08509f0a6b webservice MDL-25389 Add some information about web service into the local/readme.txt 2010-11-24 02:14:45 +00:00
Sam Hemelryk 48561e1b94 weblib MDL-25390 Minor fix of incorrect use of moodle_url object 2010-11-24 02:08:30 +00:00
Moodle Robot 79007ae74c Updated the HEAD build version to 20101124 2010-11-24 00:50:39 +00:00
Andreas Grabs f42f567afc MDL-25384 - the file mod/feedback/easy_excel.php is not used anymore 2010-11-23 18:07:11 +00:00
Andreas Grabs 51c49cc056 MDL-25375 - mod/feedback/complete.php throws exception if email notifications are enabled 2010-11-23 17:56:24 +00:00
Tim Hunt 423b992ee3 quiz editing MDL-25374 recent change broke JS on the order and paging tab. 2010-11-23 09:56:14 +00:00
jerome mouneyrac 820b42c57b webservice MDL-25323 clean get_ws_authorised_usersget_ws_authorised_users from obsolete code 2010-11-23 09:16:34 +00:00
Moodle Robot b14e97df82 Updated the HEAD build version to 20101123 2010-11-23 00:49:25 +00:00
AMOS bot 9003aed803 Automatic installer lang files (20101123) 2010-11-23 00:40:09 +00:00
Andreas Grabs 794cc28da9 MDL-25363 - Regression in feedback module show_entries.php 2010-11-22 19:48:52 +00:00
Sam Hemelryk ca787a923f navigation MDL-25364 Fixed up AJAX loading for guest users within a course. 2010-11-22 10:19:39 +00:00
Tim Hunt 94dbfb3a82 quiz editing MDL-24750 The Add random button should also let you add questions from an existing category.
Also includes a fix for MDL-24749 by Sam Hemelryk. Thanks Sam.

This commit also includes a certain amount of code cleaning up.
2010-11-22 09:52:42 +00:00
Andrew Davis d2e66a60a0 gradebook MDL-25358 improved validation of scales 2010-11-22 05:52:13 +00:00
Sam Hemelryk c96c3b7dbe calendar MDL-25302 Fixed typo in calendar language pack. Thanks Bente for spotting. 2010-11-22 05:41:23 +00:00
Sam Hemelryk c8ffba95b0 course MDL-24595 Fixed expand all collapse all links on front page. 2010-11-22 05:35:39 +00:00
Sam Hemelryk 1b32bc234a categories MDL-24936 Added turn editing on/off links to the category settings in the settings block 2010-11-22 05:31:46 +00:00
Pierre Pichet 79b067e911 MDL-25362 adding isset() line 2292 2010-11-22 04:25:53 +00:00
Dongsheng Cai 7cb854fe60 MDL-25331, fixed comment javascript 2010-11-22 02:20:05 +00:00
Andrew Davis 536a56e771 message MDL-25359 now specifying message recipient in IM email notification footer link to avoid weirdness on servers with autologin as guest turned on 2010-11-22 01:44:10 +00:00
Moodle Robot bcf6d8f0f8 Updated the HEAD build version to 20101122 2010-11-22 00:52:56 +00:00
AMOS bot aeef24f64c Automatic installer lang files (20101122) 2010-11-22 00:40:10 +00:00
Pierre Pichet a3130f2cf7 MDL-25353 Correcting lang string 2010-11-21 04:55:25 +00:00
David Mudrak d6f50ce6d1 portfolio: fixed email body text so that html body matches the plain text version 2010-11-21 01:13:33 +00:00
David Mudrak 3278dfeb5f MDL-21250 fixed capitalized words and redundant spaces 2010-11-21 01:13:15 +00:00
Moodle Robot e3f031dcb0 Updated the HEAD build version to 20101121 2010-11-21 00:52:22 +00:00
David Mudrak 5b2b977db7 MDL-21250 capitalized words in core_question 2010-11-20 20:38:31 +00:00
David Mudrak 432ef80368 Fixed the error string wording 2010-11-20 19:38:23 +00:00
Petr Skoda c4cef1fe39 MDL-25314 weaker misconfiguration detection
seems like there are too many problems in buffer flushing in different PHP/browser configurations; flushing the buffers after all headers are sent, this is the safest way
2010-11-20 11:39:11 +00:00
Petr Skoda 116ee3e433 MDL-25314 coding style improvement 2010-11-20 03:56:34 +00:00
Petr Skoda 596c71156d MDL-25314 some more header diagnostics when preparing to send file 2010-11-20 03:55:53 +00:00
Petr Skoda 871ed45870 MDL-25314 adding some header/session related notes 2010-11-20 03:49:20 +00:00
Petr Skoda 5e21cac896 MDL-25336 fixed &amp; in mod/url and fixed incomplete click url when embedding 2010-11-20 03:17:19 +00:00
Petr Skoda 56e507b2ee MDL-25335 prevent errors when invalid format specified in resource text page 2010-11-20 02:51:26 +00:00
Petr Skoda 6c796bb6bd MDL-25338 optional param: newcourseidnumber is treated like required param resulting in logic error, credit goes to Nick Thompson 2010-11-20 02:27:34 +00:00
Petr Skoda 3338a72fa0 MDL-25337 fixed invalid config test in enrol course sync, credit goes to Nick Thompson 2010-11-20 02:24:05 +00:00
Moodle Robot db9701d901 Updated the HEAD build version to 20101120 2010-11-20 00:58:40 +00:00
Eloy Lafuente 6bfe81293f MDL-25268 dml - change whitespace capture in limitfrom/limitnum regexp. Fixes some border cases 2010-11-20 00:49:01 +00:00
AMOS bot a5c55a58c2 Automatic installer lang files (20101120) 2010-11-20 00:40:10 +00:00
Eloy Lafuente 8be6dfcc4a MDL-25340 external blof - fix problem with extra tags processing 2010-11-19 23:58:53 +00:00
Dan Marsden 1ed0a96c28 SCORM MDL-25320 removes spaces from children patterns - thanks to Ian Wright for report 2010-11-19 23:35:12 +00:00
Eloy Lafuente a742eb1f8b MDL-25340 external blog - fix sql_compare_text() use 2010-11-19 21:57:15 +00:00
Eloy Lafuente 296f6c99b1 NOBUG: moodle/blog:manageexternal is SYSTEM cap, not USER at all 2010-11-19 18:25:27 +00:00
Eloy Lafuente 33a87f14c6 NOBUG: Add one missing cap. definition string 2010-11-19 17:45:38 +00:00
Sam Marshall b09b6ed8dd MDL-25301 'Upload this file' button should not have ... 2010-11-19 16:27:30 +00:00
Tim Hunt 06f1bd03be question XML import/export MDL-18916 Fix import of questions with images exported from Moodle 1.9.
Thanks again to Patrick Pollet
2010-11-19 14:24:18 +00:00
David Mudrak ae440dec90 Fixed string typo 2010-11-19 13:28:56 +00:00
David Mudrak 072e9d9a39 TinyMCE tool to generate upstream pack to be imported into AMOS
I have tweaked Petr's script so that now it generates files in a
suitable format for importing into AMOS.
2010-11-19 13:04:26 +00:00
Tim Hunt 4f2900771d question XML import/export MDL-18916 should include question tags. 2010-11-19 12:33:48 +00:00
Tim Hunt 4ec6d4e692 question export NOBUG delete obsolete code. 2010-11-19 12:16:23 +00:00
Tim Hunt fe857668d4 NOBUG whitespace fixes. 2010-11-19 12:13:59 +00:00
Tim Hunt 6680966c84 qtype_multichoice MDL-25208 another problem with editing.
Thanks to Patrick Pollet for spotting this.
2010-11-19 11:36:15 +00:00
Tim Hunt b81653e0af question export MDL-25324 Better file names for question exports - argh! missed lang stings
Grr!
2010-11-19 11:11:33 +00:00
Tim Hunt 87214c4e89 question export MDL-25324 Better file names for question exports - argh! missed lang stings
AMOS BEGIN
 MOV [exportfilename,mod_quiz],[exportfilename,core_question]
 MOV [exportnameformat,mod_quiz],[exportnameformat,core_question]
AMOS END
2010-11-19 11:11:19 +00:00
Tim Hunt b80d424c50 question export MDL-25324 Better file names for question exports. 2010-11-19 11:02:28 +00:00
Tim Hunt 5b744492a6 gift import/export MDL-25088 another attempt at fixing it, this time with unit tests. 2010-11-19 10:27:29 +00:00
Andrew Davis 94263cca87 quiz MDL-25297 fixing quiz messaging issues 2010-11-19 09:50:12 +00:00
Tim Hunt a5e8e6e5de qtype multicoice xml export MDL-25208 / MDL-25104 revert incorrect change in qtype_multichoice and do a proper fix in XML export. 2010-11-19 09:35:54 +00:00
jerome mouneyrac ceac2af394 registration MDL-25322 fix average participant and module display (only two digital) 2010-11-19 09:23:12 +00:00
Helen Foster dc084e42f9 MDL-25305 typo fix 2010-11-19 09:22:24 +00:00
Petr Skoda 6e65fcd9b9 trying to work around gzip issue 2010-11-19 08:51:49 +00:00
Aparup Banerjee 70b082fa6d wiki MDL-24862 fixed wiki upgrade error (tested for mssql and mysql) 2010-11-19 08:36:49 +00:00
jerome mouneyrac 05d7a48dc5 registration MDL-25322 fix average participant and module display (only two digital) 2010-11-19 08:34:20 +00:00
Andrew Davis 235da58d8c quiz MDL-25297 fixed erroneous inline comments 2010-11-19 08:18:48 +00:00
Dongsheng Cai 2c5b8e8ea3 "MDL-25104, fixed answernumbering parameter" 2010-11-19 08:08:39 +00:00
Dongsheng Cai 49550e4964 "MDL-24862 revert previous change, sub query works better" 2010-11-19 07:43:13 +00:00
Andrew Davis f8df6aebcf blog MDL-25318 fixed an sql error in blog_delete_external_entries() 2010-11-19 07:38:29 +00:00
Sam Hemelryk 6117bd9780 theme-formal_white MDL-25090 Further tweaking of region-pre-layout 2010-11-19 07:16:41 +00:00
Andrew Davis c02f338e5e rss MDL-25319 replicating my optimization made to forum rss in glossary rss and database rss 2010-11-19 06:56:23 +00:00
Martin Dougiamas e3c21e8c13 Fixing a string 2010-11-19 06:46:19 +00:00
Andrew Davis c05ccf3fa7 rss MDL-25319 removing unnecessary call to isguestuser() 2010-11-19 06:39:00 +00:00
Andrew Davis da8ae44ead rss MDL-25319 adding a check to avoid some work if the same rss feed is requested repeatedly 2010-11-19 06:33:38 +00:00
Aparup Banerjee bb7603e900 wiki MDL-24862 fixed the upgrade code breaking in mssql. 2010-11-19 06:10:33 +00:00
Sam Hemelryk dbfcdb80c5 theme-formal_white MDL-25090 Fixed up positioning on side-pre-only layouts in formal white. 2010-11-19 05:53:14 +00:00
Andrew Davis bc68fc9a9b message MDL-25297 refactored quiz to make message notifications work 2010-11-19 05:18:34 +00:00
Sam Hemelryk 060cd0c887 course MDL-25269 Fixed up module/resource indentation on the course view page. Now uses div margins rather than spacer images. 2010-11-19 04:02:21 +00:00
Dan Marsden 32944e8d54 CHOICE MDL-24102 remove unused var - which should never be used anyway as it isn't cleaned!! 2010-11-19 03:42:33 +00:00
Petr Skoda cbad562eee MDL-25314 improved prevention of output buffering + detection of misconfigured servers
Scripts that do not want buffered output just define NO_OUTPUT_BUFFERING before including config.php.
The fileserving code now checks if the headers are already sent which detects misconfigured servers.
2010-11-19 03:40:43 +00:00
Dan Marsden 6e4453f5f8 CHOICE MDL-24102 use correct url in form submission 2010-11-19 03:23:14 +00:00
Dongsheng Cai cece1791b0 MDL-23929 WIKI, fixed has_capability parameter 2010-11-19 02:59:10 +00:00
Sam Hemelryk 7a534d7a5c mod-data MDL-25281 Removed format_text call that we messing up database entries. 2010-11-19 02:58:42 +00:00
Dan Marsden e076641f77 CHOICE MDL-24102 fix tabs in code 2010-11-19 02:57:35 +00:00
Sam Hemelryk edf577d2cd backup-cancel MDL-25244 Added missing YUI module requirement 2010-11-19 02:51:07 +00:00
Dan Marsden f51d388c78 CHOICE MDL-24102 fix lang string 2010-11-19 02:48:39 +00:00
Sam Hemelryk a467d243f9 navigation MDL-25317 Fixed scroll issue and ajax expansion bug within the navigation JS 2010-11-19 02:41:05 +00:00
Dongsheng Cai 134d38ff18 MDL-22553, fixed wiki upgrade sql to running on sql server 2010-11-19 02:30:00 +00:00
Sam Hemelryk 653bc47ff2 mod-forum MDL-25299 Fixed up whitespace issue in forum lib 2010-11-19 01:57:23 +00:00
Petr Skoda 27466303d9 MDL-25314 getting rid of @ hiding error
We were using these because we added them in stable and did not want to risk any regression, in the long term it is better to show all errors caused by random PHP restrictions introduced by shared hosting admins.
2010-11-19 01:39:30 +00:00
Moodle Robot 193795b61f Updated the HEAD build version to 20101119 2010-11-19 00:53:57 +00:00
AMOS bot 906010b864 Automatic installer lang files (20101119) 2010-11-19 00:40:09 +00:00
Tim Hunt 26f09e62e7 qtype multichoice MDL-25208 and another problem with saving Multiple choice questions. 2010-11-18 23:43:12 +00:00
Tim Hunt 679f7963cf qtype_multichoice MDL-25208 fix my earlier screw-up 2010-11-18 22:39:09 +00:00
Tim Hunt d744fc392a quiz NOBUG improve a comment. 2010-11-18 22:38:50 +00:00
Eloy Lafuente 295474bda9 MDL-25310 backup - Bump! 2010-11-18 21:35:40 +00:00
Eloy Lafuente cbb9e9b8b4 MDL-25310 backup - some minor tasks related to cleaning/old options 2010-11-18 21:34:01 +00:00
Tim Hunt 49da759b30 qtype_multichoice MDL-25208 problem with editing. 2010-11-18 17:59:23 +00:00
David Mudrak 63e859f59f Fixed capability names 2010-11-18 16:13:39 +00:00
john St 2184f7a740 Formfactor theme custom menu style fixes, MDL-25213 2010-11-18 15:30:39 +00:00
john St cea441e856 fix for Arialist theme submenu arrow, MDL-25211 2010-11-18 14:55:14 +00:00
john St c7a90e1069 Overlay theme fix for MDL-25214 2010-11-18 14:48:42 +00:00
David Mudrak fc2b54691a Removing obsolete permission explanation strings 2010-11-18 14:06:57 +00:00
Eloy Lafuente 39cf0e8e74 MDL-24863 unit tests - tidy up a bit some tests 2010-11-18 14:02:02 +00:00
David Mudrak 3b8b116ec3 Removing legacy hidden role assignment strings 2010-11-18 13:56:49 +00:00
David Mudrak 29ec4d26ff Fixed the anchor of Show parent link in the Forum
The anchor link led to the post itself instead of to the parent.
2010-11-18 12:47:24 +00:00
Dongsheng Cai 2675ca53f4 MDL-25104, fixed answertext in mulitchoice questoin type 2010-11-18 07:35:27 +00:00
Andrew Davis 35eed0ca48 message MDL-25267 improved the test for Jabber configuration 2010-11-18 07:17:19 +00:00
Sam Hemelryk 92f3345773 backup MDL-25283 Fixed regression in restore by adding destroy method to independent restore stages. 2010-11-18 07:09:09 +00:00
Andrew Davis 0d447fe634 message MDL-25264 removed another reference to $USER 2010-11-18 07:05:47 +00:00
Petr Skoda 9ecf4f44e4 fixing regression in the last commit 2010-11-18 06:26:27 +00:00
Petr Skoda de542ff813 NOBUG explaining why textlib sorting fails 2010-11-18 06:14:59 +00:00
Aparup Banerjee 011bfd2a54 database MDL-24863
- added restricting text conditions to where_clause , it throws a dml_exception when detected.
- also added to where_clause throwing dml_exception for field that doesn't exist in table.
- added unit tests for text condition restricting.
- added 2 unit tests for set_field_select() testing 'auto-casting params to int problem' fix
2010-11-18 06:00:51 +00:00
Andrew Davis fa8f03efbb message MDL-25264 made it possible to edit another user's message preferences 2010-11-18 05:28:51 +00:00
Andrew Davis 861fa9120d message MDL-25267 made jabber processor detect if it hasnt been configured 2010-11-18 02:59:23 +00:00
Sam Hemelryk 0b4cede202 NOBUG: Added missing backup message provider string 2010-11-18 02:54:46 +00:00
Andrew Davis c40cfb8cfc message MDL-25265 message_send() now uses a success flag rather than returning false immediately if a processor fails to prevent a single bad processor preventing others from running 2010-11-18 02:19:59 +00:00
Sam Hemelryk 44bb101dfe backup MDL-24962 Backup, Restore, and Import all now explicitly destroy the UI, controller, and stage objects upon completion. 2010-11-18 02:09:23 +00:00
Andrew Davis 696b250217 gradebook MDL-25238 made things line up in IE and Safari with static student columns enabled 2010-11-18 01:56:16 +00:00
Sam Hemelryk ca1292e014 backup MDL-24962 Automated backups now explicitly destroy the backup controller created at the end of a backup for a course. 2010-11-18 01:35:16 +00:00
Eloy Lafuente 9882b2c824 MDL-25276 dml - fix/implement sql_cast2int/real() across the 5 drivers. Tests passing. 2010-11-18 01:27:49 +00:00
Eloy Lafuente a018adf038 MDL-25276 dml - completed sql_cast_char2int/real tests to reveal some problems 2010-11-18 01:10:41 +00:00
Inaki 40293947bb auth/cas: MDL-25062 CAS authentication plugin does not validate the CAS server certificate
If we enable the server validation but don't specify a certificate file path
flag the error and don't let the user save the settings.
2010-11-18 00:57:06 +00:00
Moodle Robot 1a92193c7f Updated the HEAD build version to 20101118 2010-11-18 00:48:15 +00:00
AMOS bot 293d6a11da Automatic installer lang files (20101118) 2010-11-18 00:40:09 +00:00
Inaki 387d1dc0d5 auth/cas: MDL-25062 CAS authentication plugin does not validate the CAS server certificate
The CAS protocol security model requires that you verify the cas server
certificate before you trust the answer (valid authentication and username
etc.).

Credit goes to Joachim Fritschi for reporting it and providing a patch.
2010-11-18 00:12:23 +00:00
Eloy Lafuente 80c2a742b6 MDL-21437 data - fixed navigation from list to single 2010-11-17 21:47:08 +00:00
Eloy Lafuente 6e6878b5ec MDL-21437 data - fixed the sort by fuctionality to be cross-db for all fields 2010-11-17 21:18:53 +00:00
Eloy Lafuente be4d5a927b MDL-21437 data - latlong, menu, radiobutton, text, textarea, url 2010-11-17 19:27:47 +00:00
Eloy Lafuente 15a182827f MDL-21437 data - checkbox and multimenu fields search working + require all too 2010-11-17 19:13:26 +00:00
Eloy Lafuente 1675129e35 MDL-21437 data - number and date fields search under mssql and oracle 2010-11-17 17:54:00 +00:00
Eloy Lafuente eca891267c MDL-21437 data - latlong, radio menu and multimenu now working under sqlserver & oracle 2010-11-17 16:57:56 +00:00
David Mudrak 05e7fca43f Yet another string using proper placeholder in Javascript 2010-11-17 12:44:17 +00:00
Petr Skoda e98a39260a NOBUG standardising prevention of output buffering
we should really add some new define before the config.php inclusion soon
2010-11-17 12:25:36 +00:00
Eloy Lafuente b9e8c6a6f2 NOBUG: I hate the shut-up operator, really! 2010-11-17 11:02:32 +00:00
Eloy Lafuente 3a55ee2f5e MDL-25268 dml - improved limitnum/limitfrom regexp in ms drivers + tests 2010-11-17 10:39:56 +00:00
Dongsheng Cai d4800079b7 MDL-22898, fixed wiki preview 2010-11-17 09:41:25 +00:00
Dongsheng Cai 6f1b029b6f MDL-22449, improve wiki help info 2010-11-17 09:04:46 +00:00
jerome mouneyrac d4f866ea5f community block MDL-25262 improve hub listing css 2010-11-17 09:03:26 +00:00
Dongsheng Cai af857b05c2 MDL-25250, fixed php coding error in wiki module 2010-11-17 08:43:16 +00:00
Dongsheng Cai 1d5bd3d2ed MDL-24941, fixed nopermission error when student entering scheduled chat session 2010-11-17 07:56:40 +00:00
jerome mouneyrac 5bf725440c registration MDL-25261 trivial confirmation regitration page improvement 2010-11-17 07:53:10 +00:00
Aparup Banerjee 08d3898c7c installation MDL-24863 fixed area that is calling get_site() to catch dml_exception instead of dml_read_exception. (This is to handle other possible types of dml_exceptions during calling get_site()) 2010-11-17 07:40:48 +00:00
Aparup Banerjee 4f8b9632f8 database MDL-24863 applied fix like MDL-23997 which converts number to string. 2010-11-17 07:36:02 +00:00
Sam Hemelryk 49084fe104 NOBUG: Fixed up docs 2010-11-17 07:04:02 +00:00
Sam Hemelryk e99033b059 NOBUG: Documenting CFG->extramemorylimit within config-dist 2010-11-17 06:57:22 +00:00
Andrew Davis 2846b9a6a2 message MDL-25240 made filters work when displaying messages 2010-11-17 06:36:26 +00:00
Andrew Davis affefa8cc3 message MDL-25240 corrected index.php's description 2010-11-17 06:34:59 +00:00
Petr Skoda 516c5eca68 MDL-24698 hopefully fixed all completion_info problems 2010-11-17 06:23:56 +00:00
Petr Skoda 2c0b6ab223 MDL-23610 increasing version number to trigger environment test 2010-11-17 03:52:05 +00:00
jerome mouneyrac cbe80ba5c3 community block MDL-25256 fix hub description on the search form (previous hub description was assigned to the following) 2010-11-17 03:29:35 +00:00
Sam Hemelryk 9a424c711e navigation MDL-25247 Fixed regression in the navigation. 2010-11-17 02:20:05 +00:00
Petr Skoda cd4f18595a MDL-23610 finally fixed the broken utf8 detection in mysqli driver
this was actually causing tons of false reports because people are often creating the database without the encoding parameter, especially when testing upgrades
2010-11-17 01:58:38 +00:00
Moodle Robot e53162b9d2 Updated the HEAD build version to 20101117 2010-11-17 00:48:28 +00:00
AMOS bot 87b28cb7dc Automatic installer lang files (20101117) 2010-11-17 00:40:13 +00:00
David Mudrak 416b3d8110 Fixed trivial typo in enrolment string 2010-11-16 18:25:28 +00:00
David Mudrak 049e880cce AJAX enrolment uses proper {$a} placeholder
We now have M.util.get_string() that should be used instead of custom
replacement. Otherwise the placeholder is not detected in AMOS
web translator.
2010-11-16 18:02:14 +00:00
David Mudrak 2246f9f6bd Fixed typo in the capability name 2010-11-16 17:36:01 +00:00
Helen Foster 77d9f6143d MDL-22449 wiki lang string polishing plus adding link strings 2010-11-16 16:59:00 +00:00
Pierre Pichet b800dc1990 MDL-25194 setting 'returnurl' and removing display of correctanswerfeedback... , left these only on calculatedmultichoice 2010-11-16 15:53:11 +00:00
Pierre Pichet f9ce698969 MDL-25194 removing display of correctanswerfeedback... , left these only on calculatedmultichoice 2010-11-16 15:50:50 +00:00
Pierre Pichet f065391d6d MDL-25194 settig 'returnurl' 2010-11-16 15:47:42 +00:00
Tim Hunt 341be301fc theme MDL-22492 / MDL-25204 hack it so that help popups never appear under other things. 2010-11-16 14:09:39 +00:00
David Mudrak 45e8775911 MDL-13379 mnet: course overview at my home page displays remote courses, too
The patch submitted by Hubert Chathi. I just changed it a bit to use
moodle_url instead of string URLs and to use s() instead of format_string()
when putting the course fullname into title="" attribute value.
2010-11-16 13:40:34 +00:00
Petr Skoda 43206af618 MDL-25235 fixed param type for OS paths
paths to executable are not PARAM_TEXT, we have to use PARAM_RAW there + whitespace fixes
2010-11-16 10:27:00 +00:00
Sam Hemelryk 1d67258eb9 mod-forum-search MDL-25239 Fixed double encoding of the search param during pagination 2010-11-16 09:00:47 +00:00
jerome mouneyrac 9d1b6ea35c webservice MDL-25195 fix web service admin pages navigation bar/navigation 2010-11-16 07:45:31 +00:00
Pierre Pichet f5382dd25e MDL-25194 replace protected options of default_question_type by public optionsa defined in calculated.
the same parameter is used in calculatedsimple and caculatedmulti which extends question_calculated_qtype
2010-11-16 03:43:54 +00:00
jerome mouneyrac 0c92f1138f publication MDL-25221 destroy backup controller once backup is done. 2010-11-16 03:04:40 +00:00
Dan Marsden 2004f2eef0 SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 01:03:56 +00:00
Dan Marsden 5c58d55a4d SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 01:02:17 +00:00
Dan Marsden a4347c6937 SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 00:56:24 +00:00
Dan Marsden 70e3605358 SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 00:49:37 +00:00
Moodle Robot e5228e541a Updated the HEAD build version to 20101116 2010-11-16 00:49:07 +00:00
Dan Marsden 72ef83b9ab SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 00:21:59 +00:00
Dan Marsden 020f27dbfb SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 00:19:41 +00:00
Dan Marsden 522aafc73b SCORM MDL-24273 fix typo in SCORM 2004 code 2010-11-16 00:16:56 +00:00
David Mudrak b0f5d070e7 MDL-23978 portfolio: do not cleanup images with portfolio URI scheme
The problem was in the order of the content preparing. Now when the
filters are always skipped (they have to) we must always run
format_text() first. That will prepare nice HTML in which we just
rewrite the portfolio URIs.
Note that we are still calling clean_text() so that we do not export
malicious code for portfolios like File download. In the future, this
may be changed, made format specific or even per-export configurable.
As a side product of the patch, I have re-enabled online assignment
portfolio export and switched $options->para to false consistently.
2010-11-15 22:59:06 +00:00
Helen Foster fca0c7b9af MDL-25205 help string improvement 2010-11-15 20:47:07 +00:00
Tim Hunt 8b1e050bd0 qtype multichoice MDL-25208 Saving questions was broken. 2010-11-15 17:17:48 +00:00
Eloy Lafuente f81f513325 MDL-25161 restore - keep course->numsections unmodified 2010-11-15 17:10:11 +00:00
Tim Hunt 16cad79ba9 quiz editing MDL-25205 help for the order and paging page. 2010-11-15 17:00:38 +00:00
Tim Hunt 6577832390 quiz reports MDL-25206 Make it more obvious how to review the students responses. 2010-11-15 16:41:42 +00:00
David Mudrak c0b7391d0b report_customlang: regenerate foreign key after recent tables rename
Thanks to Tim Hunt for spotting this overlooked key definition.
2010-11-15 16:13:06 +00:00
Eloy Lafuente 8231bb159b MDL-24962 backup - clean plan/settings circular refs on restore 2010-11-15 16:08:02 +00:00
Eloy Lafuente 32df07b4c3 MDL-24959 glossary_random - render images in picked entries properly 2010-11-15 15:46:14 +00:00
Tim Hunt 9dd460390c question import MDL-25200 was ignoring the category specified in the file. 2010-11-15 15:27:24 +00:00
Eloy Lafuente 3b953472ac MDL-25227 glossary - fix delete_instance() and clean orphaned entries 2010-11-15 15:16:57 +00:00
David Mudrak f3cc571af2 MDL-25225 forum: fixed discussion control layout
The display mode selector is supposed to display in the middle of the
row. Move discussion selector should be on the right, portfolio export
selector on the left. Thanks Sam Marshall for the report and testing the
patches.
2010-11-15 14:18:24 +00:00
Pierre Pichet ab152de445 MDL-25192 and MDL-25194 import and saving images using instructions ['files'] array 2010-11-15 14:14:43 +00:00
Pierre Pichet dec3f2128b MDL-25192 editing and saving instructions image usng question->id 2010-11-15 14:09:19 +00:00
Helen Foster ca6dd3edc5 MDL-24405 reverting lang strings thanks to Chris Collman for review 2010-11-15 12:19:37 +00:00
Sam Marshall 15e48a1a49 Forum MDL-25170 Discussion move feature should have button so you don't do it by accident (again) 2010-11-15 10:41:26 +00:00
David Mudrak afe38b79c6 MDL-21657 fixed regression in function call after its API change
The API of the function forum_print_posts_threaded() was changed in
63e87951e6 but this call was not updated.
This led to not displaying other replies when replying to a forum post.
2010-11-15 10:02:44 +00:00
Andrew Davis 112fdf4792 gradebook MDL-25171 made it possible to deselect all grade items when exporting grades 2010-11-15 09:03:32 +00:00
jerome mouneyrac dafd2eb308 publication MDL-25040 fix ugly css (hub logo image has border) 2010-11-15 08:51:44 +00:00
jerome mouneyrac 6dfa3c07e8 publication MDL-25040 display hub information (logo - description - link) on the publication metadata page 2010-11-15 08:38:02 +00:00
Petr Skoda ddd11b6c78 MDL-25123 description of more hidden debug settings
credit goes to Matteo Scaramuccia
2010-11-15 08:05:02 +00:00
Petr Skoda 8082d3abf7 MDL-25187 upgrade log debugging to use new DML style
all credit goes to Eloy Lafuente (stronk7)
2010-11-15 07:38:02 +00:00
Eloy Lafuente f2364c93ed MDL-24962 backup - cache xmldb_tables for multiple operations. Apply destroyer to temp controller. 2010-11-15 07:17:24 +00:00
Eloy Lafuente ab1c069e11 MDL-24962 backup - circular refs. cleaner in backup_controller 2010-11-15 07:16:51 +00:00
Eloy Lafuente 287e804058 MDL-24962 backup - circular refs destroyer for backup settings 2010-11-15 07:16:24 +00:00
Eloy Lafuente 4f6ed68c1c MDL-24962 backup - circular refs destroyer for backup plan 2010-11-15 07:15:48 +00:00
Dongsheng Cai 41dcc2a508 MDL-25220 Question editors need to support subdirs 2010-11-15 06:37:13 +00:00
Petr Skoda 785d2cf2bd MDL-25031 fixed question ugprade - credit goes to Mark Nelson 2010-11-15 05:53:22 +00:00
Petr Skoda e47c78f929 MDL-25031, MDL-25198 fixed use of proper table prefixes in blocks upgrade and fixed invalid DML call in questions ugprade 2010-11-15 05:52:33 +00:00
Andrew Davis 99cd408f81 blog MDL-25217 now checking for null creation and modified timestamps when importing external blog entries 2010-11-15 03:56:12 +00:00
Dongsheng Cai 675e7a425b MDL-25198, fixed incorrect sql, protect question image migration code by field_exists check 2010-11-15 02:54:31 +00:00
Moodle Robot 2b05a3bb9b Updated the HEAD build version to 20101115 2010-11-15 00:48:37 +00:00
Patrick Malley 662078965d MDL-25210 - Creating consistency in README files. 2010-11-14 21:33:37 +00:00
Pierre Pichet b21aea7408 MDL-25104 removing unnecessary $options = array_shift($oldoptions) line 192 that generates 2 question_numerical records,
this was added by inadvertence  in the last many lines modifications
2010-11-14 03:51:35 +00:00
Petr Skoda 7415aed103 MDL-11728 finally defining the exact meaning of is_internal() in auth plugins
internal means "uses password hash for user authentication", there is a new is_synchronised_with_external() method that indicates if moodle should automatically sync user info with external system after login; I have also improved the default for prevent_local_passwords() which is now defaulting to !is_internal()
2010-11-14 02:01:59 +00:00
Moodle Robot 44afba9701 Updated the HEAD build version to 20101114 2010-11-14 00:47:59 +00:00
1156 changed files with 26458 additions and 287962 deletions
+27
View File
@@ -0,0 +1,27 @@
# This file specifies intentionally untracked files that all Moodle git
# repositories should ignore. It is recommended not to modify this file in your
# local clone. Instead, use .git/info/exclude and add new records there as
# needed.
#
# Example: if you deploy a contributed plugin mod/foobar into your site, put
# the following line into .git/info/exclude file in your Moodle clone:
# /mod/foobar/
#
# See gitignore(5) man page for more details
#
/config.php
/lib/editor/tinymce/extra/tools/temp/
*~
*.swp
/tags
/TAGS
/cscope.*
/.patches/
/.idea/
/nbproject/
CVS
.DS_Store
/.settings/
/.project
/.buildpath
/.cache
+3 -3
View File
@@ -1,6 +1,8 @@
<?php
/// Create "blog" forums in each course and copy blog entries from these courses' participants in these forums
define('NO_OUTPUT_BUFFERING', true);
require_once('../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/blog/lib.php');
@@ -28,9 +30,7 @@ echo $OUTPUT->box_start();
/// Turn off time limits, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_flush());
set_time_limit(0);
$i = 0;
+1 -1
View File
@@ -92,7 +92,7 @@ mtrace("Server Time: ".date('r',$timenow)."\n\n");
// Run automated backups if required.
require_once($CFG->dirroot.'/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot.'/backup/util/helper/backup_cron_helper.class.php');
backup_cron_automated_helper::run_automated_backup(backup_cron_automated_helper::RUN_IMMEDIATLY);
backup_cron_automated_helper::run_automated_backup(backup_cron_automated_helper::RUN_IMMEDIATELY);
mtrace("Automated cron backups completed correctly");
+1 -13
View File
@@ -40,24 +40,12 @@
// CLI via web interface, please do not use this hack elsewhere
define('CLI_SCRIPT', true);
define('WEB_CRON_EMULATED_CLI', 'defined'); // ugly ugly hack, do not use elsewhere please
define('NO_OUTPUT_BUFFERING', true);
require('../config.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->libdir.'/cronlib.php');
// disable compression, it would prevent closing of buffers
if (ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}
// no more headers and buffers
ob_implicit_flush(true);
while(ob_get_level()) {
if (!ob_end_clean()) {
// prevent infinite loop
break;
}
}
// extra safety
session_get_instance()->write_close();
+1 -1
View File
@@ -26,7 +26,7 @@ function dbtransfer_export_xml_database($description, $mdb) {
session_get_instance()->write_close(); // release session
header('Content-Type: application/xhtml+xml');
header('Content-Type: application/xhtml+xml; charset=utf-8');
header('Content-Disposition: attachment; filename=database.xml');
header('Expires: 0');
header('Cache-Control: must-revalidate,post-check=0,pre-check=0');
+5
View File
@@ -321,6 +321,11 @@
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_php533" level="optional">
<FEEDBACK>
<ON_CHECK message="php533warning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+1 -13
View File
@@ -38,19 +38,7 @@ if (version_compare(phpversion(), '5.2.0') < 0) {
die;
}
// disable compression, it would prevent closing of buffers
if (ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}
// try to flush everything all the time
ob_implicit_flush(true);
while(ob_get_level()) {
if (!ob_end_clean()) {
// prevent infinite loop
break;
}
}
define('NO_OUTPUT_BUFFERING', true);
require('../config.php');
require_once($CFG->libdir.'/adminlib.php'); // various admin-only functions
+2 -2
View File
@@ -60,13 +60,13 @@ class mnet_services_form extends moodleform {
if (!empty($version['hostsubscribes'])) {
$pubstr .= ' <a class="notifysuccess" title="'.s(get_string('issubscribed','mnet', $mnet_peer->name)).'">&radic;</a> ';
}
$mform->addElement('checkbox', 'publish[' . $version['serviceid'] . ']', $pubstr);
$mform->addElement('advcheckbox', 'publish[' . $version['serviceid'] . ']', $pubstr);
$substr = get_string('subscribe','mnet');
if (!empty($version['hostpublishes'])) {
$substr .= ' <a class="notifysuccess" title="'.s(get_string('ispublished','mnet', $mnet_peer->name)).'">&radic;</a> ';
}
$mform->addElement('checkbox', 'subscribe[' . $version['serviceid']. ']', $substr);
$mform->addElement('advcheckbox', 'subscribe[' . $version['serviceid']. ']', $substr);
$count++;
}
$this->add_action_buttons();
+8 -3
View File
@@ -141,12 +141,17 @@
$settings = "";
}
$count = $DB->count_records_select($module->name, "course<>0");
try {
$count = $DB->count_records_select($module->name, "course<>0");
} catch (dml_exception $e) {
$count = -1;
}
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
}
else {
} else if ($count < 0) {
$countlink = get_string('error');
} else {
$countlink = "$count";
}
+28 -29
View File
@@ -1,6 +1,8 @@
<?php
/// Search and replace strings throughout all texts in the whole database
define('NO_OUTPUT_BUFFERING', true);
require_once('../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
@@ -33,8 +35,6 @@ echo $OUTPUT->box_start();
/// Turn off time limits, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_flush());
echo '<strong>Progress:</strong>';
$i = 0;
@@ -56,35 +56,34 @@ foreach ($tables as $table) {
if (in_array($data->type, array('text','mediumtext','longtext','varchar'))) { // Text stuff only
// first find candidate records
$sql = "SELECT id, $column FROM $fulltable WHERE $column LIKE '%</lang>%' OR $column LIKE '%<span lang=%'";
if ($rs = $DB->get_recordset_sql($sql)) {
foreach ($rs as $data) {
$text = $data->$column;
$id = $data->id;
if ($i % 600 == 0) {
echo '<br />';
}
if ($i % 10 == 0) {
echo '.';
}
$i++;
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) {
$DB->execute("UPDATE $fulltable SET $column=? WHERE id=?", array($newtext, $id));
}
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $data) {
$text = $data->$column;
$id = $data->id;
if ($i % 600 == 0) {
echo '<br />';
}
if ($i % 10 == 0) {
echo '.';
}
$i++;
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) {
$DB->execute("UPDATE $fulltable SET $column=? WHERE id=?", array($newtext, $id));
}
$rs->close();
}
$rs->close();
}
}
}
+5 -1
View File
@@ -247,7 +247,11 @@
}
// Settings link, if available.
if (file_exists($qtype->plugin_dir() . '/settings.php')) {
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
if ($settings instanceof admin_externalpage) {
$row[] = '<a href="' . $settings->url .
'">' . get_string('settings') . '</a>';
} else if ($settings instanceof admin_settingpage) {
$row[] = '<a href="' . admin_url('settings.php?section=qtypesetting' . $qtypename) .
'">' . get_string('settings') . '</a>';
} else {
+7 -1
View File
@@ -65,11 +65,17 @@ if (!empty($registeredhub) and $registeredhub->token == $token) {
$registeredhub->hubname = $hubname;
$registrationmanager->update_registeredhub($registeredhub);
//display notficiation message
$notificationmessage = $OUTPUT->notification(
get_string('registrationconfirmedon', 'hub', $hublink), 'notifysuccess');
echo $notificationmessage;
//display continue button
$registrationpage = new moodle_url('/admin/registration/index.php');
$continuebutton = $OUTPUT->render(new single_button($registrationpage, get_string('continue', 'hub')));
$continuebutton = html_writer::tag('div', $continuebutton, array('class' => 'mdl-align'));
echo $continuebutton;
if (!extension_loaded('xmlrpc')) {
//display notice about xmlrpc
$xmlrpcnotification = $OUTPUT->doc_link('admin/environment/php_extension/xmlrpc', '');
+2 -2
View File
@@ -368,8 +368,8 @@ class site_registration_form extends moodleform {
$questioncount = $DB->count_records('question');
$resourcecount = $DB->count_records('resource');
require_once($CFG->dirroot . "/course/lib.php");
$participantnumberaverage = average_number_of_participants();
$modulenumberaverage = average_number_of_courses_modules();
$participantnumberaverage = number_format(average_number_of_participants(), 2);
$modulenumberaverage = number_format(average_number_of_courses_modules(), 2);
if (HUB_MOODLEORGHUBURL != $huburl) {
$mform->addElement('checkbox', 'courses', get_string('sendfollowinginfo', 'hub'),
+27
View File
@@ -84,6 +84,33 @@ class registration_manager {
}
}
/**
* Return the site secret for a given hub
* site identifier is assigned to Mooch
* each hub has a unique and personal site secret.
* @param string $huburl
* @return string site secret
*/
public function get_site_secret_for_hub($huburl) {
global $DB;
$existingregistration = $DB->get_record('registration_hubs',
array('huburl' => $huburl));
if (!empty($existingregistration)) {
return $existingregistration->secret;
}
if ($huburl == HUB_MOODLEORGHUBURL) {
$siteidentifier = get_site_identifier();
} else {
$siteidentifier = random_string(32) . $_SERVER['HTTP_HOST'];
}
return $siteidentifier;
}
/**
* When the site register on a hub, he must call this function
* @param object $hub where the site is registered on
+2 -16
View File
@@ -49,21 +49,6 @@ if (!confirm_sesskey()) {
throw new moodle_exception('missingparameter');
}
/* TO DO
if DB config plugin table is not good for dealing with token reference and token confirmation
=> create other DB table
-----------------------------------------------------------------------------
Local Type | Token | Local WS | Remote Type | Remote URL | Confirmed
-----------------------------------------------------------------------------
HUB 4er4e server HUB-DIRECTORY http...moodle.org Yes
HUB 73j53 client HUB-DIRECTORY http...moodle.org Yes
SITE dfsd7 server HUB http...hub Yes
SITE fd8fd client HUB http...hub Yes
HUB ds78s server SITE http...site.com Yes
HUB-DIR. d7d8s server HUB http...hub Yes
-----------------------------------------------------------------------------
*/
$registrationmanager = new registration_manager();
$registeredhub = $registrationmanager->get_registeredhub($huburl);
@@ -132,7 +117,8 @@ if (!empty($fromform) and empty($update) and confirm_sesskey()) {
if (empty($unconfirmedhub)) {
//we save the token into the communication table in order to have a reference
$unconfirmedhub = new stdClass();
$unconfirmedhub->token = get_site_identifier();
$unconfirmedhub->token = $registrationmanager->get_site_secret_for_hub($huburl);
$unconfirmedhub->secret = $unconfirmedhub->token;
$unconfirmedhub->huburl = $huburl;
$unconfirmedhub->hubname = $hubname;
$unconfirmedhub->confirmed = 0;
+76
View File
@@ -0,0 +1,76 @@
<?php
///////////////////////////////////////////////////////////////////////////
// //
// This file is part of Moodle - http://moodle.org/ //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// //
// Moodle 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 3 of the License, or //
// (at your option) any later version. //
// //
// Moodle 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. //
// //
// You should have received a copy of the GNU General Public License //
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. //
// //
///////////////////////////////////////////////////////////////////////////
/*
* @package moodle
* @subpackage registration
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* The administrator is redirect to this page from the hub to renew a registration
* process because
*/
require('../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/registration/lib.php');
$url = optional_param('url', '', PARAM_URL);
$hubname = optional_param('hubname', '', PARAM_TEXT);
$token = optional_param('token', '', PARAM_TEXT);
admin_externalpage_setup('registrationindex');
//check that we are waiting a confirmation from this hub, and check that the token is correct
$registrationmanager = new registration_manager();
$registeredhub = $registrationmanager->get_unconfirmedhub($url);
if (!empty($registeredhub) and $registeredhub->token == $token) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('renewregistration', 'hub'), 3, 'main');
$hublink = html_writer::tag('a', $hubname, array('href' => $url));
$registrationmanager->delete_registeredhub($url);
//Mooch case, need to recreate the siteidentifier
if ($url == HUB_MOODLEORGHUBURL) {
$CFG->siteidentifier = null;
get_site_identifier();
}
$deletedregmsg = get_string('previousregistrationdeleted', 'hub', $hublink);
$button = new single_button(new moodle_url('/admin/registration/index.php'),
get_string('restartregistration', 'hub'));
$button->class = 'restartregbutton';
echo html_writer::tag('div', $deletedregmsg . $OUTPUT->render($button),
array('class' => 'mdl-align'));
echo $OUTPUT->footer();
} else {
throw new moodle_exception('wrongtoken', 'hub',
$CFG->wwwroot . '/' . $CFG->admin . '/registration/index.php');
}
+2 -5
View File
@@ -1,15 +1,12 @@
<?php
/// Search and replace strings throughout all texts in the whole database
define('NO_OUTPUT_BUFFERING', true);
require_once('../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
// workaround for problems with compression
if (ini_get('zlib.output_compression')) {
@ini_set('zlib.output_compression', 'Off');
}
admin_externalpage_setup('replace');
$search = optional_param('search', '', PARAM_RAW);
+6 -6
View File
@@ -8,9 +8,6 @@
$time = optional_param('time', 0, PARAM_INT);
$numcourses = optional_param('numcourses', 20, PARAM_INT);
admin_externalpage_setup('reportcourseoverview');
echo $OUTPUT->header();
if (empty($CFG->enablestats)) {
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3);
@@ -19,6 +16,9 @@
}
}
admin_externalpage_setup('reportcourseoverview');
echo $OUTPUT->header();
$course = get_site();
stats_check_uptodate($course->id);
@@ -27,9 +27,9 @@
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
$earliestday = $DB->get_field_sql('SELECT timeend FROM {stats_daily} ORDER BY timeend');
$earliestweek = $DB->get_field_sql('SELECT timeend FROM {stats_weekly} ORDER BY timeend');
$earliestmonth = $DB->get_field_sql('SELECT timeend FROM {stats_monthly} ORDER BY timeend');
$earliestday = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_daily}');
$earliestweek = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_weekly}');
$earliestmonth = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_monthly}');
if (empty($earliestday)) $earliestday = time();
if (empty($earliestweek)) $earliestweek = time();
+1 -1
View File
@@ -27,7 +27,7 @@
ORDER BY $param->orderby";
}
$courses = $DB->get_records_sql($sql, $param->$params, 0, $numcourses);
$courses = $DB->get_records_sql($sql, $param->params, 0, $numcourses);
if (empty($courses)) {
$PAGE->set_url('/admin/report/courseoverview/index.php');
+4 -4
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="admin/report/customlang/db" VERSION="20101112" COMMENT="XMLDB file for Moodle admin/report/customlang"
<XMLDB PATH="admin/report/customlang/db" VERSION="20101115" COMMENT="XMLDB file for Moodle admin/report/customlang"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
@@ -20,13 +20,13 @@
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="fk_component"/>
<KEY NAME="fk_component" TYPE="foreign" FIELDS="componentid" REFTABLE="customlang_components" REFFIELDS="id" PREVIOUS="primary"/>
<KEY NAME="fk_component" TYPE="foreign" FIELDS="componentid" REFTABLE="report_customlang_components" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
<INDEXES>
<INDEX NAME="uq_lang_component_string" UNIQUE="true" FIELDS="lang, componentid, stringid" COMMENT="For a given language and component, string identifiers must be unique"/>
</INDEXES>
</TABLE>
<TABLE NAME="report_customlang_components" COMMENT="Contains the list of all installed plugins that provide their own language pack " PREVIOUS="report_customlang">
<TABLE NAME="report_customlang_components" COMMENT="Contains the list of all installed plugins that provide their own language pack" PREVIOUS="report_customlang">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The normalized name of the plugin" PREVIOUS="id" NEXT="version"/>
@@ -37,4 +37,4 @@
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>
+14
View File
@@ -43,5 +43,19 @@ function xmldb_report_customlang_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2010111200, 'report', 'customlang');
}
/**
* Regenerate the foreign key after the tables rename
*/
if ($oldversion < 2010111500) {
$table = new xmldb_table('report_customlang');
$oldkey = new xmldb_key('fk_component', XMLDB_KEY_FOREIGN, array('componentid'), 'customlang_components', array('id'));
$newkey = new xmldb_key('fk_component', XMLDB_KEY_FOREIGN, array('componentid'), 'report_customlang_components', array('id'));
$dbman->drop_key($table, $oldkey);
$dbman->add_key($table, $newkey);
upgrade_plugin_savepoint(true, 2010111500, 'report', 'customlang');
}
return $result;
}
+1 -1
View File
@@ -38,7 +38,7 @@ $PAGE->set_url('/admin/report/customlang/edit.php', array('lng' => $lng));
navigation_node::override_active_url(new moodle_url('/admin/report/customlang/index.php'));
$PAGE->set_title(get_string('pluginname', 'report_customlang'));
$PAGE->set_heading(get_string('pluginname', 'report_customlang'));
//$PAGE->requires->js_init_call('M.report_customlang.init_translator', array(), true);
$PAGE->requires->js_init_call('M.report_customlang.init_editor', array(), true);
if (empty($lng)) {
// PARAM_LANG validation failed
-3
View File
@@ -257,9 +257,6 @@ class report_customlang_utils {
$packageinfo .= "\n * @subpackage $subpackage";
}
$filepath = self::get_localpack_location($lang);
if ($filepath !== clean_param($filepath, PARAM_SAFEPATH)) {
throw new coding_exception('Incorrect file location '.s($filepath));
}
$filepath = $filepath.'/'.$filename;
if (!is_dir(dirname($filepath))) {
check_dir_exists(dirname($filepath));
+45
View File
@@ -0,0 +1,45 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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 3 of the License, or
// (at your option) any later version.
//
// Moodle 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.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package report
* @subpackage customlang
* @copyright 2010 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @namespace
*/
M.report_customlang = M.report_customlang || {};
/**
* YUI instance holder
*/
M.report_customlang.Y = {};
/**
* Initialize JS support for the edit.php
*
* @param {Object} Y YUI instance
*/
M.report_customlang.init_editor = function(Y) {
M.report_customlang.Y = Y;
Y.all('#translator .local textarea').each(function (textarea) {
var cell = textarea.get('parentNode');
textarea.setStyle('height', cell.getComputedStyle('height'));
});
}
+6 -1
View File
@@ -76,6 +76,7 @@ class report_customlang_renderer extends plugin_renderer_base {
$cells[1]->attributes['class'] = 'stringid';
// master translation of the string
$master = html_writer::tag('div', s($string->master), array('class' => 'preformatted'));
$minheight = strlen($string->master) / 200;
if (preg_match('/\{\$a(->.+)?\}/', $string->master)) {
$master .= html_writer::tag('div', $this->help_icon('placeholder', 'report_customlang',
get_string('placeholderwarning', 'report_customlang')), array('class' => 'placeholderinfo'));
@@ -83,7 +84,11 @@ class report_customlang_renderer extends plugin_renderer_base {
$cells[2] = new html_table_cell($master);
$cells[2]->attributes['class'] = 'standard master';
// local customization of the string
$textarea = html_writer::tag('textarea', s($string->local), array('name'=>'cust['.$string->id.']'));
$textareaattributes = array('name'=>'cust['.$string->id.']', 'cols'=>40, 'rows'=>3);
if ($minheight>1) {
$textareaattributes['style'] = 'min-height:' . (int) 4*$minheight . 'em;';
}
$textarea = html_writer::tag('textarea', s($string->local), $textareaattributes);
$cells[3] = new html_table_cell($textarea);
if (!is_null($string->local) and $string->outdated) {
$mark = html_writer::empty_tag('input', array('type' => 'checkbox', 'id' => 'update_' . $string->id,
+2 -2
View File
@@ -24,5 +24,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010111200;
$plugin->requires = 2010111002;
$plugin->version = 2010120900;
$plugin->requires = 2010120700;
+186
View File
@@ -0,0 +1,186 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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 3 of the License, or
// (at your option) any later version.
//
// Moodle 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.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package core
* @subpackage profiling
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// TODO: Move all the DB stuff to profiling_db_xxxx() function in xhprof_moodle.php
require_once(dirname(__FILE__).'/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir . '/xhprof/xhprof_moodle.php');
define('PROFILING_RUNSPERPAGE', 50);
// page parameters
$script = optional_param('script', null, PARAM_PATH);
$runid = optional_param('runid', null, PARAM_ALPHANUM);
$runid2 = optional_param('runid2', null, PARAM_ALPHANUM);
$listurl = optional_param('listurl', null, PARAM_PATH);
$runreference= optional_param('runreference', 0, PARAM_INT);
$runcomment = optional_param('runcomment', null, PARAM_TEXT);
$dbfields = 'runid, url, totalexecutiontime, totalcputime, ' .
'totalcalls, totalmemory, runreference, runcomment, timecreated';
admin_externalpage_setup('reportprofiling');
// Always add listurl if available
if ($listurl) {
$listurlnav = new moodle_url('/admin/report/profiling/index.php', array('listurl' => $listurl));
$PAGE->navbar->add($listurl, $listurlnav);
}
// Header
echo $OUTPUT->header();
// We have requested the last available run for one script
if (isset($script)) {
// Get the last available run for the given script
$run = $DB->get_record_sql("SELECT $dbfields
FROM {profiling}
WHERE url = ?
AND id = (SELECT MAX(id)
FROM {profiling}
WHERE url = ?)",
array($script, $script), IGNORE_MISSING);
// No run found for script, warn and exit
if (!$run) {
notice(get_string('cannotfindanyrunforurl', 'report_profiling', $script), 'index.php');
}
// Check if there is any previous run marked as reference one
$prevreferences = $DB->get_records_select('profiling',
'url = ? AND runreference = 1 AND timecreated < ?',
array($run->url, $run->timecreated),
'timecreated DESC', 'runid', 0, 1);
$prevrunid = $prevreferences ? reset($prevreferences)->runid : false;
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
$header = get_string('lastrunof', 'report_profiling', $script);
echo $OUTPUT->heading($header);
$table = profiling_print_run($run, $prevrunid);
echo $table;
echo $OUTPUT->box_end();
// We have requested the diff between 2 runs
} else if (isset($runid) && isset($runid2)) {
$run1 = $DB->get_record('profiling', array('runid'=>$runid), $dbfields, MUST_EXIST);
$run2 = $DB->get_record('profiling', array('runid'=>$runid2), $dbfields, MUST_EXIST);
if ($run1->url == $run2->url && $run1->runid != $run2->runid) {
if ($run2->timecreated < $run1->timecreated) {
$runtemp = $run1;
$run1 = $run2;
$run2 = $runtemp;
}
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
$header = get_string('differencesbetween2runsof', 'report_profiling', $run1->url);
echo $OUTPUT->heading($header);
$table = profiling_print_rundiff($run1, $run2);
echo $table;
echo $OUTPUT->box_end();
}
// We have requested one run, invoke it
} else if (isset($runid)) {
// Check if we are trying to update the runreference/runcomment for the run
if (isset($runcomment) && confirm_sesskey()) {
$id = $DB->get_field('profiling', 'id', array('runid' => $runid), MUST_EXIST);
$rec = new stdClass();
$rec->id = $id;
$rec->runreference = (bool)$runreference;
$rec->runcomment = $runcomment;
$DB->update_record('profiling', $rec);
}
// Get the requested runid
$run = $DB->get_record('profiling', array('runid'=>$runid), $dbfields, IGNORE_MISSING);
// No run found for runid, warn and exit
if (!$run) {
notice(get_string('cannotfindanyrunforrunid', 'report_profiling', $runid), 'index.php');
}
// Check if there is any previous run marked as reference one
$prevreferences = $DB->get_records_select('profiling',
'url = ? AND runreference = 1 AND timecreated < ?',
array($run->url, $run->timecreated),
'timecreated DESC', 'runid', 0, 1);
$prevrunid = $prevreferences ? reset($prevreferences)->runid : false;
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
$header = get_string('summaryof', 'report_profiling', $run->url);
echo $OUTPUT->heading($header);
$table = profiling_print_run($run, $prevrunid);
echo $table;
echo $OUTPUT->box_end();
// Default: List one page of runs
} else {
// The flexitable that will root listings
$table = new xhprof_table_sql('profiling-list-table');
$baseurl = $CFG->wwwroot . '/admin/report/profiling/index.php';
// Check if we are listing all or some URL ones
$sqlconditions = '';
$sqlparams = array();
if (!isset($listurl)) {
$header = get_string('pluginname', 'report_profiling');
$sqlconditions = '1 = 1';
$table->set_listurlmode(false);
} else {
$header = get_string('profilingrunsfor', 'report_profiling', $listurl);
$sqlconditions = 'url = :url';
$sqlparams['url'] = $listurl;
$table->set_listurlmode(true);
$baseurl .= '?listurl=' . urlencode($listurl);
}
echo $OUTPUT->heading($header);
// TODO: Fix flexitable to validate tsort/thide/tshow/tifirs/tilast/page
// TODO: Fix table_sql to allow it to work without WHERE clause
// add silly condition (1 = 1) because of table_sql bug
$table->set_sql($dbfields, '{profiling}', $sqlconditions, $sqlparams);
$table->set_count_sql("SELECT COUNT(*) FROM {profiling} WHERE $sqlconditions", $sqlparams);
$columns = array(
'url', 'timecreated', 'totalexecutiontime', 'totalcputime',
'totalcalls', 'totalmemory', 'runcomment');
$headers = array(
get_string('url'), get_string('date'), get_string('executiontime', 'report_profiling'),
get_string('cputime', 'report_profiling'), get_string('calls', 'report_profiling'),
get_string('memory', 'report_profiling'), get_string('comment', 'report_profiling'));
$table->define_columns($columns);
$table->define_headers($headers);
$table->sortable(true, 'timecreated', SORT_DESC);
$table->define_baseurl($baseurl);
$table->column_suppress('url');
$table->out(PROFILING_RUNSPERPAGE, true);
// Print the controller block with different options
echo profiling_list_controls($listurl);
}
// Footer.
echo $OUTPUT->footer();
@@ -0,0 +1,45 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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 3 of the License, or
// (at your option) any later version.
//
// Moodle 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.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Strings for component 'report_profiling', language 'en', branch 'MOODLE_20_STABLE'
*
* @package report_profiling
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['calls'] = 'Function calls';
$string['cannotfindanyrunforurl'] = 'Sorry, cannot find any profiling run for the \'{$a}\' URL';
$string['cannotfindanyrunforrunid'] = 'Sorry, cannot find the \'{$a}\' profiling run';
$string['comment'] = 'Comment';
$string['differencesbetween2runsof'] = 'Differences between 2 runs of {$a}';
$string['executiontime'] = 'Execution time';
$string['cputime'] = 'CPU time';
$string['lastrunof'] = 'Summary of last run of {$a}';
$string['markreferencerun'] = 'Mark as reference run/comment';
$string['memory'] = 'Memory used';
$string['pluginname'] = 'Profiling runs';
$string['profilingfocusscript'] = 'Focus on profiling runs for the script: {$a}';
$string['profilingruns'] = 'Profiling runs';
$string['profilingrunsfor'] = 'Profiling runs for {$a}';
$string['referencerun'] = 'Reference run/comment';
$string['runid'] = 'Run ID';
$string['summaryof'] = 'Summary of {$a}';
$string['viewdetails'] = 'View profiling details';
$string['viewdiff'] = 'View profiling differences with last reference run';
$string['viewdiffdetails'] = 'View profiling diff details';
+8
View File
@@ -0,0 +1,8 @@
<?php
defined('MOODLE_INTERNAL') || die;
// profiling report, added to development
if (extension_loaded('xhprof') && function_exists('xhprof_enable') && !empty($CFG->profilingenabled)) {
$ADMIN->add('development', new admin_externalpage('reportprofiling', get_string('pluginname', 'report_profiling'), "$CFG->wwwroot/$CFG->admin/report/profiling/index.php", 'moodle/site:config'));
}
+25
View File
@@ -0,0 +1,25 @@
/* report_profiling styles */
.path-admin-report-profiling .profilingruntable .label {
font-weight: bold;
}
.path-admin-report-profiling .profiling_worse {
color: red;
}
.path-admin-report-profiling .profiling_better {
color: green;
}
.path-admin-report-profiling .profiling_same {
color: dimgrey;
}
.path-admin-report-profiling .profiling_important,
.path-admin-report-profiling .flexible .referencerun {
font-weight: bold;
}
.path-admin-report-profiling .flexible .r1 .cell {
background-color: whitesmoke;
}
.path-admin-report-profiling .flexible {
margin-left:auto;
margin-right:auto
}
+2 -2
View File
@@ -23,6 +23,8 @@
// //
///////////////////////////////////////////////////////////////////////////
define('NO_OUTPUT_BUFFERING', true);
require_once('../../../config.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/report/security/lib.php');
require_once($CFG->libdir.'/adminlib.php');
@@ -49,8 +51,6 @@ echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('pluginname', 'report_security'));
echo '<div id="timewarning">'.get_string('timewarning', 'report_security').'</div>';
while(@ob_end_flush());
@flush();
$strok = '<span class="statusok">'.get_string('statusok', 'report_security').'</span>';
$strinfo = '<span class="statusinfo">'.get_string('statusinfo', 'report_security').'</span>';
+2 -4
View File
@@ -4,7 +4,8 @@
* @package SimpleTestEx
*/
/** */
define('NO_OUTPUT_BUFFERING', true);
require_once(dirname(__FILE__).'/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/simpletestcoveragelib.php');
@@ -68,9 +69,6 @@ for ($i=1; $i<=10; $i++) {
}
if (!empty($tests)) {
@ob_implicit_flush(true);
while(@ob_end_flush());
$covreporter = new moodle_coverage_reporter('Functional DB Tests Code Coverage Report', 'dbtest');
$covrecorder = new moodle_coverage_recorder($covreporter);
+2 -1
View File
@@ -8,7 +8,8 @@
* @package SimpleTestEx
*/
/** */
define('NO_OUTPUT_BUFFERING', true);
require_once(dirname(__FILE__).'/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/simpletestcoveragelib.php');
+2 -1
View File
@@ -232,7 +232,8 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'role');
echo $OUTPUT->render($select);
echo '<p><a href="' . $PAGE->url . '">' . get_string('backtoallroles', 'role') . '</a></p>';
$backurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $contextid));
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', 'role') . '</a></p>';
echo '</div>';
} else if (empty($assignableroles)) {
+7
View File
@@ -130,6 +130,13 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// link to tag management interface
$ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
$temp = new admin_settingpage('additionalhtml', get_string('additionalhtml', 'admin'));
$temp->add(new admin_setting_heading('additionalhtml_heading', get_string('additionalhtml_heading', 'admin'), get_string('additionalhtml_desc', 'admin')));
$temp->add(new admin_setting_configtextarea('additionalhtmlhead', get_string('additionalhtmlhead', 'admin'), get_string('additionalhtmlhead_desc', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtextarea('additionalhtmltopofbody', get_string('additionalhtmltopofbody', 'admin'), get_string('additionalhtmltopofbody_desc', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtextarea('additionalhtmlfooter', get_string('additionalhtmlfooter', 'admin'), get_string('additionalhtmlfooter_desc', 'admin'), '', PARAM_RAW));
$ADMIN->add('appearance', $temp);
} // end of speedup
+42 -5
View File
@@ -12,17 +12,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$englobalsearch = new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0);
$englobalsearch->set_updatedcallback('search_updatedcallback');
$temp->add($englobalsearch);
$temp->add(new admin_setting_configcheckbox('experimentalsplitrestore', get_string('experimentalsplitrestore', 'admin'), get_string('configexperimentalsplitrestore', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0));
//TODO: Re-enable cc-import once re-implemented in 2.0.x
//$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0));
$temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', get_string('enablegroupmembersonly', 'admin'), get_string('configenablegroupmembersonly', 'admin'), 0));
$ADMIN->add('experimental', $temp);
// DB transfer related pages
$ADMIN->add('experimental', new admin_externalpage('dbtransfer', get_string('dbtransfer', 'dbtransfer'), $CFG->wwwroot.'/'.$CFG->admin.'/dbtransfer/index.php', 'moodle/site:config'));
$ADMIN->add('experimental', new admin_externalpage('dbexport', get_string('dbexport', 'dbtransfer'), $CFG->wwwroot.'/'.$CFG->admin.'/dbtransfer/dbexport.php', 'moodle/site:config'));
$ADMIN->add('experimental', new admin_externalpage('dbtransfer', get_string('dbtransfer', 'dbtransfer'), $CFG->wwwroot.'/'.$CFG->admin.'/dbtransfer/index.php', 'moodle/site:config', true));
$ADMIN->add('experimental', new admin_externalpage('dbexport', get_string('dbexport', 'dbtransfer'), $CFG->wwwroot.'/'.$CFG->admin.'/dbtransfer/dbexport.php', 'moodle/site:config', true));
// "debugging" settingpage
$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
@@ -36,6 +35,44 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('debugpageinfo', get_string('debugpageinfo', 'admin'), get_string('configdebugpageinfo', 'admin'), 0));
$ADMIN->add('development', $temp);
// "profiling" settingpage (conditionally if the 'xhprof' extension is available only)
if (extension_loaded('xhprof') && function_exists('xhprof_enable')) {
$temp = new admin_settingpage('profiling', get_string('profiling', 'admin'));
// Main profiling switch
$temp->add(new admin_setting_configcheckbox('profilingenabled', get_string('profilingenabled', 'admin'), get_string('profilingenabled_help', 'admin'), false));
// List of URLs that will be automatically profiled
$temp->add(new admin_setting_configtextarea('profilingincluded', get_string('profilingincluded', 'admin'), get_string('profilingincluded_help', 'admin'), ''));
// List of URLs that won't be profiled ever
$temp->add(new admin_setting_configtextarea('profilingexcluded', get_string('profilingexcluded', 'admin'), get_string('profilingexcluded_help', 'admin'), ''));
// Allow random profiling each XX requests
$temp->add(new admin_setting_configtext('profilingautofrec', get_string('profilingautofrec', 'admin'), get_string('profilingautofrec_help', 'admin'), 0, PARAM_INT));
// Allow PROFILEME/DONTPROFILEME GPC
$temp->add(new admin_setting_configcheckbox('profilingallowme', get_string('profilingallowme', 'admin'), get_string('profilingallowme_help', 'admin'), false));
// Allow PROFILEALL/PROFILEALLSTOP GPC
$temp->add(new admin_setting_configcheckbox('profilingallowall', get_string('profilingallowall', 'admin'), get_string('profilingallowall_help', 'admin'), false));
// TODO: Allow to skip PHP functions (XHPROF_FLAGS_NO_BUILTINS)
// TODO: Allow to skip call_user functions (ignored_functions array)
// Specify the life time (in minutes) of profiling runs
$temp->add(new admin_setting_configselect('profilinglifetime', get_string('profilinglifetime', 'admin'), get_string('profilinglifetime_help', 'admin'), 24*60, array(
0 => get_string('neverdeleteruns', 'admin'),
30*24*60 => get_string('numdays', '', 30),
15*24*60 => get_string('numdays', '', 15),
7*24*60 => get_string('numdays', '', 7),
4*24*60 => get_string('numdays', '', 4),
2*24*60 => get_string('numdays', '', 2),
24*60 => get_string('numhours', '', 24),
16*80 => get_string('numhours', '', 16),
8*60 => get_string('numhours', '', 8),
4*60 => get_string('numhours', '', 4),
2*60 => get_string('numhours', '', 2),
60 => get_string('numminutes', '', 60),
30 => get_string('numminutes', '', 30),
15 => get_string('numminutes', '', 15))));
// Add the 'profiling' page to admin block
$ADMIN->add('development', $temp);
}
// XMLDB editor
$ADMIN->add('development', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "$CFG->wwwroot/$CFG->admin/xmldb/"));
+1
View File
@@ -10,6 +10,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$temp->add(new admin_settings_country_select('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', get_string('defaultcity', 'admin'), get_string('defaultcity_help', 'admin'), ''));
$temp->add(new admin_setting_heading('iplookup', get_string('iplookup', 'admin'), get_string('iplookupinfo', 'admin')));
$temp->add(new admin_setting_configfile('geoipfile', get_string('geoipfile', 'admin'), get_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLiteCity.dat'));
+5 -6
View File
@@ -372,13 +372,12 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
// Question type settings.
$ADMIN->add('modules', new admin_category('qtypesettings', get_string('questiontypes', 'admin')));
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
require_once($CFG->libdir . '/questionlib.php');
global $QTYPES;
foreach ($QTYPES as $qtype) {
$settingsfile = $qtype->plugin_dir() . '/settings.php';
$qtypes = get_plugin_list('qtype');
foreach ($qtypes as $qtype => $path) {
$settingsfile = $path . '/settings.php';
if (file_exists($settingsfile)) {
$settings = new admin_settingpage('qtypesetting' . $qtype->name(),
$qtype->local_name(), 'moodle/question:config');
$settings = new admin_settingpage('qtypesetting' . $qtype,
get_string('pluginname', 'qtype_' . $qtype), 'moodle/question:config');
include($settingsfile);
if ($settings) {
$ADMIN->add('qtypesettings', $settings);
+2
View File
@@ -12,6 +12,7 @@ $temp->add(new admin_setting_configselect('gdversion', get_string('gdversion','a
'2' => get_string('gd2'))));
$temp->add(new admin_setting_configexecutable('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), ''));
$temp->add(new admin_setting_configexecutable('pathtodot', get_string('pathtodot', 'admin'), get_string('pathtodot_help', 'admin'), ''));
$ADMIN->add('server', $temp);
@@ -265,5 +266,6 @@ $ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('adminregistration', get_string('registration','admin'), "$CFG->wwwroot/$CFG->admin/registration/index.php"));
$ADMIN->add('root', new admin_externalpage('bloglevelupgrade', get_string('bloglevelupgrade', 'admin'), $CFG->wwwroot.'/'.$CFG->admin.'/blocklevelupgrade.php', 'moodle/site:config', true));
} // end of speedup
-4
View File
@@ -37,10 +37,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
get_string('enablecompletion','completion'),
get_string('configenablecompletion','completion'), 0));
$optionalsubsystems->add(new admin_setting_pickroles('progresstrackedroles',
get_string('progresstrackedroles','completion'),
get_string('configprogresstrackedroles', 'completion'),
array('student')));
$optionalsubsystems->add(new admin_setting_configcheckbox('enableavailability',
get_string('enableavailability','condition'),
get_string('configenableavailability','condition'), 0));
+1 -1
View File
@@ -107,7 +107,7 @@ if ($hassiteconfig
if (!during_initial_install()) {
$temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
get_string('configcreatornewroleid', 'admin'), $defaultteacherid, $creatornewroles));
get_string('creatornewroleid_help', 'admin'), $defaultteacherid, $creatornewroles));
}
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
+19 -6
View File
@@ -7,6 +7,7 @@ require('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/csvlib.class.php');
require_once($CFG->dirroot.'/user/profile/lib.php');
require_once($CFG->dirroot.'/group/lib.php');
require_once('uploaduser_form.php');
$iid = optional_param('iid', '', PARAM_INT);
@@ -294,7 +295,13 @@ if ($formdata = $mform->is_cancelled()) {
}
if (isset($formdata->$field)) {
// process templates
$user->$field = process_template($formdata->$field, $user);
if (is_array($formdata->$field)) {
foreach ($formdata->$field as $k=>$v) {
$user->$field[$k] = process_template($v, $user);
}
} else {
$user->$field = process_template($formdata->$field, $user);
}
}
}
@@ -528,7 +535,7 @@ if ($formdata = $mform->is_cancelled()) {
$DB->update_record('user', $existinguser);
//remove user preference
if (get_user_preferences('create_password', false, $existinguser)) {
unset_user_preference('create_password', $existinguser);
}
@@ -667,10 +674,16 @@ if ($formdata = $mform->is_cancelled()) {
$courseid = $ccache[$shortname]->id;
$coursecontext = get_context_instance(CONTEXT_COURSE, $courseid);
if (!isset($manualcache[$courseid])) {
if ($instances = enrol_get_instances($courseid, false)) {
$manualcache[$courseid] = reset($instances);
} else {
$manualcache[$courseid] = false;
$manualcache[$courseid] = false;
if ($manual) {
if ($instances = enrol_get_instances($courseid, false)) {
foreach ($instances as $instance) {
if ($instance->enrol === 'manual') {
$manualcache[$courseid] = $instance;
break;
}
}
}
}
}
+10 -2
View File
@@ -206,10 +206,18 @@ class admin_uploaduser_form2 extends moodleform {
$mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"');
$mform->setType('city', PARAM_MULTILANG);
$mform->setDefault('city', $templateuser->city);
if (empty($CFG->defaultcity)) {
$mform->setDefault('city', $templateuser->city);
} else {
$mform->setDefault('city', $CFG->defaultcity);
}
$mform->addElement('select', 'country', get_string('selectacountry'), get_string_manager()->get_list_of_countries());
$mform->setDefault('country', $templateuser->country);
if (empty($CFG->country)) {
$mform->setDefault('country', $templateuser->country);
} else {
$mform->setDefault('country', $CFG->country);
}
$mform->setAdvanced('country');
$choices = get_list_of_timezones();
+5 -6
View File
@@ -11,14 +11,13 @@ function add_selection_all($ufiltering) {
list($sqlwhere, $params) = $ufiltering->get_sql_filter("id<>:exguest AND deleted <> 1", array('exguest'=>$CFG->siteguest));
if ($rs = $DB->get_recordset_select('user', $sqlwhere, $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname')) {
foreach ($rs as $user) {
if (!isset($SESSION->bulk_users[$user->id])) {
$SESSION->bulk_users[$user->id] = $user->id;
}
$rs = $DB->get_recordset_select('user', $sqlwhere, $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
foreach ($rs as $user) {
if (!isset($SESSION->bulk_users[$user->id])) {
$SESSION->bulk_users[$user->id] = $user->id;
}
$rs->close();
}
$rs->close();
}
function get_selection_data($ufiltering) {
+10 -11
View File
@@ -24,19 +24,18 @@ echo $OUTPUT->header();
if ($confirm and confirm_sesskey()) {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
if ($rs = $DB->get_recordset_select('user', "id $in", $params, '', 'id, username, secret, confirmed, auth, firstname, lastname')) {
foreach ($rs as $user) {
if ($user->confirmed) {
continue;
}
$auth = get_auth_plugin($user->auth);
$result = $auth->user_confirm($user->username, $user->secret);
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
echo $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
}
$rs = $DB->get_recordset_select('user', "id $in", $params, '', 'id, username, secret, confirmed, auth, firstname, lastname');
foreach ($rs as $user) {
if ($user->confirmed) {
continue;
}
$auth = get_auth_plugin($user->auth);
$result = $auth->user_confirm($user->username, $user->secret);
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
echo $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
}
$rs->close();
}
$rs->close();
redirect($return, get_string('changessaved'));
} else {
+7 -8
View File
@@ -25,16 +25,15 @@ echo $OUTPUT->header();
if ($confirm and confirm_sesskey()) {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
if ($rs = $DB->get_recordset_select('user', "id $in", $params)) {
foreach ($rs as $user) {
if (!is_siteadmin($user) and $USER->id != $user->id and delete_user($user)) {
unset($SESSION->bulk_users[$user->id]);
} else {
echo $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
}
$rs = $DB->get_recordset_select('user', "id $in", $params);
foreach ($rs as $user) {
if (!is_siteadmin($user) and $USER->id != $user->id and delete_user($user)) {
unset($SESSION->bulk_users[$user->id]);
} else {
echo $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
}
$rs->close();
}
$rs->close();
session_gc(); // remove stale sessions
redirect($return, get_string('changessaved'));
+8 -9
View File
@@ -38,17 +38,16 @@ if ($confirm and confirm_sesskey()) {
$parts = array_chunk($SESSION->bulk_users, 300);
foreach ($parts as $users) {
list($in, $params) = $DB->get_in_or_equal($users);
if ($rs = $DB->get_recordset_select('user', "id $in", $params)) {
foreach ($rs as $user) {
if (!empty($changeable[$user->auth])) {
set_user_preference('auth_forcepasswordchange', 1, $user->id);
unset($SESSION->bulk_users[$user->id]);
} else {
echo $OUTPUT->notification(get_string('forcepasswordchangenot', '', fullname($user, true)));
}
$rs = $DB->get_recordset_select('user', "id $in", $params);
foreach ($rs as $user) {
if (!empty($changeable[$user->auth])) {
set_user_preference('auth_forcepasswordchange', 1, $user->id);
unset($SESSION->bulk_users[$user->id]);
} else {
echo $OUTPUT->notification(get_string('forcepasswordchangenot', '', fullname($user, true)));
}
$rs->close();
}
$rs->close();
}
echo $OUTPUT->notification(get_string('changessaved'), 'notifysuccess');
echo $OUTPUT->continue_button($return);
+7 -5
View File
@@ -25,12 +25,14 @@ if (empty($CFG->messaging)) {
if ($confirm and !empty($msg) and confirm_sesskey()) {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
if ($rs = $DB->get_recordset_select('user', "id $in", $params)) {
foreach ($rs as $user) {
message_post_message($USER, $user, $msg, FORMAT_HTML, 'direct'); // TODO: this is weird, we should support all text formats here
}
$rs->close();
$rs = $DB->get_recordset_select('user', "id $in", $params);
foreach ($rs as $user) {
//TODO we should probably support all text formats here or only FORMAT_MOODLE
//For now bulk messaging is still using the html editor and its supplying html
//so we have to use html format for it to be displayed correctly
message_post_message($USER, $user, $msg, FORMAT_HTML);
}
$rs->close();
redirect($return);
}
+2 -1
View File
@@ -29,13 +29,14 @@ require_once($CFG->dirroot . '/webservice/lib.php');
admin_externalpage_setup('externalservice');
//Deactivate the 'Edit service' navigation node, and use the main 'Service' navigation node
//define nav bar
$node = $PAGE->settingsnav->find('externalservice', navigation_node::TYPE_SETTING);
$newnode = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node && $newnode) {
$node->display = false;
$newnode->make_active();
}
$PAGE->navbar->add(get_string('externalservice', 'webservice'));
//Retrieve few general parameters
$id = required_param('id', PARAM_INT);
+5 -7
View File
@@ -37,14 +37,12 @@ admin_externalpage_setup('externalservicefunctions');
//define nav bar
$PAGE->set_url('/' . $CFG->admin . '/websevice/service_functions.php', array('id' => $serviceid));
$PAGE->navbar->ignore_active(true);
$PAGE->navbar->add(get_string('administrationsite'));
$PAGE->navbar->add(get_string('plugins', 'admin'));
$PAGE->navbar->add(get_string('webservices', 'webservice'));
$PAGE->navbar->add(get_string('externalservices', 'webservice'),
new moodle_url('/' . $CFG->admin . '/settings.php?section=externalservices'));
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node) {
$node->make_active();
}
$PAGE->navbar->add(get_string('functions', 'webservice'),
new moodle_url('/' . $CFG->admin . '/webservice/service_functions.php?id=' . $serviceid));
new moodle_url('/' . $CFG->admin . '/webservice/service_functions.php', array('id' => $serviceid)));
$service = $DB->get_record('external_services', array('id' => $serviceid), '*', MUST_EXIST);
$webservicemanager = new webservice();
+10 -10
View File
@@ -30,19 +30,19 @@ require_once($CFG->dirroot . '/' . $CFG->admin . '/webservice/forms.php');
$serviceid = required_param('serviceid', PARAM_INT);
$userid = required_param('userid', PARAM_INT);
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_user_settings.php', array('id' => $serviceid, 'userid' => $userid));
$PAGE->navbar->ignore_active(true);
$PAGE->navbar->add(get_string('administrationsite'));
$PAGE->navbar->add(get_string('plugins', 'admin'));
$PAGE->navbar->add(get_string('webservices', 'webservice'));
$PAGE->navbar->add(get_string('externalservices', 'webservice'),
new moodle_url('/' . $CFG->admin . '/settings.php?section=externalservices'));
$PAGE->navbar->add(get_string('serviceusers', 'webservice'),
admin_externalpage_setup('externalserviceusersettings');
//define nav bar
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_user_settings.php',
array('id' => $serviceid, 'userid' => $userid));
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node) {
$node->make_active();
}
$PAGE->navbar->add(get_string('serviceusers', 'webservice'),
new moodle_url('/' . $CFG->admin . '/webservice/service_users.php', array('id' => $serviceid)));
$PAGE->navbar->add(get_string('serviceusersettings', 'webservice'));
admin_externalpage_setup('externalserviceusersettings');
$formaction = new moodle_url('', array('id' => $serviceid, 'userid' => $userid));
$returnurl = new moodle_url('/' . $CFG->admin . '/webservice/service_users.php', array('id' => $serviceid));
+9 -9
View File
@@ -29,17 +29,17 @@ require_once($CFG->dirroot . '/webservice/lib.php');
$id = required_param('id', PARAM_INT);
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_users.php', array('id' => $id));
$PAGE->navbar->ignore_active(true);
$PAGE->navbar->add(get_string('administrationsite'));
$PAGE->navbar->add(get_string('plugins', 'admin'));
$PAGE->navbar->add(get_string('webservices', 'webservice'));
$PAGE->navbar->add(get_string('externalservices', 'webservice'),
new moodle_url('/' . $CFG->admin . '/settings.php?section=externalservices'));
$PAGE->navbar->add(get_string('serviceusers', 'webservice'));
admin_externalpage_setup('externalserviceusers');
//define nav bar
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_users.php', array('id' => $id));
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node) {
$node->make_active();
}
$PAGE->navbar->add(get_string('serviceusers', 'webservice'),
new moodle_url('/' . $CFG->admin . '/webservice/service_users.php', array('id' => $id)));
$webservicemanager = new webservice();
/// Get the user_selector we will need.
+1 -3
View File
@@ -43,9 +43,7 @@ if (!empty($function)) {
$PAGE->navbar->add($function);
}
//require_login();
//require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
admin_externalpage_setup('externalservice');
admin_externalpage_setup('testclient');
// list of all available functions for testing
$allfunctions = $DB->get_records('external_functions', array(), 'name ASC');
+1 -1
View File
@@ -103,7 +103,7 @@
echo $OUTPUT->footer();
break;
case ACTION_GENERATE_XML:
header('Content-type: application/xhtml+xml');
header('Content-type: application/xhtml+xml; charset=utf-8');
echo $xmldb_action->getOutput();
break;
}
+27 -2
View File
@@ -173,8 +173,12 @@ class auth_plugin_cas extends auth_plugin_ldap {
}
}
// Don't try to validate the server SSL credentials
phpCAS::setNoCasServerValidation();
if($this->config->certificate_check && $this->config->certificate_path){
phpCAS::setCasServerCACert($this->config->certificate_path);
}else{
// Don't try to validate the server SSL credentials
phpCAS::setNoCasServerValidation();
}
}
/**
@@ -205,6 +209,19 @@ class auth_plugin_cas extends auth_plugin_ldap {
include($CFG->dirroot.'/auth/cas/config.html');
}
/**
* A chance to validate form data, and last chance to
* do stuff before it is inserted in config_plugin
* @param object object with submitted configuration settings (without system magic quotes)
* @param array $err array of error messages
*/
function validate_form(&$form, &$err) {
$certificate_path = trim($form->certificate_path);
if ($form->certificate_check && empty($certificate_path)) {
$err['certificate_path'] = get_string('auth_cas_certificate_path_empty', 'auth_cas');
}
}
/**
* Returns the URL for changing the user's pw, or empty if the default can
* be used.
@@ -245,6 +262,12 @@ class auth_plugin_cas extends auth_plugin_ldap {
if (!isset($config->multiauth)) {
$config->multiauth = '';
}
if (!isset($config->certificate_check)) {
$config->certificate_check = '';
}
if (!isset($config->certificate_path)) {
$config->certificate_path = '';
}
// LDAP settings
if (!isset($config->host_url)) {
@@ -306,6 +329,8 @@ class auth_plugin_cas extends auth_plugin_ldap {
set_config('proxycas', $config->proxycas, $this->pluginconfig);
set_config('logoutcas', $config->logoutcas, $this->pluginconfig);
set_config('multiauth', $config->multiauth, $this->pluginconfig);
set_config('certificate_check', $config->certificate_check, $this->pluginconfig);
set_config('certificate_path', $config->certificate_path, $this->pluginconfig);
// save LDAP settings
set_config('host_url', trim($config->host_url), $this->pluginconfig);
+25
View File
@@ -27,6 +27,12 @@ if (!isset ($config->logoutcas)) {
if (!isset ($config->multiauth)) {
$config->multiauth = '';
}
if (!isset ($config->certificate_check)) {
$config->certificate_check = '';
}
if (!isset ($config->certificate_path)) {
$config->certificate_path = '';
}
// set to defaults if undefined (LDAP)
if (!isset($config->host_url)) {
@@ -176,6 +182,25 @@ $yesno = array( get_string('no'), get_string('yes') );
<?php print_string('auth_cas_multiauth', 'auth_cas') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_certificate_check_key', 'auth_cas') ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'certificate_check', $config->certificate_check, false); ?>
</td>
<td>
<?php print_string('auth_cas_certificate_check', 'auth_cas') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>:</td>
<td>
<input name="certificate_path" id="certificate_path" type="text" size="30" value="<?php echo $config->certificate_path ?>" />
<?php if (isset($err['certificate_path'])) echo $OUTPUT->error_text($err['certificate_path']); ?>
</td>
<td>
<?php print_string('auth_cas_certificate_path', 'auth_cas') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_server_settings', 'auth_ldap') ?></h4>
+5
View File
@@ -31,6 +31,11 @@ $string['auth_cas_baseuri_key'] = 'Base URI';
$string['auth_cas_broken_password'] = 'You cannot proceed without changing your password, however there is no available page for changing it. Please contact your Moodle Administrator.';
$string['auth_cas_cantconnect'] = 'LDAP part of CAS-module cannot connect to server: {$a}';
$string['auth_cas_casversion'] = 'Version';
$string['auth_cas_certificate_check'] = 'Turn this to \'yes\' if you want to validate the server certificate';
$string['auth_cas_certificate_path_empty'] = 'If you turn on Server validation, you need to specify a certificate path';
$string['auth_cas_certificate_check_key'] = 'Server validation';
$string['auth_cas_certificate_path'] = 'Path of the CA chain file (PEM Format) to validate the server certificate';
$string['auth_cas_certificate_path_key'] = 'Certificate path';
$string['auth_cas_create_user'] = 'Turn this on if you want to insert CAS-authenticated users in Moodle database. If not then only users who already exist in the Moodle database can log in.';
$string['auth_cas_create_user_key'] = 'Create user';
$string['auth_casdescription'] = 'This method uses a CAS server (Central Authentication Service) to authenticate users in a Single Sign On environment (SSO). You can also use a simple LDAP authentication. If the given username and password are valid according to CAS, Moodle creates a new user entry in its database, taking user attributes from LDAP if required. On following logins only the username and password are checked.';
+38 -37
View File
@@ -1,20 +1,17 @@
<?php
/**
* @author Martin Dougiamas
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package moodle multiauth
*
* Authentication Plugin: External Database Authentication
*
* Checks against an external database.
*
* 2006-08-28 File created.
* @package auth
* @subpackage db
* @author Martin Dougiamas
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/authlib.php');
require_once($CFG->libdir.'/adodb/adodb.inc.php');
@@ -53,7 +50,7 @@ class auth_plugin_db extends auth_plugin_base {
$authdb = $this->db_init();
if ($this->config->passtype === 'internal') {
if ($this->is_internal()) {
// lookup username externally, but resolve
// password locally -- to support backend that
// don't track passwords
@@ -65,10 +62,10 @@ class auth_plugin_db extends auth_plugin_base {
return false;
}
if ( !$rs->EOF ) {
if (!$rs->EOF) {
$rs->Close();
$authdb->Close();
// user exists exterally
// user exists externally
// check username/password internally
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
return validate_internal_user_password($user, $password);
@@ -81,7 +78,7 @@ class auth_plugin_db extends auth_plugin_base {
}
} else {
// normal case: use external db for passwords
// normal case: use external db for both usernames and passwords
if ($this->config->passtype === 'md5') { // Re-format password accordingly
$extpassword = md5($extpassword);
@@ -126,6 +123,7 @@ class auth_plugin_db extends auth_plugin_base {
return $authdb;
}
/**
* retuns user attribute mappings between moodle and ldap
*
@@ -151,7 +149,6 @@ class auth_plugin_db extends auth_plugin_base {
* @return array without magic quotes
*/
function get_userinfo($username) {
global $CFG;
$textlib = textlib_get_instance();
@@ -186,10 +183,8 @@ class auth_plugin_db extends auth_plugin_base {
}
$authdb->Close();
return $result;
}
/**
* Change a user's password
*
@@ -199,9 +194,7 @@ class auth_plugin_db extends auth_plugin_base {
* @return bool True on success
*/
function user_update_password($user, $newpassword) {
global $CFG;
if ($this->config->passtype === 'internal') {
if ($this->is_internal()) {
return update_internal_user_password($user, $newpassword);
} else {
// we should have never been called!
@@ -219,15 +212,13 @@ class auth_plugin_db extends auth_plugin_base {
* Syncing users removes (disables) users that dont exists anymore in external db.
* Creates new users and updates coursecreator status of users.
*
* @param bool $do_updates Optional: set to true to force an update of existing accounts
*
* This implementation is simpler but less scalable than the one found in the LDAP module.
*
* @param bool $do_updates Optional: set to true to force an update of existing accounts
* @return bool success
*/
function sync_users($do_updates=false) {
global $CFG, $DB;
$pcfg = get_config('auth/db');
/// list external users
$userlist = $this->get_userlist();
@@ -370,7 +361,7 @@ class auth_plugin_db extends auth_plugin_base {
$id = $DB->insert_record ('user',$user); // it is truly a new user
echo "\t"; print_string('auth_dbinsertuser','auth_db',array('name'=>$user->username, 'id'=>$id)); echo "\n";
// if relevant, tag for password generation
if ($this->config->passtype === 'internal') {
if ($this->is_internal()) {
set_user_preference('auth_forcepasswordchange', 1, $id);
set_user_preference('create_password', 1, $id);
}
@@ -397,7 +388,7 @@ class auth_plugin_db extends auth_plugin_base {
if (!$rs) {
print_error('auth_dbcantconnect','auth_db');
} else if ( !$rs->EOF ) {
} else if (!$rs->EOF) {
// user exists exterally
$result = true;
}
@@ -420,7 +411,7 @@ class auth_plugin_db extends auth_plugin_base {
if (!$rs) {
print_error('auth_dbcantconnect','auth_db');
} else if ( !$rs->EOF ) {
} else if (!$rs->EOF) {
while ($rec = $rs->FetchRow()) {
$rec = (object)array_change_key_case((array)$rec , CASE_LOWER);
array_push($result, $rec->username);
@@ -546,8 +537,8 @@ class auth_plugin_db extends auth_plugin_base {
}
if (!empty($update)) {
$authdb->Execute("UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser}='".$this->ext_addslashes($extusername)."'");
SET ".implode(',', $update)."
WHERE {$this->config->fielduser}='".$this->ext_addslashes($extusername)."'");
}
$authdb->Close();
return true;
@@ -565,14 +556,13 @@ class auth_plugin_db extends auth_plugin_base {
}
function prevent_local_passwords() {
if (!isset($this->config->passtype)) {
return false;
}
return ($this->config->passtype != 'internal');
return !$this->is_internal();
}
/**
* Returns true if this authentication plugin is 'internal'.
* Returns true if this authentication plugin is "internal".
*
* Internal plugins use password hashes from Moodle user table for authentication.
*
* @return bool
*/
@@ -580,7 +570,18 @@ class auth_plugin_db extends auth_plugin_base {
if (!isset($this->config->passtype)) {
return true;
}
return ($this->config->passtype == 'internal');
return ($this->config->passtype === 'internal');
}
/**
* Indicates if moodle should automatically update internal user
* records with data from external sources using the information
* from auth_plugin_base::get_userinfo().
*
* @return bool true means automatically copy data from ext to user table
*/
function is_synchronised_with_external() {
return true;
}
/**
@@ -590,7 +591,7 @@ class auth_plugin_db extends auth_plugin_base {
* @return bool
*/
function can_change_password() {
return ($this->config->passtype == 'internal' or !empty($this->config->changepasswordurl));
return ($this->is_internal() or !empty($this->config->changepasswordurl));
}
/**
@@ -600,11 +601,11 @@ class auth_plugin_db extends auth_plugin_base {
* @return moodle_url
*/
function change_password_url() {
if ($this->config->passtype == 'internal') {
if ($this->is_internal()) {
// standard form
return null;
} else {
// use custom url
// use admin defined custom url
return new moodle_url($this->config->changepasswordurl);
}
}
@@ -615,7 +616,7 @@ class auth_plugin_db extends auth_plugin_base {
* @return bool
*/
function can_reset_password() {
return ($this->config->passtype == 'internal');
return $this->is_internal();
}
/**
+3 -3
View File
@@ -42,10 +42,10 @@ $string['auth_dbchangepasswordurl_key'] = 'Password-change URL';
$string['auth_dbinsertuser'] = 'Inserted user {$a->name} id {$a->id}';
$string['auth_dbinsertusererror'] = 'Error inserting user {$a}';
$string['auth_dbname'] = 'Name of the database itself';
$string['auth_dbname_key'] = 'DB Name';
$string['auth_dbname_key'] = 'DB name';
$string['auth_dbpass'] = 'Password matching the above username';
$string['auth_dbpass_key'] = 'Password';
$string['auth_dbpasstype'] = '<p>Specify the format that the password field is using. MD5 hashing is useful for connecting to other common web applications like PostNuke.</p> <p>Use \'internal\' if you want to the external DB to manage usernames &amp; email addresses, but Moodle to manage passwords. If you use \'internal\', you <i>must</i> provide a populated email address field in the external DB, and you must execute both admin/cron.php and auth/db/auth_db_sync_users.php regularly. Moodle will send an email to new users with a temporary password.</p>';
$string['auth_dbpasstype'] = '<p>Specify the format that the password field is using. MD5 hashing is useful for connecting to other common web applications like PostNuke.</p> <p>Use \'internal\' if you want to the external DB to manage usernames &amp; email addresses, but Moodle to manage passwords. If you use \'internal\', you <i>must</i> provide a populated email address field in the external DB, and you must execute both admin/cron.php and auth/db/cli/sync_users.php regularly. Moodle will send an email to new users with a temporary password.</p>';
$string['auth_dbpasstype_key'] = 'Password format';
$string['auth_dbreviveduser'] = 'Revived user {$a->name} id {$a->id}';
$string['auth_dbrevivedusererror'] = 'Error reviving user {$a}';
@@ -61,7 +61,7 @@ $string['auth_dbtype'] = 'The database type (See the <a href="../lib/adodb/readm
$string['auth_dbtype_key'] = 'Database';
$string['auth_dbupdatinguser'] = 'Updating user {$a->name} id {$a->id}';
$string['auth_dbuser'] = 'Username with read access to the database';
$string['auth_dbuser_key'] = 'DB User';
$string['auth_dbuser_key'] = 'DB user';
$string['auth_dbusernotexist'] = 'Cannot update non-existent user: {$a}';
$string['auth_dbuserstoadd'] = 'User entries to add: {$a}';
$string['auth_dbuserstoremove'] = 'User entries to remove: {$a}';
+2 -2
View File
@@ -28,7 +28,7 @@ $string['auth_ldap_attrcreators'] = 'List of groups or contexts whose members ar
$string['auth_ldap_attrcreators_key'] = 'Attribute creators';
$string['auth_ldap_auth_user_create_key'] = 'Create users externally';
$string['auth_ldap_bind_dn'] = 'If you want to use bind-user to search users, specify it here. Something like \'cn=ldapuser,ou=public,o=org\'';
$string['auth_ldap_bind_dn_key'] = 'Distinguished Name';
$string['auth_ldap_bind_dn_key'] = 'Distinguished name';
$string['auth_ldap_bind_pw'] = 'Password for bind-user.';
$string['auth_ldap_bind_pw_key'] = 'Password';
$string['auth_ldap_bind_settings'] = 'Bind settings';
@@ -103,7 +103,7 @@ $string['auth_ntlmsso_ie_fastpath'] = 'Set to yes to enable the NTLM SSO fast pa
$string['auth_ntlmsso_ie_fastpath_key'] = 'MS IE fast path?';
$string['auth_ntlmsso_subnet'] = 'If set, it will only attempt SSO with clients in this subnet. Format: xxx.xxx.xxx.xxx/bitmask';
$string['auth_ntlmsso_subnet_key'] = 'Subnet';
$string['auth_ntlmsso_type_key'] = 'Authentication Type';
$string['auth_ntlmsso_type_key'] = 'Authentication type';
$string['auth_ntlmsso_type'] = 'The authentication method configured in the web server to authenticate the users (if in doubt, choose NTLM)';
$string['connectingldap'] = "Connecting to LDAP server...\n";
$string['creatingtemptable'] = "Creating temporary table {\$a}\n";
+73 -46
View File
@@ -80,13 +80,15 @@ class auth_plugin_mnet extends auth_plugin_base {
$userdata['session.gc_maxlifetime'] = ini_get('session.gc_maxlifetime');
if (array_key_exists('picture', $userdata) && !empty($user->picture)) {
//TODO: rewrite to use new file storage
/*
$imagefile = make_user_directory($user->id, true) . "/f1.jpg";
if (file_exists($imagefile)) {
$userdata['imagehash'] = sha1(file_get_contents($imagefile));
$fs = get_file_storage();
$usercontext = get_context_instance(CONTEXT_USER, $user->id, MUST_EXIST);
if ($usericonfile = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f1.png')) {
$userdata['_mnet_userpicture_timemodified'] = $usericonfile->get_timemodified();
$userdata['_mnet_userpicture_mimetype'] = $usericonfile->get_mimetype();
} else if ($usericonfile = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f1.jpg')) {
$userdata['_mnet_userpicture_timemodified'] = $usericonfile->get_timemodified();
$userdata['_mnet_userpicture_mimetype'] = $usericonfile->get_mimetype();
}
*/
}
$userdata['myhosts'] = array();
@@ -200,6 +202,7 @@ class auth_plugin_mnet extends auth_plugin_base {
function confirm_mnet_session($token, $remotepeer) {
global $CFG, $DB;
require_once $CFG->dirroot . '/mnet/xmlrpc/client.php';
require_once $CFG->libdir . '/gdlib.php';
// verify the remote host is configured locally before attempting RPC call
if (! $remotehost = $DB->get_record('mnet_host', array('wwwroot' => $remotepeer->wwwroot, 'deleted' => 0))) {
@@ -284,41 +287,42 @@ class auth_plugin_mnet extends auth_plugin_base {
print_error('sso_mnet_login_refused', 'mnet', '', array('user'=>$localuser->username, 'host'=>$remotehost->name));
}
$fs = get_file_storage();
// update the local user record with remote user data
foreach ((array) $remoteuser as $key => $val) {
// TODO: fetch image if it has changed
//TODO: rewrite to use new file storage
if ($key == 'imagehash') {
/*
$dirname = make_user_directory($localuser->id, true);
$filename = "$dirname/f1.jpg";
$localhash = '';
if (file_exists($filename)) {
$localhash = sha1(file_get_contents($filename));
} elseif (!file_exists($dirname)) {
mkdir($dirname);
if ($key == '_mnet_userpicture_timemodified' and empty($CFG->disableuserimages) and isset($remoteuser->picture)) {
// update the user picture if there is a newer verion at the identity provider
$usercontext = get_context_instance(CONTEXT_USER, $localuser->id, MUST_EXIST);
if ($usericonfile = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f1.png')) {
$localtimemodified = $usericonfile->get_timemodified();
} else if ($usericonfile = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f1.jpg')) {
$localtimemodified = $usericonfile->get_timemodified();
} else {
$localtimemodified = 0;
}
if ($localhash != $val) {
// fetch image from remote host
if (!empty($val) and $localtimemodified < $val) {
mnet_debug('refetching the user picture from the identity provider host');
$fetchrequest = new mnet_xmlrpc_client();
$fetchrequest->set_method('auth/mnet/auth.php/fetch_user_image');
$fetchrequest->add_param($localuser->username);
if ($fetchrequest->send($remotepeer) === true) {
if (strlen($fetchrequest->response['f1']) > 0) {
$imagefilename = $CFG->dataroot . '/temp/mnet-usericon-' . $localuser->id;
$imagecontents = base64_decode($fetchrequest->response['f1']);
file_put_contents($filename, $imagecontents);
$localuser->picture = 1;
}
if (strlen($fetchrequest->response['f2']) > 0) {
$imagecontents = base64_decode($fetchrequest->response['f2']);
file_put_contents($dirname.'/f2.jpg', $imagecontents);
file_put_contents($imagefilename, $imagecontents);
if (process_new_icon($usercontext, 'user', 'icon', 0, $imagefilename)) {
$localuser->picture = 1;
}
unlink($imagefilename);
}
// note that since Moodle 2.0 we ignore $fetchrequest->response['f2']
// the mimetype information provided is ignored and the type of the file is detected
// by process_new_icon()
}
}
*/
}
if($key == 'myhosts') {
@@ -460,9 +464,16 @@ class auth_plugin_mnet extends auth_plugin_base {
}
// make sure it is a user we have an in active session
// with that host...
if (!$userid = $DB->get_field('mnet_session', 'userid',
array('username'=>$username, 'mnethostid'=>$remoteclient->id))) {
throw new mnet_server_exception(1, 'authfail_nosessionexists');
$mnetsessions = $DB->get_records('mnet_session', array('username' => $username, 'mnethostid' => $remoteclient->id), '', 'id, userid');
$userid = null;
foreach ($mnetsessions as $mnetsession) {
if (is_null($userid)) {
$userid = $mnetsession->userid;
continue;
}
if ($userid != $mnetsession->userid) {
throw new mnet_server_exception(3, 'authfail_usermismatch');
}
}
if (empty($courses)) { // no courses? clear out quickly
@@ -538,9 +549,11 @@ class auth_plugin_mnet extends auth_plugin_base {
}
// Clean up courses that the user is no longer enrolled in.
$local_courseid_string = implode(', ', $local_courseid_array);
$whereclause = " userid = ? AND hostid = ? AND courseid NOT IN ($local_courseid_string)";
$DB->delete_records_select('mnetservice_enrol_enrolments', $whereclause, array($userid, $remoteclient->id));
if (!empty($local_courseid_array)) {
$local_courseid_string = implode(', ', $local_courseid_array);
$whereclause = " userid = ? AND hostid = ? AND remotecourseid NOT IN ($local_courseid_string)";
$DB->delete_records_select('mnetservice_enrol_enrolments', $whereclause, array($userid, $remoteclient->id));
}
}
function prevent_local_passwords() {
@@ -1100,31 +1113,45 @@ class auth_plugin_mnet extends auth_plugin_base {
}
/**
* Returns the user's image as a base64 encoded string.
* Returns the user's profile image info
*
* If the user exists and has a profile picture, the returned array will contain keys:
* f1 - the content of the default 100x100px image
* f1_mimetype - the mimetype of the f1 file
* f2 - the content of the 35x35px variant of the image
* f2_mimetype - the mimetype of the f2 file
*
* The mimetype information was added in Moodle 2.0. In Moodle 1.x, images are always jpegs.
*
* @see process_new_icon()
* @uses mnet_remote_client callable via MNet XML-RPC
* @param int $userid The id of the user
* @return string The encoded image
* @return false|array false if user not found, empty array if no picture exists, array with data otherwise
*/
function fetch_user_image($username) {
global $CFG, $DB;
//TODO: rewrite to use new file storage
return false;
/*
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
$filename1 = make_user_directory($user->id, true) . "/f1.jpg";
$filename2 = make_user_directory($user->id, true) . "/f2.jpg";
if ($user = $DB->get_record('user', array('username' => $username, 'mnethostid' => $CFG->mnet_localhost_id))) {
$fs = get_file_storage();
$usercontext = get_context_instance(CONTEXT_USER, $user->id, MUST_EXIST);
$return = array();
if (file_exists($filename1)) {
$return['f1'] = base64_encode(file_get_contents($filename1));
if ($f1 = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f1.png')) {
$return['f1'] = base64_encode($f1->get_content());
$return['f1_mimetype'] = $f1->get_mimetype();
} else if ($f1 = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f1.jpg')) {
$return['f1'] = base64_encode($f1->get_content());
$return['f1_mimetype'] = $f1->get_mimetype();
}
if (file_exists($filename2)) {
$return['f2'] = base64_encode(file_get_contents($filename2));
if ($f2 = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f2.png')) {
$return['f2'] = base64_encode($f2->get_content());
$return['f2_mimetype'] = $f2->get_mimetype();
} else if ($f2 = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', 'f2.jpg')) {
$return['f2'] = base64_encode($f2->get_content());
$return['f2_mimetype'] = $f2->get_mimetype();
}
return $return;
}
return false;
*/
}
/**
+2 -2
View File
@@ -242,7 +242,7 @@ class auth_plugin_shibboleth extends auth_plugin_base {
// set to defaults if undefined
if (!isset($config->auth_instructions) or empty($config->user_attribute)) {
$config->auth_instructions = get_string('shibboleth_instructions', 'auth', $CFG->wwwroot.'/auth/shibboleth/index.php');
$config->auth_instructions = get_string('auth_shib_instructions', 'auth_shibboleth', $CFG->wwwroot.'/auth/shibboleth/index.php');
}
if (!isset ($config->user_attribute)) {
$config->user_attribute = '';
@@ -292,7 +292,7 @@ class auth_plugin_shibboleth extends auth_plugin_base {
} else {
// Check if integrated WAYF was enabled and is now turned off
// If it was and only then, reset the Moodle alternate URL
if ($this->config->alt_login == 'on'){
if (isset($this->config->alt_login) and $this->config->alt_login == 'on'){
set_config('alt_login', 'off', 'auth/shibboleth');
set_config('alternateloginurl', '');
}
+5 -5
View File
@@ -23,25 +23,25 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['auth_shib_auth_method'] = 'Authentication Method Name';
$string['auth_shib_auth_method'] = 'Authentication method name';
$string['auth_shib_auth_method_description'] = 'Provide a name for the Shibboleth authentication method that is familiar to your users. This could be the name of your Shibboleth federation, e.g. <tt>SWITCHaai Login</tt> or <tt>InCommon Login</tt> or similar.';
$string['auth_shibboleth_contact_administrator'] = 'In case you are not associated with the given organizations and you need access to a course on this server, please contact the';
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using <a href="http://shibboleth.internet2.edu/">Shibboleth</a>.<br />Be sure to read the <a href="../auth/shibboleth/README.txt">README</a> for Shibboleth on how to set up your Moodle with Shibboleth';
$string['auth_shibboleth_errormsg'] = 'Please select the organization you are member of!';
$string['auth_shibboleth_login'] = 'Shibboleth Login';
$string['auth_shibboleth_login'] = 'Shibboleth login';
$string['auth_shibboleth_login_long'] = 'Login to Moodle via Shibboleth';
$string['auth_shibboleth_manual_login'] = 'Manual Login';
$string['auth_shibboleth_manual_login'] = 'Manual login';
$string['auth_shibboleth_select_member'] = 'I\'m a member of ...';
$string['auth_shibboleth_select_organization'] = 'For authentication via Shibboleth, please select your organization from the drop down list:';
$string['auth_shib_convert_data'] = 'Data modification API';
$string['auth_shib_convert_data_description'] = 'You can use this API to further modify the data provided by Shibboleth. Read the <a href="../auth/shibboleth/README.txt">README</a> for further instructions.';
$string['auth_shib_convert_data_warning'] = 'The file does not exist or is not readable by the webserver process!';
$string['auth_shib_changepasswordurl'] = 'Password-change URL';
$string['auth_shib_idp_list'] = 'Identity Providers';
$string['auth_shib_idp_list'] = 'Identity providers';
$string['auth_shib_idp_list_description'] = 'Provide a list of Identity Provider entityIDs to let the user choose from on the login page.<br />On each line there must be a comma-separated tuple for entityID of the IdP (see the Shibboleth metadata file) and Name of IdP as it shall be displayed in the drop-down list.<br />As an optional third parameter you can add the location of a Shibboleth session initiator that shall be used in case your Moodle installation is part of a multi federation setup.';
$string['auth_shib_instructions'] = 'Use the <a href="{$a}">Shibboleth login</a> to get access via Shibboleth, if your institution supports it.<br />Otherwise, use the normal login form shown here.';
$string['auth_shib_instructions_help'] = 'Here you should provide custom instructions for your users to explain Shibboleth. It will be shown on the login page in the instructions section. The instructions must include a link to "<b>{$a}</b>" that users click when they want to log in.';
$string['auth_shib_integrated_wayf'] = 'Moodle WAYF Service';
$string['auth_shib_integrated_wayf'] = 'Moodle WAYF service';
$string['auth_shib_integrated_wayf_description'] = 'If you check this, Moodle will use its own WAYF service instead of the one configured for Shibboleth. Moodle will display a drop-down list on this alternative login page where the user has to select his Identity Provider.';
$string['auth_shib_logout_return_url'] = 'Alternative logout return URL';
$string['auth_shib_logout_return_url_description'] = 'Provide the URL that Shibboleth users shall be redirected to after logging out.<br />If left empty, users will be redirected to the location that moodle will redirect users to';
+8 -7
View File
@@ -12,7 +12,7 @@ require_once($CFG->dirroot."/auth/shibboleth/auth.php");
// Find out whether host supports https
$protocol = 'http://';
if ( isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'){
$protocol = 'https://';
$protocol = 'https://';
}
// Front channel logout
@@ -197,11 +197,12 @@ function LogoutNotification($SessionID){
/*****************************************************************************/
// Same function as in adodb, but cannot be used for file session for some reason...
function unserializesession( $serialized_string ){
$variables = array( );
$a = preg_split( "/(\w+)\|/", $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
for( $i = 0; $i < count( $a ); $i = $i+2 ) {
$variables[$a[$i]] = unserialize( $a[$i+1] );
function unserializesession($serialized_string) {
$variables = array();
$a = preg_split("/(\w+)\|/", $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$counta = count($a);
for ($i = 0; $i < $counta; $i = $i+2) {
$variables[$a[$i]] = unserialize($a[$i+1]);
}
return( $variables );
return $variables;
}
+2 -2
View File
@@ -107,8 +107,8 @@ abstract class backup implements checksumable {
const OPERATION_RESTORE ='restore';// We are performing one restore
// Version (to keep CFG->backup_version (and release) updated automatically)
const VERSION = 2010101000;
const RELEASE = '2.0 RC2';
const VERSION = 2010111800;
const RELEASE = '2.0';
}
/*
+2
View File
@@ -100,4 +100,6 @@ if ($backup->enforce_changed_dependencies()) {
}
echo $renderer->progress_bar($backup->get_progress_bar());
echo $backup->display();
$backup->destroy();
unset($backup);
echo $OUTPUT->footer();
+20 -1
View File
@@ -139,6 +139,23 @@ class backup_controller extends backup implements loggable {
}
}
/**
* Clean structures used by the backup_controller
*
* This method clean various structures used by the backup_controller,
* destroying them in an ordered way, so their memory will be gc properly
* by PHP (mainly circular references).
*
* Note that, while it's not mandatory to execute this method, it's highly
* recommended to do so, specially in scripts performing multiple operations
* (like the automated backups) or the system will run out of memory after
* a few dozens of backups)
*/
public function destroy() {
// Only need to destroy circulars under the plan. Delegate to it.
$this->plan->destroy();
}
public function finish_ui() {
if ($this->status != backup::STATUS_SETTING_UI) {
throw new backup_controller_exception('cannot_finish_ui_if_not_setting_ui');
@@ -161,7 +178,9 @@ class backup_controller extends backup implements loggable {
// containing all the steps will be sent to DB. 100% (monster) useless.
if ($status == backup::STATUS_AWAITING) {
$this->save_controller();
$this->logger = self::load_controller($this->backupid)->logger; // wakeup loggers
$tbc = self::load_controller($this->backupid);
$this->logger = $tbc->logger; // wakeup loggers
$tbc->destroy(); // Clean temp controller structures
}
}
+20 -1
View File
@@ -135,6 +135,23 @@ class restore_controller extends backup implements loggable {
}
}
/**
* Clean structures used by the restore_controller
*
* This method clean various structures used by the restore_controller,
* destroying them in an ordered way, so their memory will be gc properly
* by PHP (mainly circular references).
*
* Note that, while it's not mandatory to execute this method, it's highly
* recommended to do so, specially in scripts performing multiple operations
* (like the automated backups) or the system will run out of memory after
* a few dozens of backups)
*/
public function destroy() {
// Only need to destroy circulars under the plan. Delegate to it.
$this->plan->destroy();
}
public function finish_ui() {
if ($this->status != backup::STATUS_SETTING_UI) {
throw new restore_controller_exception('cannot_finish_ui_if_not_setting_ui');
@@ -157,7 +174,9 @@ class restore_controller extends backup implements loggable {
// containing all the steps will be sent to DB. 100% (monster) useless.
if ($status == backup::STATUS_AWAITING || $status == backup::STATUS_NEED_PRECHECK) {
$this->save_controller();
$this->logger = self::load_controller($this->restoreid)->logger; // wakeup loggers
$tbc = self::load_controller($this->restoreid);
$this->logger = $tbc->logger; // wakeup loggers
$tbc->destroy(); // Clean temp controller structures
}
}
+5 -1
View File
@@ -90,6 +90,8 @@ if ($backup->get_stage() == backup_ui::STAGE_CONFIRMATION) {
if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
// First execute the backup
$backup->execute();
$backup->destroy();
unset($backup);
// Check whether the backup directory still exists. If missing, something
// went really wrong in backup, throw error. Note that backup::MODE_IMPORT
@@ -156,4 +158,6 @@ if ($backup->enforce_changed_dependencies()) {
}
echo $renderer->progress_bar($backup->get_progress_bar());
echo $backup->display();
echo $OUTPUT->footer();
$backup->destroy();
unset($backup);
echo $OUTPUT->footer();
+5 -3
View File
@@ -119,7 +119,7 @@
}
// Loop through all directory entries, and construct two temporary arrays containing files and sub directories
while(false !== ($entry = readdir($handle))) {
while (false !== ($entry = readdir($handle))) {
if (is_dir($dir. $slash .$entry) && $entry != ".." && $entry != "." && $entry != $excludeddir) {
$dir_subdirs[] = $dir. $slash .$entry;
}
@@ -129,7 +129,8 @@
}
// Delete all files in the curent directory return false and halt if a file cannot be removed
for($i=0; $i<count($dir_files); $i++) {
$countdirfiles = count($dir_files);
for ($i=0; $i<$countdirfiles; $i++) {
chmod($dir_files[$i], $CFG->directorypermissions);
if (((unlink($dir_files[$i]))) == FALSE) {
return false;
@@ -137,7 +138,8 @@
}
// Empty sub directories and then remove the directory
for($i=0; $i<count($dir_subdirs); $i++) {
$countdirsubdirs = count($dir_subdirs);
for($i=0; $i<$countdirsubdirs; $i++) {
chmod($dir_subdirs[$i], $CFG->directorypermissions);
if (delete_dir_contents($dir_subdirs[$i]) == FALSE) {
return false;
@@ -0,0 +1,50 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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 3 of the License, or
// (at your option) any later version.
//
// Moodle 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.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package moodlecore
* @subpackage backup-moodle2
* @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the course formats (format plugin)
*
* TODO: Finish phpdocs
*/
abstract class backup_format_plugin extends backup_plugin {
protected $courseformat; // To store the format (course->format) of the instance
public function __construct($plugintype, $pluginname, $optigroup, $step) {
parent::__construct($plugintype, $pluginname, $optigroup, $step);
$this->courseformat = backup_plan_dbops::get_courseformat_from_courseid($this->task->get_courseid());
}
/**
* Return the condition encapsulated into sqlparam format
* to get evaluated by value, not by path nor processor setting
*/
protected function get_format_condition() {
return array('sqlparam' => $this->courseformat);
}
}
@@ -34,6 +34,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_default_block_task.class.ph
require_once($CFG->dirroot . '/backup/moodle2/backup_xml_transformer.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_subplugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_settingslib.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_stepslib.php');
+22 -2
View File
@@ -33,12 +33,16 @@ abstract class backup_plugin {
protected $pluginname;
protected $connectionpoint;
protected $optigroup; // Optigroup, parent of all optigroup elements
protected $step;
protected $task;
public function __construct($plugintype, $pluginname, $optigroup) {
public function __construct($plugintype, $pluginname, $optigroup, $step) {
$this->plugintype = $plugintype;
$this->pluginname = $pluginname;
$this->optigroup = $optigroup;
$this->optigroup = $optigroup;
$this->connectionpoint = '';
$this->step = $step;
$this->task = $step->get_task();
}
public function define_plugin_structure($connectionpoint) {
@@ -52,6 +56,22 @@ abstract class backup_plugin {
}
}
// Protected API starts here
// backup_step/structure_step/task wrappers
/**
* Returns the value of one (task/plan) setting
*/
protected function get_setting_value($name) {
if (is_null($this->task)) {
throw new backup_step_exception('not_specified_backup_task');
}
return $this->task->get_setting_value($name);
}
// end of backup_step/structure_step/task wrappers
/**
* Factory method that will return one backup_plugin_element (backup_optigroup_element)
* with its name automatically calculated, based one the plugin being handled (type, name)
+18 -1
View File
@@ -125,13 +125,21 @@ abstract class backup_activity_structure_step extends backup_structure_step {
$backupfile = $subpluginsdir . '/backup/moodle2/' . $classname . '.class.php';
if (file_exists($backupfile)) {
require_once($backupfile);
$backupsubplugin = new $classname($subplugintype, $name, $optigroup);
$backupsubplugin = new $classname($subplugintype, $name, $optigroup, $this);
// Add subplugin returned structure to optigroup
$backupsubplugin->define_subplugin_structure($element->get_name());
}
}
}
/**
* As far as activity backup steps are implementing backup_subplugin stuff, they need to
* have the parent task available for wrapping purposes (get course/context....)
*/
public function get_task() {
return $this->task;
}
/**
* Wraps any activity backup structure within the common 'activity' element
* that will include common to all activities information like id, context...
@@ -310,6 +318,9 @@ class backup_module_structure_step extends backup_structure_step {
$availability = new backup_nested_element('availability', array('id'), array(
'sourcecmid', 'requiredcompletion', 'gradeitemid', 'grademin', 'grademax'));
// attach format plugin structure to $module element, only one allowed
$this->add_plugin_structure('format', $module, false);
// Define the tree
$module->add_child($availinfo);
$availinfo->add_child($availability);
@@ -346,6 +357,9 @@ class backup_section_structure_step extends backup_structure_step {
$section = new backup_nested_element('section', array('id'), array(
'number', 'name', 'summary', 'summaryformat', 'sequence', 'visible'));
// attach format plugin structure to $section element, only one allowed
$this->add_plugin_structure('format', $section, false);
// Define sources
$section->set_source_table('course_sections', array('id' => backup::VAR_SECTIONID));
@@ -395,6 +409,9 @@ class backup_course_structure_step extends backup_structure_step {
$module = new backup_nested_element('module', array(), array('modulename'));
// attach format plugin structure to $course element, only one allowed
$this->add_plugin_structure('format', $course, false);
// Build the tree
$course->add_child($category);
+21 -1
View File
@@ -34,12 +34,16 @@ abstract class backup_subplugin {
protected $subpluginname;
protected $connectionpoint;
protected $optigroup; // Optigroup, parent of all optigroup elements
protected $step;
protected $task;
public function __construct($subplugintype, $subpluginname, $optigroup) {
public function __construct($subplugintype, $subpluginname, $optigroup, $step) {
$this->subplugintype = $subplugintype;
$this->subpluginname = $subpluginname;
$this->optigroup = $optigroup;
$this->connectionpoint = '';
$this->step = $step;
$this->task = $step->get_task();
}
public function define_subplugin_structure($connectionpoint) {
@@ -53,6 +57,22 @@ abstract class backup_subplugin {
}
}
// Protected API starts here
// backup_step/structure_step/task wrappers
/**
* Returns the value of one (task/plan) setting
*/
protected function get_setting_value($name) {
if (is_null($this->task)) {
throw new backup_step_exception('not_specified_backup_task');
}
return $this->task->get_setting_value($name);
}
// end of backup_step/structure_step/task wrappers
/**
* Factory method that will return one backup_subplugin_element (backup_optigroup_element)
* with its name automatically calculated, based one the subplugin being handled (type, name)
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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 3 of the License, or
// (at your option) any later version.
//
// Moodle 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.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package moodlecore
* @subpackage backup-moodle2
* @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Class extending standard restore_plugin in order to implement some
* helper methods related with the course formats (format plugin)
*
* TODO: Finish phpdocs
*/
abstract class restore_format_plugin extends restore_plugin {
// Love these classes. :-) Nothing special to customize here for now
}
@@ -33,8 +33,10 @@ require_once($CFG->dirroot . '/backup/moodle2/restore_block_task.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_default_block_task.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_format_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_subplugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_settingslib.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_stepslib.php');
+12
View File
@@ -202,6 +202,18 @@ abstract class restore_plugin {
return $this->step->apply_date_offset($value);
}
/**
* Returns the value of one (task/plan) setting
*/
protected function get_setting_value($name) {
if (is_null($this->task)) {
throw new restore_step_exception('not_specified_restore_task');
}
return $this->task->get_setting_value($name);
}
// end of restore_step/structure_step/task wrappers
/**
* Simple helper function that returns the name for the restore_path_element
* It's not mandatory to use it but recommended ;-)
@@ -126,7 +126,12 @@ abstract class restore_qtype_plugin extends restore_plugin {
// The question existed, we need to map the existing question_answers
} else {
// Look in question_answers by answertext matching
$newitemid = $DB->get_field('question_answers', 'id', array('question' => $newquestionid, 'answer' => $data->answertext));
$sql = 'SELECT id
FROM {question_answers}
WHERE question = ?
AND ' . $DB->sql_compare_text('answer', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$params = array($newquestionid, $data->answertext);
$newitemid = $DB->get_field_sql($sql, $params);
// If we haven't found the newitemid, something has gone really wrong, question in DB
// is missing answers, exception
if (!$newitemid) {
@@ -134,7 +139,7 @@ abstract class restore_qtype_plugin extends restore_plugin {
$info->filequestionid = $oldquestionid;
$info->dbquestionid = $newquestionid;
$info->answer = $data->answertext;
throw restore_step_exception('error_question_answers_missing_in_db', $info);
throw new restore_step_exception('error_question_answers_missing_in_db', $info);
}
}
// Create mapping (we'll use this intensively when restoring question_states. And also answerfeedback files)
@@ -32,12 +32,14 @@ class restore_section_task extends restore_task {
protected $info; // info related to section gathered from backup file
protected $contextid; // course context id
protected $sectionid; // new (target) id of the course section
/**
* Constructor - instantiates one object of this class
*/
public function __construct($name, $info, $plan = null) {
$this->info = $info;
$this->sectionid = 0;
parent::__construct($name, $plan);
}
@@ -49,10 +51,18 @@ class restore_section_task extends restore_task {
return $this->get_basepath() . '/sections/section_' . $this->info->sectionid;
}
public function set_sectionid($sectionid) {
$this->sectionid = $sectionid;
}
public function get_contextid() {
return $this->contextid;
}
public function get_sectionid() {
return $this->sectionid;
}
/**
* Create all the steps that will be part of this task
*/
+78 -39
View File
@@ -660,8 +660,8 @@ class restore_groups_structure_step extends restore_structure_step {
$params = array('courseid' => $this->get_courseid(), 'grname' => $data->name);
if (!empty($data->description)) {
$description_clause = ' AND ' .
$DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':desc');
$params['desc'] = $data->description;
$DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':description');
$params['description'] = $data->description;
}
if (!$groupdb = $DB->get_record_sql("SELECT *
FROM {groups}
@@ -708,8 +708,8 @@ class restore_groups_structure_step extends restore_structure_step {
$params = array('courseid' => $this->get_courseid(), 'grname' => $data->name);
if (!empty($data->description)) {
$description_clause = ' AND ' .
$DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':desc');
$params['desc'] = $data->description;
$DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':description');
$params['description'] = $data->description;
}
if (!$groupingdb = $DB->get_record_sql("SELECT *
FROM {groupings}
@@ -920,7 +920,12 @@ class restore_process_categories_and_questions extends restore_execution_step {
class restore_section_structure_step extends restore_structure_step {
protected function define_structure() {
return array(new restore_path_element('section', '/section'));
$section = new restore_path_element('section', '/section');
// Apply for 'format' plugins optional paths at section level
$this->add_plugin_structure('format', $section);
return array($section);
}
public function process_section($data) {
@@ -962,12 +967,20 @@ class restore_section_structure_step extends restore_structure_step {
// Annotate the section mapping, with restorefiles option if needed
$this->set_mapping('course_section', $oldid, $newitemid, $restorefiles);
// set the new course_section id in the task
$this->task->set_sectionid($newitemid);
// Commented out. We never modify course->numsections as far as that is used
// by a lot of people to "hide" sections on purpose (so this remains as used to be in Moodle 1.x)
// Note: We keep the code here, to know about and because of the possibility of making this
// optional based on some setting/attribute in the future
// If needed, adjust course->numsections
if ($numsections = $DB->get_field('course', 'numsections', array('id' => $this->get_courseid()))) {
if ($numsections < $section->section) {
$DB->set_field('course', 'numsections', $section->section, array('id' => $this->get_courseid()));
}
}
//if ($numsections = $DB->get_field('course', 'numsections', array('id' => $this->get_courseid()))) {
// if ($numsections < $section->section) {
// $DB->set_field('course', 'numsections', $section->section, array('id' => $this->get_courseid()));
// }
//}
}
protected function after_execute() {
@@ -987,12 +1000,15 @@ class restore_course_structure_step extends restore_structure_step {
protected function define_structure() {
$course = new restore_path_element('course', '/course', true); // Grouped
$course = new restore_path_element('course', '/course');
$category = new restore_path_element('category', '/course/category');
$tag = new restore_path_element('tag', '/course/tags/tag');
$allowed = new restore_path_element('allowed', '/course/allowed_modules/module');
$allowed_module = new restore_path_element('allowed_module', '/course/allowed_modules/module');
return array($course, $category, $tag, $allowed);
// Apply for 'format' plugins optional paths at course level
$this->add_plugin_structure('format', $course);
return array($course, $category, $tag, $allowed_module);
}
/**
@@ -1022,9 +1038,6 @@ class restore_course_structure_step extends restore_structure_step {
$data->shortname= $shortname;
$data->idnumber = '';
// Category is set by UI when choosing the destination
unset($data->category);
$data->startdate= $this->apply_date_offset($data->startdate);
if ($data->defaultgroupingid) {
$data->defaultgroupingid = $this->get_mappingid('grouping', $data->defaultgroupingid);
@@ -1046,34 +1059,56 @@ class restore_course_structure_step extends restore_structure_step {
// Course record ready, update it
$DB->update_record('course', $data);
// Course tags
if (!empty($CFG->usetags) && isset($coursetags)) { // if enabled in server and present in backup
// Role name aliases
restore_dbops::set_course_role_names($this->get_restoreid(), $this->get_courseid());
}
public function process_category($data) {
// Nothing to do with the category. UI sets it before restore starts
}
public function process_tag($data) {
global $CFG, $DB;
$data = (object)$data;
if (!empty($CFG->usetags)) { // if enabled in server
// TODO: This is highly inneficient. Each time we add one tag
// we fetch all the existing because tag_set() deletes them
// so everything must be reinserted on each call
$tags = array();
foreach ($coursetags as $coursetag) {
$coursetag = (object)$coursetag;
$tags[] = $coursetag->rawname;
$existingtags = tag_get_tags('course', $this->get_courseid());
// Re-add all the existitng tags
foreach ($existingtags as $existingtag) {
$tags[] = $existingtag->rawname;
}
// Add the one being restored
$tags[] = $data->rawname;
// Send all the tags back to the course
tag_set('course', $this->get_courseid(), $tags);
}
// Course allowed modules
if (!empty($data->restrictmodules) && !empty($coursemodules)) {
}
public function process_allowed_module($data) {
global $CFG, $DB;
$data = (object)$data;
// only if enabled by admin setting
if (!empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all') {
$available = get_plugin_list('mod');
foreach ($coursemodules as $coursemodule) {
$mname = $coursemodule['modulename'];
if (array_key_exists($mname, $available)) {
if ($module = $DB->get_record('modules', array('name' => $mname, 'visible' => 1))) {
$rec = new stdclass();
$rec->course = $this->get_courseid();
$rec->module = $module->id;
if (!$DB->record_exists('course_allowed_modules', (array)$rec)) {
$DB->insert_record('course_allowed_modules', $rec);
}
$mname = $data->modulename;
if (array_key_exists($mname, $available)) {
if ($module = $DB->get_record('modules', array('name' => $mname, 'visible' => 1))) {
$rec = new stdclass();
$rec->course = $this->get_courseid();
$rec->module = $module->id;
if (!$DB->record_exists('course_allowed_modules', (array)$rec)) {
$DB->insert_record('course_allowed_modules', $rec);
}
}
}
}
// Role name aliases
restore_dbops::set_course_role_names($this->get_restoreid(), $this->get_courseid());
}
protected function after_execute() {
@@ -1782,7 +1817,7 @@ class restore_activity_grades_structure_step extends restore_structure_step {
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$gradeitem = new grade_item($data);
$gradeitem = new grade_item($data, false);
$gradeitem->insert('restore');
//sortorder is automatically assigned when inserting. Re-instate the previous sortorder
@@ -1805,7 +1840,7 @@ class restore_activity_grades_structure_step extends restore_structure_step {
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$grade = new grade_grade($data);
$grade = new grade_grade($data, false);
$grade->insert('restore');
// no need to save any grade_grade mapping
}
@@ -1959,11 +1994,15 @@ class restore_module_structure_step extends restore_structure_step {
$paths = array();
$paths[] = new restore_path_element('module', '/module');
$module = new restore_path_element('module', '/module');
$paths[] = $module;
if ($CFG->enableavailability) {
$paths[] = new restore_path_element('availability', '/module/availability_info/availability');
}
// Apply for 'format' plugins optional paths at module level
$this->add_plugin_structure('format', $module);
return $paths;
}
@@ -2215,7 +2254,7 @@ class restore_create_categories_and_questions extends restore_structure_step {
// Check we have one mapping for this category
if (!$mapping = $this->get_mapping('question_category', $oldid)) {
return; // No mapping = this category doesn't need to be created/mapped
return self::SKIP_ALL_CHILDREN; // No mapping = this category doesn't need to be created/mapped
}
// Check we have to create the category (newitemid = 0)
@@ -151,6 +151,18 @@ abstract class restore_subplugin {
return $this->step->apply_date_offset($value);
}
/**
* Returns the value of one (task/plan) setting
*/
protected function get_setting_value($name) {
if (is_null($this->task)) {
throw new restore_step_exception('not_specified_restore_task');
}
return $this->task->get_setting_value($name);
}
// end of restore_step/structure_step/task wrappers
/**
* Simple helper function that returns the name for the restore_path_element
* It's not mandatory to use it but recommended ;-)
+2
View File
@@ -54,4 +54,6 @@ if (!$restore->is_independent() && $restore->enforce_changed_dependencies()) {
}
echo $renderer->progress_bar($restore->get_progress_bar());
echo $restore->display($renderer);
$restore->destroy();
unset($restore);
echo $OUTPUT->footer();
+2 -1
View File
@@ -377,7 +377,8 @@
$tagsarr = $info['BLOG']['#']['BLOG_TAGS']['0']['#']['BLOG_TAG'];
//Iterate over tags
$tags = array();
for($i = 0; $i < sizeof($tagsarr); $i++) {
$sizetagsarr = sizeof($tagsarr);
for ($i = 0; $i < $sizetagsarr; $i++) {
$tag_info = $tagsarr[$i];
///traverse_xmlize($tag_info); //Debug
///print_object ($GLOBALS['traverse_array']); //Debug
@@ -95,35 +95,48 @@ abstract class backup_controller_dbops extends backup_dbops {
global $CFG, $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services
// Note: For now we are going to load the realtablename from core lib/db/install.xml
// that way, any change in the "template" will be applied here automatically. If this causes
// too much slow, we can always forget about the template and keep maintained the xmldb_table
// structure inline - manually - here.
// TODO: Right now, loading the whole lib/db/install.xml is "eating" 10M, we should
// change our way here in order to decrease that memory usage
$templatetablename = $realtablename;
$targettablename = $temptablename;
$xmlfile = $CFG->dirroot . '/lib/db/install.xml';
$xmldb_file = new xmldb_file($xmlfile);
if (!$xmldb_file->fileExists()) {
throw new ddl_exception('ddlxmlfileerror', null, 'File does not exist');
}
$loaded = $xmldb_file->loadXMLStructure();
if (!$loaded || !$xmldb_file->isLoaded()) {
throw new ddl_exception('ddlxmlfileerror', null, 'not loaded??');
}
$xmldb_structure = $xmldb_file->getStructure();
$xmldb_table = $xmldb_structure->getTable($templatetablename);
if (is_null($xmldb_table)) {
throw new ddl_exception('ddlunknowntable', null, 'The table ' . $templatetablename . ' is not defined in file ' . $xmlfile);
// As far as xmldb objects use a lot of circular references (prev and next) and we aren't destroying
// them at all, that causes one memory leak of about 3M per backup execution, not problematic for
// individual backups but critical for automated (multiple) ones.
// So we are statically caching the xmldb_table definition here to produce the leak "only" once
static $xmldb_tables = array();
// Not cached, get it
if (!isset($xmldb_tables[$realtablename])) {
// Note: For now we are going to load the realtablename from core lib/db/install.xml
// that way, any change in the "template" will be applied here automatically. If this causes
// too much slow, we can always forget about the template and keep maintained the xmldb_table
// structure inline - manually - here.
// TODO: Right now, loading the whole lib/db/install.xml is "eating" 10M, we should
// change our way here in order to decrease that memory usage
$templatetablename = $realtablename;
$targettablename = $temptablename;
$xmlfile = $CFG->dirroot . '/lib/db/install.xml';
$xmldb_file = new xmldb_file($xmlfile);
if (!$xmldb_file->fileExists()) {
throw new ddl_exception('ddlxmlfileerror', null, 'File does not exist');
}
$loaded = $xmldb_file->loadXMLStructure();
if (!$loaded || !$xmldb_file->isLoaded()) {
throw new ddl_exception('ddlxmlfileerror', null, 'not loaded??');
}
$xmldb_structure = $xmldb_file->getStructure();
$xmldb_table = $xmldb_structure->getTable($templatetablename);
if (is_null($xmldb_table)) {
throw new ddl_exception('ddlunknowntable', null, 'The table ' . $templatetablename . ' is not defined in file ' . $xmlfile);
}
// Clean prev & next, we are alone
$xmldb_table->setNext(null);
$xmldb_table->setPrevious(null);
// Rename
$xmldb_table->setName($targettablename);
// Cache it
$xmldb_tables[$realtablename] = $xmldb_table;
}
// Arrived here, we have the table always in static cache, get it
$xmldb_table = $xmldb_tables[$realtablename];
// Set default backupid (not needed but this enforce any missing backupid). That's hackery in action!
$xmldb_table->getField('backupid')->setDefault($backupid);
// Clean prev & next, we are alone
$xmldb_table->setNext(null);
$xmldb_table->setPrevious(null);
// Rename
$xmldb_table->setName($targettablename);
$dbman->create_temp_table($xmldb_table); // And create it
}
@@ -344,6 +357,8 @@ abstract class backup_controller_dbops extends backup_dbops {
}
}
$bc->destroy(); // Always need to destroy controller to handle circular references
return array(array((object)$detailsinfo), $contentsinfo, $settingsinfo);
}
+43 -19
View File
@@ -119,6 +119,15 @@ abstract class backup_plan_dbops extends backup_dbops {
return $sectionsarr;
}
/**
* Given one course id, return its format in DB
*/
public static function get_courseformat_from_courseid($courseid) {
global $DB;
return $DB->get_field('course', 'format', array('id' => $courseid));
}
/**
* Return the wwwroot of the $CFG->mnet_localhost_id host
* caching it along the request
@@ -138,34 +147,49 @@ abstract class backup_plan_dbops extends backup_dbops {
* Returns the default backup filename, based in passed params.
*
* Default format is (see MDL-22145)
* backup word - format - type - name - date - info . mbz
* backup word - format - type - name - date - info . mbz
* where name is variable (course shortname, section name/id, activity modulename + cmid)
* and info can be (nu = no user info, an = anonymized)
* and info can be (nu = no user info, an = anonymized). The last param $useidasname,
* defaulting to false, allows to replace the course shortname by the course id (used
* by automated backups, to avoid non-ascii chars in OS filesystem)
*
* @param string $format One of backup::FORMAT_
* @param string $type One of backup::TYPE_
* @param int $courseid/$sectionid/$cmid
* @param bool $users Should be true is users were included in the backup
* @param bool $anonymised Should be true is user information was anonymized.
* @param bool $useidasname true to use id, false to use strings (default)
* @return string The filename to use
*/
public static function get_default_backup_filename($format, $type, $id, $users, $anonymised) {
public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $useidasname = false) {
global $DB;
// Calculate backup word
$backupword = str_replace(' ', '_', moodle_strtolower(get_string('backupfilename')));
$backupword = trim(clean_filename($backupword), '_');
// Calculate proper name element (based on type)
switch ($type) {
case backup::TYPE_1COURSE:
$shortname = $DB->get_field('course', 'shortname', array('id' => $id));
break;
case backup::TYPE_1SECTION:
if (!$shortname = $DB->get_field('course_sections', 'name', array('id' => $id))) {
$shortname = $DB->get_field('course_sections', 'section', array('id' => $id));
}
break;
case backup::TYPE_1ACTIVITY:
$cm = get_coursemodule_from_id(null, $id);
$shortname = $cm->modname . $id;
break;
$shortname = '';
// Not $useidasname, lets calculate it, else $id will be used
if (!$useidasname) {
// Calculate proper name element (based on type)
switch ($type) {
case backup::TYPE_1COURSE:
$shortname = $DB->get_field('course', 'shortname', array('id' => $id));
break;
case backup::TYPE_1SECTION:
if (!$shortname = $DB->get_field('course_sections', 'name', array('id' => $id))) {
$shortname = $DB->get_field('course_sections', 'section', array('id' => $id));
}
break;
case backup::TYPE_1ACTIVITY:
$cm = get_coursemodule_from_id(null, $id);
$shortname = $cm->modname . $id;
break;
}
$shortname = str_replace(' ', '_', $shortname);
$shortname = moodle_strtolower(trim(clean_filename($shortname), '_'));
}
$shortname = str_replace(' ', '_', $shortname);
$shortname = moodle_strtolower(trim(clean_filename($shortname), '_'));
$name = empty($shortname) ? $id : $shortname;
// Calculate date
+30 -50
View File
@@ -49,8 +49,8 @@ abstract class backup_cron_automated_helper {
/** Run if required by the schedule set in config. Default. **/
const RUN_ON_SCHEDULE = 0;
/** Run immediatly. **/
const RUN_IMMEDIATLY = 1;
/** Run immediately. **/
const RUN_IMMEDIATELY = 1;
const AUTO_BACKUP_DISABLED = 0;
const AUTO_BACKUP_ENABLED = 1;
@@ -75,7 +75,7 @@ abstract class backup_cron_automated_helper {
return $state;
} else if ($state === backup_cron_automated_helper::STATE_RUNNING) {
mtrace('RUNNING');
if ($rundirective == self::RUN_IMMEDIATLY) {
if ($rundirective == self::RUN_IMMEDIATELY) {
mtrace('automated backups are already. If this script is being run by cron this constitues an error. You will need to increase the time between executions within cron.');
} else {
mtrace("automated backup are already running. Execution delayed");
@@ -130,12 +130,12 @@ abstract class backup_cron_automated_helper {
$DB->update_record('backup_courses', $backupcourse);
mtrace('Skipping unchanged course '.$course->fullname);
$skipped = true;
} else if (($backupcourse->nextstarttime >= 0 && $backupcourse->nextstarttime < $now) || $rundirective == self::RUN_IMMEDIATLY) {
} else if (($backupcourse->nextstarttime >= 0 && $backupcourse->nextstarttime < $now) || $rundirective == self::RUN_IMMEDIATELY) {
mtrace('Backing up '.$course->fullname, '...');
//We have to send a email because we have included at least one backup
$emailpending = true;
//Only make the backup if laststatus isn't 2-UNFINISHED (uncontrolled error)
if ($backupcourse->laststatus != 2) {
//Set laststarttime
@@ -270,7 +270,7 @@ abstract class backup_cron_automated_helper {
$config = get_config('backup');
$midnight = usergetmidnight($now, $timezone);
$date = usergetdate($now, $timezone);
//Get number of days (from today) to execute backups
$automateddays = substr($config->backup_auto_weekdays,$date['wday']) . $config->backup_auto_weekdays;
$daysfromtoday = strpos($automateddays, "1");
@@ -335,7 +335,7 @@ abstract class backup_cron_automated_helper {
$users = $bc->get_plan()->get_setting('users')->get_value();
$anonymised = $bc->get_plan()->get_setting('anonymize')->get_value();
$bc->get_plan()->get_setting('filename')->set_value(backup_plan_dbops::get_default_backup_filename($format, $type, $id, $users, $anonymised));
$bc->set_status(backup::STATUS_AWAITING);
$outcome = $bc->execute_plan();
@@ -347,53 +347,25 @@ abstract class backup_cron_automated_helper {
$dir = null;
}
if (!empty($dir) && $storage !== 0) {
$filename = self::get_external_filename($course->id, $format, $type, $users, $anonymised);
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, true);
$outcome = $file->copy_content_to($dir.'/'.$filename);
if ($outcome && $storage === 1) {
$file->delete();
}
}
$outcome = true;
} catch (backup_exception $e) {
$bc->log('backup_auto_failed_on_course', backup::LOG_WARNING, $course->shortname);
return false;
$outcome = false;
}
$bc->destroy();
unset($bc);
return true;
}
/**
* Gets the filename to use for the backup when it is being moved to an
* external location.
*
* Note: we use the course id in the filename rather than the course shortname
* because it may contain UTF-8 characters that could cause problems for the
* recieving filesystem.
*
* @param int $courseid
* @param string $format One of backup::FORMAT_
* @param string $type One of backup::TYPE_
* @param bool $users Should be true is users were included in the backup
* @param bool $anonymised Should be true is user information was anonymized.
* @return string The filename to use
*/
public static function get_external_filename($courseid, $format, $type, $users, $anonymised) {
$backupword = str_replace(' ', '_', moodle_strtolower(get_string('backupfilename')));
$backupword = trim(clean_filename($backupword), '_');
// Calculate date
$backupdateformat = str_replace(' ', '_', get_string('backupnameformat', 'langconfig'));
$date = userdate(time(), $backupdateformat, 99, false);
$date = moodle_strtolower(trim(clean_filename($date), '_'));
// Calculate info
$info = '';
if (!$users) {
$info = 'nu';
} else if ($anonymised) {
$info = 'an';
}
return $backupword.'-'.$format.'-'.$type.'-'.$courseid.'-'.$date.'-'.$info.'.mbz';
}
/**
* Removes deleted courses fromn the backup_courses table so that we don't
* waste time backing them up.
@@ -484,32 +456,39 @@ abstract class backup_cron_automated_helper {
$filearea = 'automated';
$itemid = 0;
$files = array();
// Store all the matching files into timemodified => stored_file array
foreach ($fs->get_area_files($context->id, $component, $filearea, $itemid) as $file) {
if (strpos($file->get_filename(), $backupword) !== 0) {
continue;
}
$files[$file->get_timemodified()] = $file;
}
arsort($files);
if (count($files) <= $keep) {
// There are less matching files than the desired number to keep
// do there is nothing to clean up.
return 0;
}
// Sort by keys descending (newer to older filemodified)
krsort($files);
$remove = array_splice($files, $keep);
foreach ($remove as $file) {
$file->delete();
}
//mtrace('Removed '.count($remove).' old backup file(s) from the data directory');
//mtrace('Removed '.count($remove).' old backup file(s) from the automated filearea');
}
// Clean up excess backups in the specified external directory
if (!empty($dir) && ($storage == 1 || $storage == 2)) {
// Calculate backup filename regex
// Calculate backup filename regex, ignoring the date/time/info parts that can be
// variable, depending of languages, formats and automated backup settings
$filename = $backupword . '-' . backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' .$course->id . '-';
$regex = '#^'.preg_quote($filename, '#').'.*\.mbz$#';
$regex = '#^'.preg_quote($filename, '#').'(\d{8})\-(\d{4})\-[a-z]{2}\.mbz$#S';
// Store all the matching files into fullpath => timemodified array
$files = array();
foreach (scandir($dir) as $file) {
if (preg_match($regex, $file, $matches)) {
$files[$file] = $matches[1].$matches[2];
$files[$file] = filemtime($dir . '/' . $file);
}
}
if (count($files) <= $keep) {
@@ -517,14 +496,15 @@ abstract class backup_cron_automated_helper {
// do there is nothing to clean up.
return 0;
}
// Sort by values descending (newer to older filemodified)
arsort($files);
$remove = array_splice($files, $keep);
foreach (array_keys($remove) as $file) {
unlink($dir.'/'.$file);
unlink($dir . '/' . $file);
}
//mtrace('Removed '.count($remove).' old backup file(s) from external directory');
}
return true;
}
}
}
+10
View File
@@ -47,6 +47,16 @@ class backup_plan extends base_plan implements loggable {
parent::__construct('backup_plan');
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// No need to destroy anything recursively here, direct reset
$this->controller = null;
// Delegate to base plan the rest
parent::destroy();
}
public function build() {
backup_factory::build_plan($this->controller); // Dispatch to correct format
$this->built = true;
@@ -101,6 +101,14 @@ abstract class backup_structure_step extends backup_step {
$structure->destroy();
}
/**
* As far as backup structure steps are implementing backup_plugin stuff, they need to
* have the parent task available for wrapping purposes (get course/context....)
*/
public function get_task() {
return $this->task;
}
// Protected API starts here
/**
@@ -133,7 +141,7 @@ abstract class backup_structure_step extends backup_step {
$backupfile = $plugindir . '/backup/moodle2/' . $classname . '.class.php';
if (file_exists($backupfile)) {
require_once($backupfile);
$backupplugin = new $classname($plugintype, $name, $optigroup);
$backupplugin = new $classname($plugintype, $name, $optigroup, $this);
// Add plugin returned structure to optigroup
$backupplugin->define_plugin_structure($element->get_name());
}
+16
View File
@@ -148,6 +148,22 @@ abstract class base_plan implements checksumable, executable {
$task->execute();
}
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// Before reseting anything, call destroy recursively
foreach ($this->tasks as $task) {
$task->destroy();
}
foreach ($this->settings as $setting) {
$setting->destroy();
}
// Everything has been destroyed recursively, now we can reset safely
$this->tasks = array();
$this->settings = array();
}
}
+15
View File
@@ -57,6 +57,14 @@ abstract class base_step implements executable, loggable {
$this->task = $task;
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// No need to destroy anything recursively here, direct reset
$this->task = null;
}
public function log($message, $level, $a = null, $depth = null, $display = false) {
if (is_null($this->task)) {
throw new base_step_exception('not_specified_base_task');
@@ -80,6 +88,13 @@ abstract class base_step implements executable, loggable {
return $this->task->get_setting($name);
}
protected function setting_exists($name) {
if (is_null($this->task)) {
throw new base_step_exception('not_specified_base_task');
}
return $this->task->setting_exists($name);
}
protected function get_setting_value($name) {
if (is_null($this->task)) {
throw new base_step_exception('not_specified_base_task');
+22 -1
View File
@@ -32,7 +32,7 @@ abstract class base_task implements checksumable, executable, loggable {
protected $name; // One simple name for identification purposes
protected $plan; // Plan this is part of
protected $settings; // One array of base_setting elements to define this task
protected $steps; // One array of base_task elements
protected $steps; // One array of base_step elements
protected $built; // Flag to know if one task has been built
protected $executed; // Flag to know if one task has been executed
@@ -87,6 +87,10 @@ abstract class base_task implements checksumable, executable, loggable {
}
}
public function setting_exists($name) {
return $this->plan->setting_exists($name);
}
public function get_setting_value($name) {
return $this->get_setting($name)->get_value();
}
@@ -159,6 +163,23 @@ abstract class base_task implements checksumable, executable, loggable {
}
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// Before reseting anything, call destroy recursively
foreach ($this->steps as $step) {
$step->destroy();
}
foreach ($this->settings as $setting) {
$setting->destroy();
}
// Everything has been destroyed recursively, now we can reset safely
$this->steps = array();
$this->setting = array();
$this->plan = null;
}
public function is_checksum_correct($checksum) {
return $this->calculate_checksum() === $checksum;
}
+10
View File
@@ -59,6 +59,16 @@ class restore_plan extends base_plan implements loggable {
parent::__construct('restore_plan');
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// No need to destroy anything recursively here, direct reset
$this->controller = null;
// Delegate to base plan the rest
parent::destroy();
}
public function build() {
restore_plan_builder::build_plan($this->controller); // We are moodle2 always, go straight to builder
$this->built = true;
@@ -38,6 +38,11 @@ abstract class restore_structure_step extends restore_step {
protected $elementsoldid; // Array to store last oldid used on each element
protected $elementsnewid; // Array to store last newid used on each element
protected $pathlock; // Path currently locking processing of children
const SKIP_ALL_CHILDREN = -991399; // To instruct the dispatcher about to ignore
// all children below path processor returning it
/**
* Constructor - instantiates one object of this class
*/
@@ -50,10 +55,11 @@ abstract class restore_structure_step extends restore_step {
$this->pathelements = array();
$this->elementsoldid = array();
$this->elementsnewid = array();
$this->pathlock = null;
parent::__construct($name, $task);
}
public function execute() {
final public function execute() {
if (!$this->execute_condition()) { // Check any condition to execute this
return;
@@ -106,18 +112,37 @@ abstract class restore_structure_step extends restore_step {
* Receive one chunk of information form the xml parser processor and
* dispatch it, following the naming rules
*/
public function process($data) {
final public function process($data) {
if (!array_key_exists($data['path'], $this->pathelements)) { // Incorrect path, must not happen
throw new restore_step_exception('restore_structure_step_missing_path', $data['path']);
}
$element = $this->pathelements[$data['path']];
$object = $element->get_processing_object();
$method = $element->get_processing_method();
$rdata = null;
if (empty($object)) { // No processing object defined
throw new restore_step_exception('restore_structure_step_missing_pobject', $object);
}
$rdata = $object->$method($data['tags']); // Dispatch to proper object/method
if ($rdata !== null) { // If the method has returned any info, set element data to it
// Release the lock if we aren't anymore within children of it
if (!is_null($this->pathlock) and strpos($data['path'], $this->pathlock) === false) {
$this->pathlock = null;
}
if (is_null($this->pathlock)) { // Only dispatch if there isn't any lock
$rdata = $object->$method($data['tags']); // Dispatch to proper object/method
}
// If the dispatched method returns SKIP_ALL_CHILDREN, we grab current path in order to
// lock dispatching to any children
if ($rdata === self::SKIP_ALL_CHILDREN) {
// Check we haven't any previous lock
if (!is_null($this->pathlock)) {
throw new restore_step_exception('restore_structure_step_already_skipping', $data['path']);
}
// Set the lock
$this->pathlock = $data['path'] . '/'; // Lock everything below current path
// Continue with normal processing of return values
} else if ($rdata !== null) { // If the method has returned any info, set element data to it
$element->set_data($rdata);
} else { // Else, put the original parsed data
$element->set_data($data);
@@ -213,10 +238,13 @@ abstract class restore_structure_step extends restore_step {
}
// No cache, let's calculate the offset
$original = $this->task->get_info()->original_course_startdate;
$setting = $this->get_setting_value('course_startdate');
$setting = 0;
if ($this->setting_exists('course_startdate')) { // Seting may not exist (MDL-25019)
$setting = $this->get_setting_value('course_startdate');
}
// Original course has not startdate, offset = 0
if (empty($original)) {
// Original course has not startdate or setting doesn't exist, offset = 0
if (empty($original) || empty($setting)) {
$cache[$this->get_restoreid()] = 0;
// Less than 24h of difference, offset = 0 (this avoids some problems with timezones)
@@ -113,6 +113,26 @@ abstract class base_setting {
$this->uisetting = new base_setting_ui($this);
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// Before reseting anything, call destroy recursively
foreach ($this->dependencies as $dependency) {
$dependency->destroy();
}
foreach ($this->dependenton as $dependenton) {
$dependenton->destroy();
}
if ($this->uisetting) {
$this->uisetting->destroy();
}
// Everything has been destroyed recursively, now we can reset safely
$this->dependencies = array();
$this->dependenton = array();
$this->uisetting = null;
}
public function get_name() {
return $this->name;
}
@@ -77,6 +77,16 @@ abstract class setting_dependency {
$this->defaultvalue = $defaultvalue;
$this->lastvalue = $dependentsetting->get_value();
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// No need to destroy anything recursively here, direct reset
$this->setting = null;
$this->dependentsetting = null;
}
/**
* Processes a change is setting called by the primary setting
* @param int $changetype
@@ -442,4 +452,4 @@ class setting_dependency_disabledif_empty extends setting_dependency_disabledif_
// Else return based upon the dependent settings status
return ($this->dependentsetting->get_status() !== base_setting::NOT_LOCKED);
}
}
}
@@ -94,6 +94,10 @@ abstract class base_nested_element extends base_final_element {
}
protected function check_and_set_used($element) {
// First of all, check the element being added doesn't conflict with own final elements
if (array_key_exists($element->get_name(), $this->final_elements)) {
throw new base_element_struct_exception('baseelementchildnameconflict', $element->get_name());
}
$grandparent = $this->get_grandoptigroupelement_or_grandparent();
if ($existing = array_intersect($grandparent->get_used(), $element->get_used())) { // Check the element isn't being used already
throw new base_element_struct_exception('baseelementexisting', implode($existing));
@@ -393,5 +393,16 @@ class base_nested_element_test extends UnitTestCase {
$this->assertTrue($e instanceof base_element_parent_exception);
}
// Add child element already used by own final elements
$nested = new mock_base_nested_element('PARENT1', null, array('FINAL1', 'FINAL2'));
$child = new mock_base_nested_element('FINAL2', null, array('FINAL3', 'FINAL4'));
try {
$nested->add_child($child);
$this->fail("Expecting base_element_struct_exception exception, none occurred");
} catch (Exception $e) {
$this->assertTrue($e instanceof base_element_struct_exception);
$this->assertEqual($e->errorcode, 'baseelementchildnameconflict');
$this->assertEqual($e->a, 'FINAL2');
}
}
}
+10 -1
View File
@@ -73,6 +73,15 @@ class base_setting_ui {
public function __construct(base_setting $setting) {
$this->setting = $setting;
}
/**
* Destroy all circular references. It helps PHP 5.2 a lot!
*/
public function destroy() {
// No need to destroy anything recursively here, direct reset
$this->setting = null;
}
/**
* Gets the name of this item including its prefix
* @return string
@@ -581,4 +590,4 @@ class backup_setting_ui_dateselector extends backup_setting_ui_text {
}
class base_setting_ui_exception extends base_setting_exception {}
class backup_setting_ui_exception extends base_setting_ui_exception {};
class backup_setting_ui_exception extends base_setting_ui_exception {};
+11
View File
@@ -72,6 +72,17 @@ abstract class base_ui {
// Process UI event before to be safe
$this->controller->process_ui_event();
}
/**
* Destorys the backup controller and the loaded stage.
*/
public function destroy() {
if ($this->controller) {
$this->controller->destroy();
}
unset($this->stage);
}
/**
* Intialises what ever stage is requested. If none are requested we check
* params for 'stage' and default to initial

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