Share

ORSEE

Tracker: Bugs

5 Subject pool ID change by subjects. - ID: 2645204
Last Update: Settings changed ( bengreiner )

Subjects can change subject-pool ID to any value upon registration by
amending get query (/participant_create.php?s=1&dr=Yes), or by amending the
form hidden values afterwards. Though tagsets/participant.php has some
subpool ID validity check it does not amend the hidden parameter in the
form. What have to be changed:

First, tagsets/participant.php, function 'participant__form':

Now:
if (!$subpool['subpool_id']){
$subpool=orsee_db_load_array("subpools",1,"subpool_id");

Should be:

if (!$subpool['subpool_id']){
$subpool=orsee_db_load_array("subpools",1,"subpool_id");
$_REQUEST['subpool_id'] = $subpool['subpool_id'];
}

Second, public/participant_create.php, $_REQUEST['add'] processing:

The following should be added anywhere before $participant=$_REQUEST
assignment:

if (!$_REQUEST['subpool_id'])
$_REQUEST['subpool_id']=$settings['subpool_default_registration_id'];

$subpool=orsee_db_load_array("subpools",$_REQUEST['subpool_id'],"subpool_i
d");

if (!$subpool['subpool_id']){
$subpool=orsee_db_load_array("subpools",1,"subpool_id");
$_REQUEST['subpool_id'] = $subpool['subpool_id'];
}

Third, public/participant_edit.php, $_REQUEST['add'] processing:

Given that there is no possibility of changing sub-pool in the subject's
details editing form, and unlikely that it will be needed, I suggest to
simply unset subject_id request anywhere before $participant=$_REQUEST
assignment:

unset ($_REQUEST['subpool_id']);

Thanks,
Ruslan


Kabalin ( kabalin ) - 2009-02-27 12:31

5

Closed

Accepted

Ben Greiner

Public Area

None

Public


Comment ( 1 )

Date: 2009-03-02 04:00
Sender: nobody

Thanks for the report.

The subject pool (and therefore the subject pool id) is self-selected by
the participant at the beginning of the registration. So I do not see any
incentives for participants to manipulate the suibject pool id some steps
further down the registration process.

Anyway: your corrections clean up the code, I will implement it in the
next version.

Thanks again

/ben



Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2009-03-02 04:03 bengreiner
resolution_id None 2009-03-02 04:03 bengreiner
allow_comments 1 2009-03-02 04:03 bengreiner
close_date - 2009-03-02 04:03 bengreiner