Change Moodle user permission

0

How to change a common user's permission for an admin user in Moodle3.3 through SQL commands.

    
asked by anonymous 16.08.2017 / 16:42

1 answer

1

The administrator role of the site is allowed to do anything in Moodle, so use caution.

You will need to know the user ID first - then retrieve the table id

SELECT *
FROM mdl_user
Then add the id to the value column here

SELECT *
FROM mdl_config
WHERE name = 'siteadmins'
For example

UPDATE mdl_config
SET value = value || ',3'
WHERE name = 'siteadmins'

You'll probably need to come out and come back again so this can affect.

This only works for site administrators. For other functions, you need to login as administrator and go to admin site - > users - > permissions

    
16.08.2017 / 16:53