56 Commits

Author SHA1 Message Date
Tim Hunt
9695ff811b MDL-34657 user sorting: consistent sorting everywhere.
This commit coverts everything in the codebase to use the new
users_order_by_sql function when sorting lists of users. More details in
the bug.

Note that this does not change places where users are displayed in a
sortable table, and the sort order comes from the table.
2012-09-27 12:41:42 +01:00
Frederic Massart
55bcef2954 MDL-34461 Librairies: Replaced deprecated get_context_instance() 2012-07-23 17:42:05 +08:00
David Monllaó
d7eb773047 MDL-31823 - Remote hosts users created via mnet enrolments marked as confirmed 2012-06-04 10:39:41 +02:00
Wiktor Wandachowicz
5bd2824a79 MDL-32204 MNet: set auth method to mnet for users enrolled remotely 2012-05-15 15:33:53 +02:00
Petr Skoda
83f9b3d7b3 fixed wrong exception name 2010-09-17 12:32:26 +00:00
Petr Skoda
68573df5e1 added missing rewrite param 2010-09-17 12:27:48 +00:00
Petr Skoda
a9637e7df4 MDL-14679 fixed a lot more old style uses of insert_record() 2010-09-03 17:47:41 +00:00
Petr Skoda
b3df176457 MDL-23927 do not use = 'guest' because we have CFG->siteguest AND it matches any other username with accents and different case in MySQL 2010-08-25 08:56:07 +00:00
David Mudrak
cd17f05ba1 MDL-22787 Fixed regression causing upgrade process halt without error
Sorry for this, I put that line there with good intention but did not
realize that the file must of course be included during the reflection
in upgrade.
2010-07-18 09:53:29 +00:00
David Mudrak
de5b395861 MDL-22787 Fixed remote unenrol - blame copy & paste 2010-07-18 00:35:43 +00:00
David Mudrak
af827747a3 MDL-22787 MNet Fix: enrol/mnet/enrol.php/available_courses is not indexed by courseid 2010-07-17 22:35:58 +00:00
David Mudrak
e3c6db931b MDL-22787 MNet: Finished server side of remote enrolment service 2010-07-17 22:35:38 +00:00
David Mudrak
152a2273be MDL-22787 MNet: Fixing regressions in auth_mnet caused by changes in enrol_mnet
This smells - IMHO auth_enrol should not do anything with the enrolment
related information. These two plugins seem to be tied too much...
2010-07-17 22:34:12 +00:00
David Mudrak
e56476c1e4 MDL-22787 MNet XML-RPC enrol/mnet/enrol.php/available_courses prefers host-specific instance 2010-07-17 22:31:57 +00:00
David Mudrak
c07e728146 MDL-22787 Fixed XML-RPC enrol/mnet/enrol.php/available_courses returned by 2.0 MNet server
Returns defaultrolename, fixed URLs in course summary and the returned
array must be indexed sequentially.
2010-07-17 22:30:20 +00:00
David Mudrak
d5bd0b0169 MDL-22787 MNet: implementation of enrol_mnet server-side service methods 2010-07-17 22:29:28 +00:00
David Mudrak
6f948538bb MDL-22787 Initial structures for the new MNet enrolment plugin 2010-07-17 22:16:48 +00:00
David Mudrak
94cf0a1e56 MDL-23245 Fixed plugin type of auth_mnet in config_plugins table 2010-07-13 11:14:29 +00:00
Petr Skoda
df997f841f MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
    MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
    MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
    MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
    MOV [enrolenddate,core],[enrolenddate,enrol_self]
    CPY [welcometocourse,core],[welcometocourse,enrol_self]
    CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
    MOV [notenrollable,core],[notenrollable,core_enrol]
    MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
    MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
    MOV [coursemanager,core_admin],[coursecontact,core_admin]
    MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
    MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
    MOV [enrolme,core],[enrolme,core_enrol]
    MOV [unenrol,core],[unenrol,core_enrol]
    MOV [unenrolme,core],[unenrolme,core_enrol]
    MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
    MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
    MOV [enrolments,core],[enrolments,core_enrol]
    MOV [enrolperiod,core],[enrolperiod,core_enrol]
    MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
Petr Skoda
6b8ad965dc MDL-16919 we have to really use the username cleaning only when manually adding new accounts, any sync with external system needs the exact match without any cleaning! 2010-06-06 14:06:30 +00:00
Penny Leach
d234faf3a4 mnet MDL-22267 updated mnet_server_faultand mnet_server_exception string handling
This is so that mnet_server_fault doesn't have to call get_string (in
case of coding exception)
2010-05-01 15:53:45 +00:00
Penny Leach
4a3c330854 mnet MDL-21327 remove auto add remote users setting as it makes no sense 2010-02-16 03:03:30 +00:00
Penny Leach
61506902f3 mnet MDL-20660 allow admins to configure fields to be sent over mnet 2010-02-16 02:05:30 +00:00
Penny Leach
287efec6f6 mnet MDL-21276 get rid of all the $MNET* globals 2010-02-02 03:13:40 +00:00
Penny Leach
de260e0f7b mnet MDL-21261 large overhaul. This commit changes:
- The way that mnet rpc functions are registered.  Plugins must now
  create db/mnet.php which is an array, similar to services.php.  This
  *replaces* the old mnet_publishes() functions.  version.php must be
  bumped to trigger this.

- More information about each rpc-available function is stored in the
  database, including the class it belongs to, the file it is found in,
  and whether or not it is static.  Methods that are not static must be
  in a class with a constructor that takes no arguments (this can easily
  be achieved with a small wrapper if necessary)

- The xmlrpc dispatcher has been rewritten to remove all the
  dependencies on hardcoded information about auth,mnet,portfolio and
  repository, and just use the information in the database.

- The old hardcoded hidden mnet/testclient.php has been moved to the
  Admin menu under "Development" and rewritten.

- The xmlrpc introspection method profiling is now using php and zend
  reflection - which is a lot nicer than the old way, which was using a
  php-based php parser.  This fixes some inconsistent handling of
  methods without arguments that were advertising their return value as
  the only method parameter.  While this is a *fix*, it breaks BC
  slightly - the old 1.9 broken mnet/testclient.php will now not work
  properly with 2.0

- Dangerous mode is still supported, but old mod/*/rpclib.php is
  now unsupported, due to the fact that any plugin can export mnet
  functions with db/mnet.php.  This is a slight BC break.

Still TODO:

- TEST TEST TEST
- Document the two small BC breaks in release notes
- Document the contract for db/mnet.php
2010-01-28 05:25:50 +00:00
Penny Leach
30ec3eef51 mnet/enrol MDL-21459 fixed some brokenness related to DB changes 2010-01-28 04:59:05 +00:00
Rossiani Wijaya
07ed083e4e MDL-16919 - Allow username to contain alphanumeric lowercase characters, underscore (_), hyphen (-), period (.) or at symbol (@) 2010-01-13 06:23:54 +00:00
Sam Hemelryk
b0cab8b97b enrol MDL-21297 Fixed syntax error 2010-01-13 02:08:14 +00:00
Penny Leach
4416da02db enrol/mnet MDL-21297 added error handling 2010-01-13 01:08:56 +00:00
Petr Skoda
4317f92f3f MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 12:51:40 +00:00
samhemelryk
8e7328a292 enrol MDL-19795 Added set_url calls, and fixed misc minor errors 2009-10-15 03:17:57 +00:00
skodak
0a127169fe MDL17980 reverting last commit - other devs agreed, to be explained in tracker 2009-08-03 07:35:41 +00:00
peterbulmer
1b509b3699 MDL17980 mnet improvements
* Allow multiple roles to be allocated by identity provider
* Allow existing enrolment plugins to manage mnet enrolments


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2009-08-03 03:38:23 +00:00
peterbulmer
d3080510e4 MDL19219 mnet, mitigate arrkey loss in transit
When usernames are numeric, they are lost in mnet transit when used as
keys in the array result of course_enrolments(). As the username is not
sent with the enrolment details, it was not previously recoverable.
This patch adds the information to the enrolment details,
(enrol/mnet/enrol.php), and adds support for recovering the username if
it was numeric (and hence lost) (admin/mnet/enr_course_enrol.php)
2009-05-18 02:38:02 +00:00
peterbulmer
a67a5531c6 MDL-18414 change sql query syntax
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2009-04-06 06:15:58 +00:00
peterbulmer
11b9852e4e MDL-18413 limit coursedata strings before db
Conflicts:

	enrol/mnet/enrol.php


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2009-04-06 06:15:00 +00:00
scyrma
b7f2b8e644 MDL-15403: Patch sent by Peter Bulmer, said to have been written by Donal McMullan. Prevents a remotely-triggered mass-unenrolments of users in a
(mnet-enabled) course. (merge from 1.9)
2008-07-09 09:10:09 +00:00
skodak
50c5bef452 MDL-14679 towards enrol conversion 2008-06-02 21:02:52 +00:00
dongsheng
f945d59b8f "MDL-14129, fix print_error calls" 2008-05-07 06:19:59 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
donal72
254f0c073a Initialize the $message variable properly this time. 2007-11-01 21:30:37 +00:00
donal72
970dc3660d Revert: Initialize the $message variable 2007-11-01 21:28:08 +00:00
donal72
d576d0402c Initialize the $message variable 2007-11-01 05:06:26 +00:00
skodak
128f098418 MDL-11640
* improved handling of dirty contexts in general - caching, switching in cron, marking, loading, etc.
* role_assing() and role_unassign() now marks dirty contexts because we use has_capability() in this function - we can not do it later outside to speedup bulk operations
* fixed some inline docs
* fixed notice from rs closing
* removed cached $CONTEXT from has_capability() - $context is now required parameter; this was hiding serious bugs when context did not exist or ppl passed false as parameter
* removed some ===, we can not use these on function parameters - we must support ints, strings, '', nulls, etc. - this could be a source of really dangerous bugs in future
* some other improvements and fixes - documented inline
2007-10-09 12:49:54 +00:00
martinlanghoff
f055618837 enrol/mnet: mark context as dirty after unenrol
So the unenrolment is effective immediately.
2007-09-19 07:12:10 +00:00
donal72
e6976ae1f6 MNet: More error tracking updates 2007-02-07 14:11:22 +00:00
donal72
d452439a08 MNet: Standardise format of the mnet_client->error array 2007-02-07 12:43:08 +00:00
martinlanghoff
ccb60df832 enrol/mnet: list_remote_servers() should only list servers we use enrolment for 2007-01-19 04:26:09 +00:00
martinlanghoff
e395caaa84 enrol/mnet: fixes around fetch_remote_courses() and available_courses
- ensure addslashes() affects data that goes to the database, not HTML
 - ensure we return defaultrolename from avaiable_courses
 - clear some leftover debug statements
2007-01-19 02:43:11 +00:00
donal72
0855c4cab3 Mnet: More enrolment data in the back channel - stash in mnet_enrol_assignments table 2007-01-19 00:23:55 +00:00