Welcome, Guest
Username: Password: Remember me

TOPIC: Problems applying predefined set of labels to answers

Problems applying predefined set of labels to answers 1 month 3 weeks ago #105551

  • mbarrera
  • mbarrera's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I´ve installed Limesurvey Versión 2.05+ Build 140125.

I have a set of labels with 8 characters of code like: 35000568. For importing this set of labels I needed to change the value of the field code in the table lime_labels to 8 characters.

My problem is when I need to apply this set of labels as response options to a question. When I try to do it, I can´t do it and appears the message: Failed upgrade options.

What do you think is my problem?
upgradeoptions.jpg
The administrator has disabled public write access.

Problems applying predefined set of labels to answers 1 month 3 weeks ago #105576

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5834
  • Thank you received: 712
  • Karma: 221
HI,

Because answer code max width are 5 characters : varchar(5).

Denis
PS:
I needed to change the value of the field code in the table lime_labels to 8 characters.
We don't support hacked LimeSUrvey version.
Last Edit: 1 month 3 weeks ago by DenisChenu.
The administrator has disabled public write access.

Problems applying predefined set of labels to answers 1 month 3 weeks ago #105582

  • mbarrera
  • mbarrera's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I found it :)

In ../application/models/Answer.php I changed the value 5 for 8 in the followin function:

public function rules()
{
return array(
array('qid','numerical', 'integerOnly'=>true),
array('code','length', 'min' => 1, 'max'=>8),
array('answer','LSYii_Validators'),
array('sortorder','numerical', 'integerOnly'=>true,'allowEmpty'=>true),
array('assessment_value','numerical', 'integerOnly'=>true,'allowEmpty'=>true),
array('language','length', 'min' => 2, 'max'=>20),// in array languages ?
array('scale_id','numerical', 'integerOnly'=>true,'allowEmpty'=>true),
);
}
Last Edit: 1 month 3 weeks ago by mbarrera. Reason: color
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.097 seconds
Donation Image