Bug #7371
Custom pages do not work with advanced registration process
Description
- create a course
- change its visibility to "public" (course settings)
- create a quiz
- go to course settings and get the link in "course access" to the main/auth/inscription.php page
- go to admin and enable custom pages
- disconnect
- load the link
- fail
There is a special process for the automatic subscription to a course, registering you directly to the course after the registration and sending you to the exercise, but it looks like it doesn't work with the custom pages
Associated revisions
Fix issue in custom pages with advanced registration mechanism - refs #7371
History
Updated by Daniel Barreto over 6 years ago
- % Done changed from 0 to 60
There was a problem when searching course info in Exercise constructor,
Updated by Yannick Warnier over 6 years ago
- Assignee changed from Daniel Barreto to Yannick Warnier
Merged. However, I still get this error:
Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /var/www/chamilo19x/main/inc/lib/pear/HTML/QuickForm.php on line 1066 Strict Standards: Non-static method HTML_QuickForm::errorMessage() should not be called statically, assuming $this from incompatible context in /var/www/chamilo19x/main/inc/lib/pear/HTML/QuickForm.php on line 2103 Strict Standards: Non-static method HTML_QuickForm::isError() should not be called statically, assuming $this from incompatible context in /var/www/chamilo19x/main/inc/lib/pear/HTML/QuickForm.php on line 2058 QuickForm Error: nonexistent html element Notice: QuickForm Error: nonexistent html element in /var/www/chamilo19x/main/inc/lib/pear/PEAR.php on line 923 QuickForm Error: nonexistent html element
Reviewing...
Updated by Yannick Warnier over 6 years ago
- Assignee changed from Yannick Warnier to Daniel Barreto
OK, I've tried injecting HTML_QuickForm objects to cover those cases, but they definitely result in an issue with a "non existing HTML element" that the QuickForm class tries to remove.
Updated by Daniel Barreto over 6 years ago
Tested again and didn't find this problem.
Tested on stable.chamilo.org too and is working without reported errors
https://stable.chamilo.org/main/auth/inscription.php?c=TEST73711&e=1
Maybe this error is because of a specific test exercise used?
Updated by Yannick Warnier over 6 years ago
- Assignee changed from Daniel Barreto to Julio Montoya
- Priority changed from Low to Urgent
OK, this is a generalized issue now (not only for custom pages).
Steps to reproduce:- create a course
- create an exercise
- go to course settings and make course public
- get the link to the exercise from the course access section (.../main/auth/inscripion.php?c=ABC&e=1)
- disconnect
- load the inscription.php URL (copied above)
- error (not authorized)
- load the inscription.php URL (copied above)
- the system shows the registration form
- complete the form and click ok
- the system offers you the possibility to "go to the test" through a button
I don't know what broke it. As far as I could see the problem is located at the beginning of inscription.php, when it loads global.inc.php -> local.inc.php -> redirect_url(), then it loads the page a second time without redirection and it triggers the not allowed error.
Updated by Julio Montoya over 6 years ago
- Assignee changed from Julio Montoya to Yannick Warnier
The change below blocks the page:
https://github.com/chamilo/chamilo-lms/commit/f0c55ab5674a90266b97f5224989ccd3434c5ccb
$isNotAllowedHere = api_get_setting('allow_terms_conditions') === 'false' && api_get_setting('allow_registration') === 'false'; if ($isNotAllowedHere) { api_not_allowed(true, get_lang('RegistrationDisabled')); }
You have to allow "allow_registration" = true.
the system offers you the possibility to "go to the test" through a button
That doesn't exist. I'm redirected to the main/exercice/overview.php page.
Updated by Yannick Warnier over 6 years ago
Julio Montoya wrote:
The change below blocks the page:
https://github.com/chamilo/chamilo-lms/commit/f0c55ab5674a90266b97f5224989ccd3434c5ccb
[...]
You have to allow "allow_registration" = true.
That makes sense. Thanks. I'll update the language files to explain that.
The other thing (the button) was explained from memory. I think it will be OK now.
Updated by Yannick Warnier over 6 years ago
- Assignee changed from Yannick Warnier to Julio Montoya
OK, now it's OK without the custom pages, but when I use custom pages (by default), I get this error again:
QuickForm Error: nonexistent html elementQuickForm Error: nonexistent html element
Updated by Julio Montoya over 6 years ago
Yannick Warnier wrote:
OK, now it's OK without the custom pages, but when I use custom pages (by default), I get this error again:
[...]
I don't get that error. I had custom pages "on" and is working well (after fixing some PHP warnings).
Updated by Julio Montoya over 6 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Julio Montoya to Yannick Warnier
Updated by Yannick Warnier over 6 years ago
- Status changed from Needs more info to Bug resolved
- % Done changed from 60 to 100
I found the remaining issue in custompages/registration.php
Adding ClockworksmsPlugin in autoload, fixing constant see #7371