626 Commits

Author SHA1 Message Date
Arnaud Trouve
ce4379973f MDL-58257 course: fix search containing a hyphen
In case a hyphen (-) was preceded and followed by spaces,
the pattern for the "not regex" was empty causing an empty response from the database.
2017-03-16 18:43:15 +01:00
Andrew Nicols
f0f4c1939c MDL-55175 course: Begin deprecation process for pring_log_* 2016-10-17 11:08:20 +08:00
Damyon Wiese
8de0b1ab7d MDL-52253 scales: Add new competence scale 2016-05-13 18:12:28 +08:00
Damyon Wiese
81967b54b6 MDL-52253 scales: Install the separate and connected scale 2016-05-13 18:11:30 +08:00
Damyon Wiese
235ef57a3d MDL-51324 forms: Add a new course selector
This is a squashed commit containing a number of changes:

This is an ajax driven course selector that has searching etc. It can select single, or multiple courses.
Make course selector accept a list of courses to exclude
courseselector - lookup coursename on setValue
Use the get_course_display_name_in_list function to generate the course names
Add a throttle to auto-complete to reduce spamming the server
Do a single query to fetch all the courses in the mform element when validation fails
Fix core course search function to return results when there are less than 2 chars in the query.
Handle setData with an empty array in new course selector
2016-03-09 13:30:18 +08:00
David Mudrák
cdc6938bf9 MDL-50509 datalib: Fix the typo in the variable name
The line is supposed to sanitize the function parameter.
2015-06-08 11:14:08 +02:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Russell Smith
1d293ca409 MDL-43421 logging: Ignore race condition in access update. 2015-01-03 20:40:12 +11:00
sam marshall
061e6b2864 MDL-44725 Availability: Replace groupmembersonly - upgrade, core (1)
* Upgrades existing data so that the groupmembersonly option is
  replaced with equivalent data for the new availability API.
* Removes the database field and admin setting used for
  groupmembersonly.
* Changes core modinfo library to remove/deprecate groupmembersonly
  data and functions.
* Changes other core library files to remove groupmembersonly
  references.

Includes deprecation of several functions, listed in lib/upgrade.txt.
2014-09-02 13:03:07 +01:00
Petr Skoda
b6f299bb69 MDL-43918 add more validation to $modulename parameter when fetching cms 2014-08-25 12:09:54 +12:00
sam marshall
8d1f33e122 MDL-44070 Conditional availability enhancements (6): core changes
Changes core code to use new API instead of the old one when
checking user access to activities and sections.

Includes changes to other libraries that are necessary after
adding the availability system and removing old conditional tables
etc.
2014-04-07 20:11:48 +01:00
Eloy Lafuente (stronk7)
6b8798dedb Merge branch 'wip-MDL-44720-master' of git://github.com/marinaglancy/moodle 2014-04-02 21:32:42 +02:00
Ankit Agarwal
52dc1de746 MDL-42891 administration: Re-implement incorrect login notification, without using the logtable. 2014-04-01 17:18:15 +08:00
Marina Glancy
92e2e85523 MDL-44720 modinfo: make it easier to use cm_info instead of get_coursemodule_from_id
by adding function cm_info::get_course_module_record()
2014-03-27 11:24:00 +08:00
Tim Hunt
c35cf42e55 MDL-44682 fix bug in decompose_update_into_safe_changes 2014-03-20 15:10:38 +00:00
Damyon Wiese
ca0361084b Merge branch 'w10_MDL-41266_m27_logging' of https://github.com/skodak/moodle 2014-03-04 13:32:43 +08:00
Tim Hunt
c185726964 MDL-44251 DB helper to update rows without violating a unique index. 2014-03-02 09:41:03 +01:00
Petr Škoda
7eaca5a810 MDL-37658 add new logging API with basic implemenation 2014-02-28 14:52:24 +08:00
Eloy Lafuente (stronk7)
1d453eff25 Merge branch 'MDL-41910_master' of git://github.com/dmonllao/moodle 2013-09-25 03:11:53 +02:00
David Monllao
0793389fd6 MDL-41910 user: Allowing LASTACCESS_UPDATE_SECS overwrite 2013-09-23 16:58:56 +08: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
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
Petr Škoda
d82993dc7f MDL-41436 implement new increment_revision_number() function
This is intended as a revision counter for local modinfo caching. It should be a lot more reliable and faster than doing it in PHP. Please note you need to invalidate all course caches after using this.
2013-09-10 14:11:44 +10: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 marshall
c290ac5510 MDL-39876 update_course_record function to update global COURSE 2013-08-15 11:31:21 +01:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Mark Nelson
4e829d48d1 MDL-40468 libraries: removed usages of get_related_contexts_string() in core
Also tidied up the functions by removing unused parameters.
2013-07-19 15:17:50 +08:00
Frederic Massart
2e4c0c9181 MDL-40424 libraries: Deprecate context_instance_preload_sql() 2013-07-12 17:41:49 +08:00
Ankit Agarwal
db314f34fb MDL-40425 libraries: Remove context_instance_preload() from core 2013-07-09 15:55:51 +08:00
Adrian Greeve
a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Sam Hemelryk
5d24aff39f Merge branch 'master_MDL-38019' of git://github.com/andyjdavis/moodle 2013-06-12 09:34:06 +12:00
sam marshall
a260245739 MDL-39723 Remove unnecessary queries for COURSE, SITE 2013-05-28 13:14:55 +01:00
Andrew Davis
b8b50d04fe MDL-38019 added add_to_config_log() to lib/datalib.php 2013-05-13 08:57:41 +08:00
Petr Škoda
cc1e433286 MDL-39306 fix course search regression
Oracle handling of NULLs is totally wrong and crazy!
2013-04-23 12:36:50 +02:00
Damyon Wiese
200571507f Merge branch 'wip-MDL-37009-master' of git://github.com/marinaglancy/moodle 2013-04-04 11:22:20 +08:00
Tim Hunt
d2e32121b0 MDL-26956 user selector: fix regressions sam caused. 2013-04-03 11:44:23 +01:00
Marina Glancy
09ae7ee031 MDL-37009 Deprecated all courses display functions that are not used any more
print_my_moodle(), print_remote_course(),
  print_remote_host(), print_whole_category_list(), print_category_info(), get_course_category_tree(),
  print_courses(), print_course(), get_category_courses_array(), get_category_courses_array_recursively()
2013-04-02 10:58:24 +11:00
sam marshall
b2ec866fc7 MDL-26956 (1) Library: Move search SQL function to datalib
This function used to be in the user selector, but it is useful in
other areas where we want to search for users as it handles a number
of search options (including extra fields, etc.) and returns SQL
which can be included in a joined query.

A unit test has been added to check the results of these searches.
2013-03-28 10:45:12 +00:00
Eloy Lafuente (stronk7)
4efcfaa3ae Merge branch 'w13_MDL-37742_m25_dirtyoracle' of git://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-03-26 23:04:48 +01:00
Marina Glancy
93c544bdb0 MDL-38147 Added functions coursecat::search_courses(), get_courses()
Also search_courses_count(), get_courses_count();
Added unittests
2013-03-25 13:23:38 +11:00
Marina Glancy
eabbfa82d3 MDL-38147 Improvements to caching of course categories, coursecat::get_children() improvements
- Course categories caches are purged by event now
- session cache has additional 10 minutes ttl to clear itself and accomodate for permission changes that do not trigger event purging
- additional request-level cache for coursecat::get()
- We store only children of one category in one cache key
- Function coursecat::get_children() can return results sorted and/or paginated. Added tests
2013-03-25 13:23:15 +11:00
Marina Glancy
e1d54562ce MDL-38147 deprecated get_categories(), change usage to coursecat 2013-03-25 13:23:06 +11:00
Marina Glancy
bc81b0065c MDL-38147 deprecated get_all_subcategories() 2013-03-25 13:22:38 +11:00
Marina Glancy
2d8a275bab MDL-38147 deprecated get_course_category(), change usage to coursecat 2013-03-25 13:21:20 +11:00
Marina Glancy
b33389d228 MDL-38147 Created class coursecat, added cache definition and lang strings 2013-03-25 13:20:33 +11:00
Petr Škoda
77a5c09354 MDL-37742 simplify dirty one-space oracle hack 2013-03-24 13:43:18 +01:00
Rajesh Taneja
043f100556 MDL-38332 Administration: Updated update.txt and php doc for get_users_listing 2013-03-12 10:04:40 +08:00
Rajesh Taneja
4e0b615ede MDL-38332 Users: Browse list of users should not contain guest user record 2013-03-08 11:44:42 +08:00
Andrew Davis
c90e6b4644 MDL-36091 added debugging() calls in blocks of code marked as "should never happen" 2013-02-11 13:24:52 +08:00
Marina Glancy
2c49fb4c3e MDL-37572 Course categories are now managed in /course/manage.php
Switching between categories view and edit no longer depend on global editing mode
/course/index.php and /course/category.php do not contain editing code
2013-02-01 08:51:34 +13:00