2167 Commits

Author SHA1 Message Date
Mark Nelson
da3041379a MDL-41792 core_calendar: refactored the calendar to allow the use of multiple calendar types 2013-10-04 16:17:02 +08:00
Adrian Greeve
a49bc6c940 MDL-42098 - Libraries: Alter fullname debugging logic to display when user name fields are missing. 2013-10-04 15:03:00 +08:00
Marina Glancy
e6ec2366a8 Merge branch 'MDL-41885-master' of git://github.com/danpoltawski/moodle
Conflicts:
	mod/upgrade.txt
2013-09-30 17:57:30 +10:00
Mark Nielsen
50ae8814e4 MDL-40248 mod: Allow xxx_get_types() to use default display
* Added new constant: MOD_SUBTYPE_NO_CHILDREN
* When MOD_SUBTYPE_NO_CHILDREN is returned from xxx_get_types()
  then default display is used for activity chooser.
* Updated mod/upgrade.txt
* Removed dead code from navigationlib.php instead of updating
  it for new behavior of xxx_get_types
* Updated lib/upgrade.txt
2013-09-30 16:49:37 +10:00
Dan Poltawski
b07ef13be2 MDL-41885 modules now declare use of question bank
* FEATURE_USES_QUESTION_BANK is now a module_supports flag which declares
  that an activity uses the question engine.

* question_module_uses_questions can be used to determine if a module
  uses the question bank.
2013-09-26 09:49:34 +08:00
Eloy Lafuente (stronk7)
18ccaca2e2 Merge branch 'MDL-41726-master-2nd' of git://github.com/FMCorz/moodle
Conflicts:
	lang/en/moodle.php
2013-09-24 23:13:50 +02:00
Eloy Lafuente (stronk7)
161f995849 Merge branch 'w39_MDL-41437_m26_mia' of https://github.com/skodak/moodle
Conflicts:
	admin/auth.php
	lib/db/upgrade.php
	version.php
2013-09-24 20:18:03 +02:00
Marina Glancy
009e0d28ae Merge branch 'w39_MDL-37324_m26_phpmailer' of https://github.com/skodak/moodle 2013-09-23 18:15:35 +10:00
Petr Škoda
6226cc30fb MDL-37324 fix phpmailer method case names and standardise phpmailer init 2013-09-23 10:11:27 +02:00
Dan Poltawski
f5dfefdc87 MDL-41885 lib: Introduce component_callback_exists
Determines if a callback in a module exists without needing to
call that callback.
2013-09-23 10:44:42 +08:00
Petr Škoda
bde002b81a MDL-41437 rework plugin_manager caching and version info in blocks and modules
This patch includes:

* version column removed from modules table, now using standard config, this allows decimal version for modules
* version column removed from block table, now using standard config, this allows decimal version for blocks
* module version.php can safely use $plugins instead of module
* new plugin_manager bulk caching, this should help with MUC performance when logged in as admin
* all missing plugins are now in plugin overview (previously only blocks and modules)
* simplified code and improved coding style
* reworked plugin_manager unit tests - now using real plugins instead of mocks
* unit tests now fail if any plugin does not contain proper version.php file
* allow uninstall of deleted filters
2013-09-22 21:25:26 +02:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Frederic Massart
11b0c8e0e6 MDL-41726 mod_quiz: Replace handlers with observers for group events
This also implements a filtering of the events to be handled when
a course reset has been started.
2013-09-20 12:25:38 +08:00
Rajesh Taneja
2b503e40f2 MDL-31560 Messages: Deprecated generate_email_supportuser
generate_email_supportuser was not creating user which can
be used by messaging system. core_user::get_support_user()
should be used to get support_user record.
2013-09-13 16:13:26 +08:00
Marina Glancy
4a3fb71c4f MDL-41436 Removing references to fields course.modinfo, sectioncache
Also add the field cacherev to the lists of default fields in course retrieval functions
2013-09-10 14:11:51 +10:00
Marina Glancy
299cfee5f2 MDL-41436 Move course content cache to MUC
added cache definition and DB field course.cacherev for cache validation
2013-09-10 14:11:45 +10:00
Mark Nelson
deed22ea39 MDL-18375 calendar: removed usage of the calendar type in the usergetdate function
The usergetdate function is not only used to display dates, it is also passed
to the function make_timestamp. This means users using another calendar type
other than Gregorian will generate incorrect timestamps which may be saved in
the DB or used to populate the date_selector and date_time_selector elements.
For example, when creating an assignment using another calendar type other
than Gregorian, the mod_form.php file calls $this->apply_admin_defaults()
which uses the function usergetmidnight to set the "Allow submissions from"
date to today's date and the "Due date" field to 7 days in the future. The
usergetmidnight function calls usergetdate which is then passed to
make_timestamp. Since the usergetdate function was using the calendar
type's timestamp_to_date_array function the date being passed to
make_timestamp was not in Gregorian. So, when using the hijri calendar the
year 1434 was being passed which was generating a large negative number as
the timestamp which was then used to populate the date fields.
2013-09-05 18:32:16 +08:00
Mark Nelson
6eafa4ddba MDL-18375 calendar: changed the name of the function factory to be more descriptive 2013-09-05 18:32:16 +08:00
Mark Nelson
f59ab4adc8 MDL-18375 calendar: renamed the userdate/usergetdate functions and changed them to abstract
Renamed the userdate/usergetdate functions in the calendar type to be more
descriptive and made them abstract to ensure developers implement this
functionality in their calendar type.

Also tidied up PHPDocs for these functions.
2013-09-05 18:32:16 +08:00
Mark Nelson
022745acd2 MDL-18375 calendar: implemented the usage of the recently introduced automatic class loading 2013-09-05 18:32:16 +08:00
Mark Nelson
2f00e1b245 MDL-18375 calendar: huge refactor of the initial patch
1) Moved the calendar types location to a sub-folder in the calendar directory.
2) Removed/moved language strings.
3) Removed calendar types that should be downloaded as plugins.
4) Removed a Non-English language pack for the Gregorian calendar type that
should be downloaded separately.
5) Removed custom files responsible for checking for updates and uninstalling
calendar types, which should be done by core.
6) Removed JS from the calendar_month block as there is no non-JS alternative
provided and the JS written does not make use of the YUI library to ensure
multiple browser support.
7) Removed code from the base class responsible for creating timestamps that
are saved in the DB.
8) Added PHPDocs.

Note: In the original patch we are editing core functions responsible for saving
time in the database in the calendar base class. This is very dangerous, we do
not want to touch these functions as it could cause a complete fubar of the
database. There are places we are forcing the use of the gregorian calendar as
we are passing dates generated by the PHP date function, where as sometimes
we pass dates from usergetdate (which was being overwritten to return the
date specific to the calendar). We can not expect third party modules to
change the calendar type depending on the format they pass to these functions.
2013-09-05 18:30:05 +08:00
Shamim Rezaie
6dd59aabfa MDL-18375 calendar: added multiple calendar support
Conflicts:

	course/edit_form.php
	lib/db/install.xml
	lib/form/dateselector.php
	lib/form/datetimeselector.php
	lib/setup.php
2013-09-05 18:30:05 +08:00
Rajesh Taneja
bb78e249cd MDL-39961 Events: Replace Legacy events - User
This change includes:
* Added user_updated event, replacing old event
* Added user_created event, replacing old event
* Added user_deleted event, replacing old event
* Added user_loggedout event, replacing old event
* Added user_enrolment_created event, replacing old event
* Added user_enrolment_deleted event, replacing old event
* Added user_enrolment_updated event, replacing old event
2013-09-02 16:10:05 +08:00
Petr Škoda
bff1d60c05 MDL-40676 ignore null bytes 2013-09-02 12:25:02 +08:00
Sam Hemelryk
c3d2fbf9cd MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-26 13:59:19 +12:00
Damyon Wiese
9ead041cdb Revert "MDL-40931 useragent: separated user agent functionality into a lib"
This reverts commit af62237d0e6e27df868d50848f7098f57c103f86.
This reverts commit 87a4194fdcd322d4aee5a6207b55a8da0864da94.
This reverts commit b2c66eb60c01805f26cc791966f05be52af7b406.

Conflicts:

	version.php
2013-08-22 13:31:25 +08:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
Sam Hemelryk
487caf6b65 Revert "MDL-39876 update_course_record function to update global COURSE"
This reverts commit c290ac5510ca06b3eae557c2165c2f106dde46aa.

Conflicts:
	course/lib.php
2013-08-21 15:21:06 +12:00
Sam Hemelryk
6eee89bc8f Merge branch 'MDL-39876-master' of git://github.com/sammarshallou/moodle
Conflicts:
	course/lib.php
2013-08-21 12:08:46 +12:00
Damyon Wiese
89959d9ad1 Merge branch 'wip-MDL-40931-m26' of git://github.com/samhemelryk/moodle 2013-08-20 16:45:33 +08:00
Dan Poltawski
91a888df34 Merge branch 'MDL-39957_master' of https://github.com/markn86/moodle 2013-08-20 12:38:08 +08:00
Dan Poltawski
6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
Sam Hemelryk
af62237d0e MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-16 09:02:01 +12:00
sam marshall
c290ac5510 MDL-39876 update_course_record function to update global COURSE 2013-08-15 11:31:21 +01:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Mark Nelson
db53f7fe28 MDL-39957 course: replaced the course_content_deleted legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson
c347241ac8 MDL-39957 course: replaced the course_deleted legacy event 2013-08-15 18:14:07 +08:00
Dan Poltawski
26e5090f9e Merge branch 'wip-MDL-31836-m26' of git://github.com/samhemelryk/moodle 2013-08-13 14:57:23 +08:00
Sam Hemelryk
90fb4f39fd Merge branch 'MDL-41100-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-08-13 09:37:02 +12:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Dan Poltawski
df8cd014be Merge branch 'w33_MDL-41019_m26_langcaches' of https://github.com/skodak/moodle 2013-08-12 13:29:17 +08:00
Sam Hemelryk
1f0608ed34 MDL-31836 moodlelib: removed legacy encryptkey support 2013-08-12 10:26:01 +12:00
Petr Škoda
598a82c950 MDL-41019 improve language caching
Includes:
* no more hacky reloads, everything is written only once and kept until cache reset
* lang menu list is now cached in MUC
* both string and lang menu caches are compatible with local caches on cluster nodes
* config-dist.php cleanup
2013-08-11 09:52:34 +02:00
Frederic Massart
d0cac8b51b MDL-41100 libraries: Deprecating get_plugin_list_with_file 2013-08-09 11:59:48 +08:00
Frederic Massart
d26ec8a598 MDL-41100 libraries: Moved get_plugin_list_with_file to core_component 2013-08-09 11:56:48 +08:00
Petr Škoda
c5701ce7d4 MDL-41086 rework detection of necessary upgrades 2013-08-08 21:11:40 +02:00
Petr Škoda
166c1d74e3 MDL-41073 do not delete plugininfo caches when testing if upgrade necessary
This should help with performance for all users when admin is logged in
because these caches need to be purged only after upgrade.
2013-08-08 10:19:01 +02:00
Petr Škoda
99a9d8d937 MDL-41019 refactor string managers to new core_ classes 2013-08-08 09:10:25 +02:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Marina Glancy
e7c21ac3be Merge branch 'wip-MDL-41025-m26' of git://github.com/samhemelryk/moodle 2013-08-07 00:16:53 +10:00