MNet Moodle 1.9.10 - 2.0.1 users disappear

MNet Moodle 1.9.10 - 2.0.1 users disappear

de Gisela Hillenbrand -
Número de respuestas: 10
Imagen de Documentation writers

Hello,

I setup a Moodle network between Moodle 1.9.10 and 2.0.1. as described in the MoodleDocs and it worked fine. Users coming from 1.9.10 clicked on a link to Moodle 2.0.1 and were automatically logged in.

Now a remote user disappered from the Moodle 2.0.1 database - she logged in from remote 15 Feb. 2011 and today I could not find her in the mdl_user table of Moodle 2.0.1.

What happened here? Is there an auto-delete function if a user does not log in for some time? Can I configure this somewhere?

Any hint is appreciated.

Gisela

 

Promedio de valoraciones: -
En respuesta a Gisela Hillenbrand

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de David Mudrák -
Imagen de Core developers Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers Imagen de Plugins guardians Imagen de Testers Imagen de Translators

Hi Gisela,

that is really weird, indeed. Can you please check your database and look at the mdl_user table. Find some records created for the remote users and look at the value of the field "confirmed". Is is set to 0 or 1?

I have a suspicion that remote users might be set as unconfirmed and therefore deleted by cron (which would be a nasty bug, of course)

En respuesta a David Mudrák

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de Gisela Hillenbrand -
Imagen de Documentation writers

Hi David, thank you for the fast reply!

Indeed, in the mdl_user table the confirmed field is set to "0" for all users connected via mnet., in Moodle 2.0.1.

I also checked it with Moodle 1.9.10 - here the confirmed field is (correctly) set to "1" for users logged in from remote.

Nasty bug, but probably easy to fix! It is already in the bug tracker, but probably not "in the right" place: see MDL-26921

Best regards,

Gisela

En respuesta a Gisela Hillenbrand

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de David Mudrák -
Imagen de Core developers Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers Imagen de Plugins guardians Imagen de Testers Imagen de Translators
Gisela, in Moodle 2.0, you can specify the list of user profile fields that are sent to the remote peers. Can you please check if the field "confirmed" is selected at your site?

However, this field will have to be put to the list of non-optional fields that are always exported.
En respuesta a David Mudrák

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de Gisela Hillenbrand -
Imagen de Documentation writers

OK. I checked the following: in my Moodle 2 installation (where I want to give access for remote users coming from Moodle 1.9) I went to the page Setting > Site administration >  Networking > Peers > my Moodle1.9 host > Profile fields. Here, in the list of "Fields to import" nothing was selected, instead the checkbox "Use the default settings instead" below the list was checked.

Unchecking this checkbox and selecting the "confirmed" field in the list results in the following: Now when a user coming from Moodle 1.9 for the first time to Moodle 2, a new user record is created in the Moodle 2 mdl_user table with the "confirmed" field set to 1 (before it was 0).

Is it this what you mean? If so, at least a hint in MoodleDocs should be given: I followed the instructions on http://docs.moodle.org/en/Moodle_Network#Peer_to_Peer_Network and here the information of importing/exporting user fields is missing.

By the way: As a Moodle admin I expect that "Moodle works fine with the default settings". So if the default in Moodle network configuration for imported/exported fields ist "use default settings" - do I have a chance to see that my users coming from remote are not confirmed and change this setting to "confirmed" somewhere in Moodle? Or in other words: If the default configuration leads to the fact that users "after a while will disappear", than it seems to be a bug or not? At least it is a lack of complete instructions on Howto setup Moodle network, isn't it?

To prevent missunderstanding: I dont want to critisize the programming, I just want to understand what the default settings in this case are good for sonrisa

Best regards,

Gisela

En respuesta a Gisela Hillenbrand

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de David Mudrák -
Imagen de Core developers Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers Imagen de Plugins guardians Imagen de Testers Imagen de Translators
Hi Gisela, this is a bug indeed. Incoming roaming users can't land with the "confirmed" field set to 0. I created MDL-27107 to track it. Please vote.
En respuesta a David Mudrák

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de Jon Witts -
Imagen de Plugin developers Imagen de Testers

I have just run into this bug too on Moodle 2.0.3

To get a remote MNet user to appear in the enrol users lists I have to un-check the "use defaults" for the Remote Peer Profile fields and select at least "Confirmed" (I selected all of them!).

I have voted on the tracker item.

Jon

En respuesta a Jon Witts

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de Ian Wild -
Imagen de Plugin developers

Hi all,

I've got the same problem with a 2.1.2 installation (connecting to a 1,9.x) but when I look at the list of fields to send "Confirmed" isn't listed triste. Does anyone have any idea why this should be?

Thanks in advance,

Ian.

En respuesta a Ian Wild

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de David Mudrák -
Imagen de Core developers Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers Imagen de Plugins guardians Imagen de Testers Imagen de Translators

Arghrrr. That seems to be a regression of MDL-27107 fix. Since 2.1.1 we do not send the confirmed field as a part of user data. All 2.x branches were fixed to automatically set confirmed to true. But the branch 1.9 was not modified and it still expects the value incoming from the identity providing server.

Quick patch could be something like this on your 1.9 site:

diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php
index 42a1f68..a35cc8f 100644
--- a/auth/mnet/auth.php
+++ b/auth/mnet/auth.php
@@ -306,6 +306,7 @@ class auth_plugin_mnet extends auth_plugin_base {
             }
             $remoteuser->mnethostid = $remotehost->id;
             $remoteuser->firstaccess = time(); // First time user in this server, grab it here
+            $remoteuser->confirmed = 1;
 
             if (!$remoteuser->id =  insert_record('user', addslashes_recursive($remoteuser))) {
                 print_error('databaseerror', 'mnet');

Please note I did not test it. I will appreciate if you do and confirm it fixes the problem.

En respuesta a David Mudrák

Re: MNet Moodle 1.9.10 - 2.0.1 users disappear

de Ian Wild -
Imagen de Plugin developers

Hi David,

Thanks for this. I've just modified the code manually and this fix seems to work.

Ian.