Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,30 +73,32 @@ public function primaryKey() | |
public function getMemberInfo() | ||
{ | ||
$sFieldName = "0"; | ||
if ($this->question->type == "I" || $this->question->type == "G" || $this->question->type == "Y") | ||
{ | ||
$sFieldName=$this->sid.'X'.$this->question->gid.'X'.$this->qid; | ||
$sValue = $this->code; | ||
} | ||
|
||
if($this->question->type == "L" || $this->question->type == "O" || $this->question->type =="!") | ||
{ | ||
$sFieldName=$this->sid.'X'.$this->question->gid.'X'.$this->qid; | ||
$sValue = $this->code; | ||
} | ||
$sValue = ""; | ||
|
||
if($this->question->type == "M") | ||
{ | ||
$sFieldName=$this->sid.'X'.$this->question->gid.'X'.$this->qid.$this->code; | ||
$sValue = "Y"; | ||
switch($this->question->type) { | ||
case "I": | ||
case "G": | ||
case "H": | ||
$sFieldName=$this->sid.'X'.$this->question->gid.'X'.$this->qid; | ||
$sValue = $this->code; | ||
break; | ||
case "L": | ||
case "O": | ||
case "!": | ||
$sFieldName=$this->sid.'X'.$this->question->gid.'X'.$this->qid; | ||
$sValue = $this->code; | ||
break; | ||
case "M": | ||
$this->sid.'X'.$this->question->gid.'X'.$this->qid.$this->code; $sValue = "Y"; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
TonisOrmisson
Collaborator
|
||
break; | ||
case "A": | ||
case "B": | ||
$temp = explode('-',$this->code); | ||
$sFieldName=$this->sid->sid.'X'.$this->question->gid.'X'.$this->qid.$temp[0]; | ||
$sValue = $temp[1]; | ||
break; | ||
} | ||
|
||
if($this->question->type == "A" || $this->question->type == "B") | ||
{ | ||
$temp = explode('-',$this->code); | ||
$sFieldName=$this->sid->sid.'X'.$this->question->gid.'X'.$this->qid.$temp[0]; | ||
$sValue = $temp[1]; | ||
} | ||
|
||
return array( | ||
'title' => $this->question->title, | ||
|
3 comments
on commit b3ef63e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How we do it before ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something wrong here:
b3ef63e#diff-5f262794cfea9770eb1146a559f9eaa2R92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of Y.
And, maybe it's better to return null (and not 0) if fieldName(question type) is invalid. Add a test here :
LimeSurvey/application/models/Quota.php
Line 176 in 89ca5e0
foreach ($aQuotaColumns as $sColumn=>$aValue) |
There are surely some possibility to update question type after set a quota for it.
A newline is missing.