Skip to content

Commit

Permalink
Fixed issue #06606: Participant attribute grid - can only edit the fi…
Browse files Browse the repository at this point in the history
…rst attribute

Dev Working working fine now
  • Loading branch information
aniesshsethh committed Oct 15, 2012
1 parent a7a60f5 commit 6c71f1a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions application/controllers/admin/participantsaction.php
Expand Up @@ -1186,7 +1186,7 @@ function subval_sort($a, $subkey, $order)
/* Iterate through each attribute owned by this user */
foreach ($records as $row)
{
$outputs[$i] = array("", $row['participant_id'], $row['attribute_type'], $row['attribute_id'], $row['attribute_name'], $row['value']);
$outputs[$i] = array("", $row['participant_id']."_".$row['attribute_id'], $row['attribute_type'], $row['attribute_id'], $row['attribute_name'], $row['value']);
/* Collect allowed values for a DropDown attribute */
if ($row['attribute_type'] == "DD")
{
Expand Down Expand Up @@ -1231,7 +1231,7 @@ function subval_sort($a, $subkey, $order)
/* Go through the empty attributes and build an entry in the output for them */
foreach ($attributenotdone as $row)
{
$outputs[$i] = array("", $iParticipantId, $row['attribute_type'], $row['attribute_id'], $row['attribute_name'], "");
$outputs[$i] = array("", $iParticipantId."_".$row['attribute_id'], $row['attribute_type'], $row['attribute_id'], $row['attribute_name'], "");
if ($row['attribute_type'] == "DD")
{
$attvalues = ParticipantAttributeNames::model()->getAttributesValues($row['attribute_id']);
Expand Down Expand Up @@ -1397,10 +1397,9 @@ function editAttributevalue()
{
if (Yii::app()->request->getPost('oper') == "edit" && (Yii::app()->request->getPost('attvalue') || Yii::app()->request->getPost('attvalue')=="0"))
{

$pid = explode('_',Yii::app()->request->getPost('participant_id'));
$iAttributeId = Yii::app()->request->getPost('attid');

$aData = array('participant_id' => Yii::app()->request->getPost('participant_id'), 'attribute_id' => $iAttributeId, 'value' => Yii::app()->request->getPost('attvalue'));
$aData = array('participant_id' => $pid[0], 'attribute_id' => $iAttributeId, 'value' => Yii::app()->request->getPost('attvalue'));
ParticipantAttributeNames::model()->editParticipantAttributeValue($aData);
}
}
Expand Down

0 comments on commit 6c71f1a

Please sign in to comment.