Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3695

Delete a site: cannot unregister device if site is configured to logout

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.5
    • 4.0.0
    • Others
    • Hide

      This issue only needs to be tested in one device.

      I recommend using a site+user that doesn't have many registered devices, that way it's easier to check this works. E.g. in our 37 site, user u2 only has a few devices.

      1. In web as admin, go to "Site administration > Mobile app > Mobile features" and enable "Force log out".
      2. In the app, login with any user.
      3. In web, login with the same user and go to Preferences > Notification preferences.
      4. Click "Mobile". Check that you can see the device you used in step 2 in the list of devices.
      5. In the app, logout.
      6. Delete the site from the app.
      7. In web, reload the list of devices. Check that your device no longer appears there.
      Show
      This issue only needs to be tested in one device. I recommend using a site+user that doesn't have many registered devices, that way it's easier to check this works. E.g. in our 37 site, user u2 only has a few devices. In web as admin, go to "Site administration > Mobile app > Mobile features" and enable "Force log out". In the app, login with any user. In web, login with the same user and go to Preferences > Notification preferences. Click "Mobile". Check that you can see the device you used in step 2 in the list of devices. In the app, logout. Delete the site from the app. In web, reload the list of devices. Check that your device no longer appears there.
    • MOODLE_39_STABLE
    • MOODLE_400_STABLE
    • Moodle App 4.0

    Description

      If a site is configured to "log out" instead of change site, the app deletes the user token when he logs out. If the user then deletes the site, the device cannot be unregistered from Moodle because we no longer have the token. The app will try to unregister the device later again, but it will never be able to do it because it no longer has the token.

      This has an annoying side effect in browser and desktop. In mobile, when you login again in the site the device is registered again and all the "pending unregisters" are deleted. But this isn't done in browser because there is no pushID, so the app still tries to unregister the site. This unregister throws an invalid token error, forcing you to reconnect to the site every certain minutes.

      Attachments

        Activity

          People

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              22/Apr/22