Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.8.1, 4.0
-
MOODLE_38_STABLE, MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-67807-master -
Description
This needs discussion but, should we apply the concurrent login limit when set?
If the option is set, and the user reached the session limit (in web) should not we automatically fail WS requests? Especially those coming from the Moodle app?
UPDATE
After discussing this with some clients that have requested this feature, what the final user really wants is to stop people using the app if already have reached the session limit on web (generally is one session, the typical use case is to prevent someone from using the app when they have an active web session version).
So there is not a real need for preventing WS requests, we can just implement some local (client side) code in the app to prevent the app from doing "something" until the web session is finished.
"As a site admin I'll like the app to support Moodle concurrent login feature so that I can prevent my students to use different devices and sessions at the same time"
So, to solve this, we just need to return some relevant information in the first WS call performed by the app (core_webservice_get_site_info), specifically:
- If there is a concurrent limit set
- How many active user sessions does the existing user already has
This solution is not perfect because the mobile app will have to do some polling (when the concurrent limit is set in Moodle) to detect if the web session limit was reached for preventing the user to continue using the app. (however, we already do something similar so it should not be that bad)