Enhancement - Session duration extension per user #6012
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #5638, currently, sessions can be configured with a duration in days. Once a student enrolls in a session, they can access it from their first login date until the maximum duration configured for the session.
The issue we encountered is that it is not possible to 'extend' the duration for individual users. To do so, the student would have to be removed and re-added to the session, resulting in the loss of their progress.
While reviewing the code to confirm this limitation, we discovered unused code suggesting that this functionality existed in the past. For example, there are functions that seem to validate this possibility:
chamilo-lms/main/inc/lib/sessionmanager.lib.php
Lines 7004 to 7013 in 04c3e31
chamilo-lms/main/inc/lib/sessionmanager.lib.php
Lines 7015 to 7050 in 04c3e31
chamilo-lms/main/inc/lib/sessionmanager.lib.php
Lines 7052 to 7075 in 04c3e31
chamilo-lms/main/session/resume_session.php
Lines 401 to 408 in 04c3e31
This PR repurposes some of that unused code to enable the functionality of extending session durations for individual users