Hi all,

I'm stuck with a problem which concerns most probably hackin through the user.module to integrate a module I've developed into the registration process itself..

I've been reading quite a bit about registration/login costumization but I have still not really found something good to grab hold of..

Here it goes ;)

I've built a module for the generation and evaluation of a certain test to a given user. The test will be a page full of multiple choice questions each accompanied by a radio buttons group for the answers.

The test is to be generated thanks to the input values of the newly and REGISTERING user. The user will put fields such as gender or age to determine amount and difficulty of the questions..

The test data is in a set MYSQL tables which are installed through the test_module.install script.. This contains quite a bit of stuff, but the important thing is to know that all questions and answers are stored in it and that they are collected/updated by the module when needed...

Now,

I'd like to integrate this wizard functionality module that I have with the Registration process.
Hence every new user to register will need to go through a test!!! The process is:

  • A registering user will get a first form where to fill out his name, age and gender
  • At submission, the test gets queried out of the DB and generated in some "global variable" thanks to the user imput values
  • User does his test and, at submit, only if the test is passed, he will then get his account

Now..
I tried adding the extra fields for the first screen (the user details data) from drupal itself (I think it uses the profile.module ).. I also need the default name and email anyway... Now I'd like to try to integrate it with the test module and be able to generate a test from within the module code....

Another option,
The test.module has its own first form for collecting user data... Hence.. Couldn't I simply ridirect the registration to the module functionality somehow? and register the user from within the module context after the test has been evaluated?? This might be easier but I'm not sure if it is a good idea...

Please let me know all yuor thoughts

cheers