Hi guys!
I am learning to use the tutor, I already had many difficulties that I managed to solve seeing the posts on this forum or from other sources, but I have a problem that I have not yet been able to solve and I can’t even find a reference to adjust it.
I need that when new students access the tutor’s home page, they cannot register with the “Register” button, but that they can register when the course staff register the e-mail in a course
I saw in some forum that if I created a plugin, and modified the feature (“ALLOW_PUBLIC_ACCOUNT_CREATION”: false), I would disable the button.
The plugin:
name: desabilitar_acesso_estudante
version: 0.1.0
patches:
common-env-features: |
"ALLOW_PUBLIC_ACCOUNT_CREATION": false
With this plugin I was able to disable the “Register” button, but the student is unable to register with the tutor with the e-mail he receives, after the course team has registered his e-mail in the course. The registration form appears, but fails when trying to submit.
On the screen of the registration form there is no error, only the button is as if it were blocked. In the logs it reports a 403 permission error, as shown below:
lms_1 | 172.18.0.1 - - [20/Apr/2021:20:58:29 +0000] "POST /api/user/v1/validation/registration HTTP/1.0" 200 75 "https://lms.valdirverona.mus.br/register?utm_content=8045c8b5-4711-4c3d-83d9-e33d7a29c760&utm_medium=email&utm_campaign=allowedenroll&utm_source=instructor" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
lms_1 | 172.18.0.1 - - [20/Apr/2021:20:58:29 +0000] "POST /api/user/v1/validation/registration HTTP/1.0" 200 75 "https://lms.valdirverona.mus.br/register?utm_content=8045c8b5-4711-4c3d-83d9-e33d7a29c760&utm_medium=email&utm_campaign=allowedenroll&utm_source=instructor" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
lms_1 | 2021-04-20 20:58:29,991 INFO 90 [tracking] [user None] logger.py:49 - {"event": "{\"POST\": {\"mailing_address\": [\"street - house\"], \"goals\": [\"music\"], \"honor_code\": [\"true\"], \"name\": [\"Learner Test Example\"], \"password\": \"********\", \"level_of_education\": [\"hs\"], \"gender\": [\"m\"], \"email\": [\"lahen32973@tripaco.com\"], \"year_of_birth\": [\"2003\"], \"username\": [\"learner_test_example\"]}, \"GET\": {}}", "event_source": "server", "accept_language": "pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3", "referer": "https://lms.valdirverona.mus.br/register?utm_content=8045c8b5-4711-4c3d-83d9-e33d7a29c760&utm_medium=email&utm_campaign=allowedenroll&utm_source=instructor", "event_type": "/user_api/v1/account/registration/", "ip": "177.23.212.72", "page": null, "context": {"path": "/user_api/v1/account/registration/", "user_id": null, "course_id": "", "org_id": ""}, "time": "2021-04-20T20:58:29.991182+00:00", "username": "", "agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0", "host": "lms.valdirverona.mus.br"}
lms_1 | 172.18.0.1 - - [20/Apr/2021:20:58:30 +0000] "POST /user_api/v1/account/registration/ HTTP/1.0" 403 29 "https://lms.valdirverona.mus.br/register?utm_content=8045c8b5-4711-4c3d-83d9-e33d7a29c760&utm_medium=email&utm_campaign=allowedenroll&utm_source=instructor" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
So I had to disable this plugin to make the student registration work, but the “Register” button appears again on the home page.
I would like to know what would be the best way to disable/hide the Register button. Or some way that students do not have access to the creation of their enrollment, that is only by invitation in the email.
The tutor version is 10.4.0, and the theme is indigo.
I am grateful for any help or reference for this case.
Thank you guys!