Skip to content
Didactika Docsby Didactika
EN

Language English

How access is decided

The two conditions that must hold, the life of a delegation and when a delegated session ends.

Moodle 5.3Inherited from Moodle 4.5 – 5.2

Delegate Account does not open accounts by itself: it decides whether Moodle’s own Log in as may be used for a given pair of users at a given moment.

Two conditions must be met for someone to open an account:

They hold the permission

They have local/delegateaccount:use in the system context, or they are a site administrator.

A delegation exists

An administrator created a delegation from them to that account, and it is currently active.

Each delegation moves through four statuses, and the status is calculated from its dates, not stored.

Status Meaning
Scheduled The start date has not been reached yet
Active The account can be opened now
Expired The end date has passed
Revoked An administrator ended it. Revoked delegations are kept for the record

To give access again after a delegation expires, edit the expired delegation instead of creating a new one.

Access is checked when the account is opened and again on every page while the delegated session lasts. A revoked delegation ends its open sessions at once. The session ends on the next page if:

  • the delegation expires;
  • the person loses the permission;
  • the account is suspended or deleted;
  • the account becomes a site administrator while that is protected (see the security model).

Nothing depends on cron: start and end dates are checked each time, so delegations start and stop on time.