Share

ORSEE

Tracker: Bugs

5 Default Subpool_ID if none of subpools is set to be shown - ID: 2154946
Last Update: Comment added ( bengreiner )

Hello,

For example, at settings we have default Subpool ID different from 1 and
none of subpools are defined to be shown on the registration page. In this
case participant will be put in subpool_id=1 despite of
subpool_default_registration_id setting.

File: public/participant_create.php lines 26,28

Solution:

if (count($all_pool_ids)<=1) redirect
("public/".thisdoc()."?s=".$settings['subpool_default_registration_id']);

/*was
if (count($all_pool_ids)==1) redirect
("public/".thisdoc()."?s=".$all_pool_ids[0]);

if (count($all_pool_ids)==0) redirect ("public/".thisdoc()."?s=1");
*/

* I suppose that if only one subpool is defined to be shown at
registration, it will be overridden by default subpool ID in settings.
Otherwise line 26 should be left at it is and 28th be changed:
if (count($all_pool_ids)==0) redirect
("public/".thisdoc()."?s=".$settings['subpool_default_registration_id']);

Thanks,
Ruslan


Kabalin ( kabalin ) - 2008-10-09 12:00

5

Closed

Fixed

Ben Greiner

Public Area

None

Public


Comment ( 1 )




Date: 2008-10-13 07:25
Sender: bengreinerProject Admin

That's a kind of historical thing. ORSEE is delivered out with a default
subjectpool iinstalled, called "Default" and having number 1. The idea is
that if somebody wrongly disables all subpools in the settings, then new
participants will still be assigned to the Default subpool. I would agree
that subpool_default_registration_id should overrid the 1 in case there are
no public subjectpools. But if there is at least one, this should override
the default setting (somehow putting higher weigth on the ORSEE users
choice to have only one public subpool than on his choice of a default
pool. Note that the subpool self-selection page will be hidden in the
registration process if there is only one subpool. So the code of the next
version will read something like this:

if (count($all_pool_ids)==1) redirect
("public/".thisdoc()."?s=".$all_pool_ids[0]);
elseif (count($all_pool_ids)==0) redirect
("public/".thisdoc()."?s=".$settings['subpool_default_registration_id']);
elseif (count($all_pool_ids)==0) redirect ("public/".thisdoc()."?s=1");

Thanks for pointing this out.

/ben



Log in to comment.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2008-10-13 07:25 bengreiner
resolution_id None 2008-10-13 07:25 bengreiner
close_date - 2008-10-13 07:25 bengreiner