Project

General

Profile

Bug #7371

Custom pages do not work with advanced registration process

Added by Yannick Warnier almost 5 years ago. Updated almost 5 years ago.

Status:
Bug resolved
Priority:
Urgent
Category:
Global / Others / Misc
Target version:
Start date:
06/11/2014
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

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

Revision 90b3866b (diff)
Added by Julio Montoya almost 5 years ago

Adding ClockworksmsPlugin in autoload, fixing constant see #7371

Revision 0fe2f008 (diff)
Added by Yannick Warnier almost 5 years ago

Fix issue in custom pages with advanced registration mechanism - refs #7371

History

#1

Updated by Yannick Warnier almost 5 years ago

  • Priority changed from Normal to Low
#2

Updated by Daniel Barreto almost 5 years ago

  • % Done changed from 0 to 60

There was a problem when searching course info in Exercise constructor,

Send PR424
https://github.com/chamilo/chamilo-lms/pull/424

#3

Updated by Yannick Warnier almost 5 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...

#4

Updated by Yannick Warnier almost 5 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.

#5

Updated by Daniel Barreto almost 5 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?

#6

Updated by Yannick Warnier almost 5 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)
What should happen (in both cases, with custom pages disabled AND with custom pages enabled):
  • 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.

#7

Updated by Julio Montoya almost 5 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.

#8

Updated by Yannick Warnier almost 5 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.

#9

Updated by Yannick Warnier almost 5 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 

#10

Updated by Julio Montoya almost 5 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).

#12

Updated by Yannick Warnier almost 5 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

Also available in: Atom PDF