Dependency Graph View Issue Relation Graph Vertical
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
06502Development [All Projects] Import/Exportpublic2019-07-13 18:33
ReporterDenisChenu Assigned Tomfaber  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05 
Target Version2.05Fixed in Version2.05 
Summary06502: Unable to import exported multi lang survey
Description

If we make a multi lang survey, export in excel format and import it again, then second langage is breaked.

For survey langage settings : all OK
For group title and description : breaked : second langage take whole first langage
For question: there are no question line for the second langage.

Steps To Reproduce

Export a simple multi lang survey and import it again.

Additional Information

In DB:
1 group (1st langage ) ave gis 1000 (for example), the group in the seoncd langage as 1001.

Same think for qid.

The test with $gname/$qname/$sqname are breaked.

I think we need $gseq/$qseq/$aseq raary for each lanage.

For the group:
$gseq['lang'] test if another $gseq[lang] is set, if yes : take same gid. etc ...

TagsNo tags attached.

Activities

DenisChenu

DenisChenu

2012-08-19 09:41

developer  

limesurvey_survey_multilang.xls (23,552 bytes)
TMSWhite

TMSWhite

2012-08-19 14:34

reporter   ~20522

The Group title (column C) is a unique identifier that must be the same for each language. So, the reason the second language does not appear in this example is that the group title is "Group title" for en, and "Titre group" for fr. It must be Group Title for both.

The core problem is that many users may be using the Group title for language-specific display purposes rather than as a unique identifier for the group. As 2.0 extends the data model, it should have separate fields for group code (so that we can have a reliable Gcode to complement the Qcodes), plus a language-specific title for display purposes.

DenisChenu

DenisChenu

2012-08-19 14:41

developer   ~20523

I understand why. But, user:

Export excel: OK
Import same file : KO

TMSWhite

TMSWhite

2012-08-19 14:50

reporter   ~20525

Perhaps we should add the following:
(1) A status to Show Survey Logic file (similar to the one saying "there are X errors in this survey"), that says, ("There are %s qcode naming violations in this survey. Although the survey will run despite these naming violations, you will not be able to reliably use qcode-dependent features until these are fixed.")
(2) Add a note after Excel export saying that there are X qcode violations so that the Excel can not be re-imported until those naming violations are fixed.

DenisChenu

DenisChenu

2012-08-19 14:58

developer   ~20527

$newgid = Groups::model()->insertRecords($insertdata)// or safeDie($clang->gT('Error').": Failed to insert group<br />\<br />\n");
if(!$newgid){
$results['error'][] = $clang->gT("Error")." : ".$clang->gT("Could not insert Group").". ".$clang->gT("Excel row number ").$rownumber." (".$qname.")";
break;
}

Speed correction, but insert next question in the previous group (but remove it after while).

And think there are problem with:
line 4503 // $insertdata['qid'] = $sqid; // this was causing key duplications - removing it seems to have fixed that

Another possibility is to use an array for each langage with $gseq, and maybe $qseq.
(I see some survey with question with the same code, but it's a "feature", each question are on different group, and if group1 is show, the group 2 not).

DenisChenu

DenisChenu

2012-08-19 19:58

developer   ~20533

Reminder sent to: c_schmitz

Carsten: http://git.io/LsyhLQ fix this issue BUT:

still a problem with export/import.
Excel import was made with group title all the same for each language.
User use group title specific by langage.

Did i found a solution for 2.0 or for 2.1 ?

c_schmitz

c_schmitz

2012-10-02 14:56

administrator   ~20980

Shnoulle, does this problem still exist with the latest TSV import/export ?

TMSWhite

TMSWhite

2012-10-02 15:04

reporter   ~20983

The TSV needs a way of uniquely identifying the group so that it can be repeated. Feel free to make one of the columns the unique identifier, and another the language-specific label for the group.

DenisChenu

DenisChenu

2012-10-02 15:08

developer   ~20984

Yep,

The question is:
Did we want "same title for each group" , title == group_code or do we add a group_code ?

Denis

DenisChenu

DenisChenu

2012-10-11 13:12

developer   ~21211

Carsten : feel free to close the bug: like Thomas say it's a in TSV import conception.

c_schmitz

c_schmitz

2012-10-11 13:18

administrator   ~21213

Shnoulle, can you work on this for 2.1 ?

DenisChenu

DenisChenu

2012-10-11 14:22

developer   ~21220

Adding a "group_code" ?

c_schmitz

c_schmitz

2012-10-11 14:31

administrator   ~21221

group_code sounds fine to me

DenisChenu

DenisChenu

2012-10-11 14:47

developer   ~21224

Last edited: 2012-10-11 14:47

View 2 revisions

OK, the wait for 2.0 stabilizing.

A lot of think to do for 2.1 8-O

TMSWhite

TMSWhite

2012-10-16 21:24

reporter   ~21390

Adding a 'group_code' might require adding an extra column to the Excel format. If we have to do that anyway, perhaps we should update the data model and admin GUI so that we have the following for both group and question:

(1) var_name - this will be the variable name (e.g. title/qcode for question)
(2) var_description - this is a language-specific name for the question or group.

We currently have #1 for question but no #2; and #2 for group but no #1.

DenisChenu

DenisChenu

2012-10-17 09:13

developer   ~21392

And for LS2 , we have already "randomization_group".

I think for "title" for group, title are set automaticly to group_name if empty.

My problem is : title is used only for tsv export, did you think we can use in EM ?

For example count the question in a group or something like that ?

It's for 2.1 then not urgent.

DenisChenu

DenisChenu

2012-10-22 14:38

developer   ~21533

Dev's note:
DON't ADD another code.

Use default-langage title for code.

Some solution

  • Did i put it in name directly, and use help cell for language title.
  • Put the 2 title in name , separate by a #|| or ....
  • Put the first language title in some "information : example: <code>The first language title</code>Another language title.
DenisChenu

DenisChenu

2013-09-30 15:04

developer   ~26447

@mfaber : Thank you ;).

Like say in IRC: think we can use actual txt for importing.

1st: create a $aGroupDefaultLang.

Each time we have a new group in DEFAULT language:
$aGroupDefaultLang[$sgeq]=$gid;
$sgeg++;

And
$aGroupLangNumber we can have something like that for each new group in THIS lang
$gid=$aGroupDefaultLang[$aGroupLangNumber[$lang]];
$aGroupLangNumber[$lang]++;

But do what you want ;) It's just some reflexion here.

c_schmitz

c_schmitz

2013-10-01 21:33

administrator   ~26464

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13118

mfaber

mfaber

2013-10-01 22:25

reporter   ~26465

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13119

Related Changesets

LimeSurvey: 2.05 551a9889

2013-09-30 13:06:15

mfaber


Committer: mfaber Details Diff
Fixed issue 06502: Unable to import multi-lang surveys (.txt)

Dev: groups are now exported with a unique identifier.
Dev: older multi-lang .txt files should also be properly
Dev: imported. Here we make up an identifier during
Dev: import.
Affected Issues
06502
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File

LimeSurvey: master 91068ed1

2013-09-30 13:06:15

mfaber


Committer: mfaber Details Diff
Fixed issue 06502: Unable to import multi-lang surveys (.txt)

Dev: groups are now exported with a unique identifier.
Dev: older multi-lang .txt files should also be properly
Dev: imported. Here we make up an identifier during
Dev: import.
Affected Issues
06502
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File

LimeSurvey: 2.05 81384ffc

2013-10-01 19:33:45

c_schmitz

Details Diff
Merge pull request #134 from mfaber/multilangTSV205

Fixed issue 06502: Unable to import multi-lang surveys (.txt)
Affected Issues
06502
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-08-19 09:41 DenisChenu New Issue
2012-08-19 09:41 DenisChenu File Added: limesurvey_survey_multilang.xls
2012-08-19 09:41 DenisChenu Relationship added related to 06501
2012-08-19 09:42 DenisChenu Relationship added related to 06426
2012-08-19 14:34 TMSWhite Note Added: 20522
2012-08-19 14:34 TMSWhite Status new => feedback
2012-08-19 14:41 DenisChenu Note Added: 20523
2012-08-19 14:41 DenisChenu Status feedback => new
2012-08-19 14:50 TMSWhite Note Added: 20525
2012-08-19 14:58 DenisChenu Note Added: 20527
2012-08-19 18:45 c_schmitz Assigned To => DenisChenu
2012-08-19 18:45 c_schmitz Status new => assigned
2012-08-19 19:58 DenisChenu Note Added: 20533
2012-10-02 14:56 c_schmitz Note Added: 20980
2012-10-02 15:04 TMSWhite Note Added: 20983
2012-10-02 15:08 DenisChenu Note Added: 20984
2012-10-11 13:11 DenisChenu Assigned To DenisChenu => c_schmitz
2012-10-11 13:12 DenisChenu Note Added: 21211
2012-10-11 13:18 c_schmitz Note Added: 21213
2012-10-11 13:18 c_schmitz Project Bug reports => Development
2012-10-11 14:22 DenisChenu Note Added: 21220
2012-10-11 14:31 c_schmitz Note Added: 21221
2012-10-11 14:31 c_schmitz Assigned To c_schmitz => DenisChenu
2012-10-11 14:46 DenisChenu Product Version 2.00RC9 =>
2012-10-11 14:46 DenisChenu Target Version => 2.1
2012-10-11 14:47 DenisChenu Note Added: 21224
2012-10-11 14:47 DenisChenu Note Edited: 21224 View Revisions
2012-10-16 21:24 TMSWhite Note Added: 21390
2012-10-17 09:13 DenisChenu Note Added: 21392
2012-10-22 14:38 DenisChenu Note Added: 21533
2013-04-08 22:57 DenisChenu Target Version 2.1 =>
2013-09-01 15:42 mfaber Relationship added related to 08119
2013-09-29 18:52 mfaber Relationship added related to 08201
2013-09-30 14:57 mfaber Assigned To DenisChenu => mfaber
2013-09-30 14:59 mfaber Reproducibility have not tried => always
2013-09-30 14:59 mfaber Product Version => 2.05
2013-09-30 14:59 mfaber Target Version => 2.05
2013-09-30 15:04 DenisChenu Note Added: 26447
2013-10-01 21:33 mfaber Changeset attached => LimeSurvey 2.05 551a9889
2013-10-01 21:33 c_schmitz Changeset attached => LimeSurvey 2.05 81384ffc
2013-10-01 21:33 c_schmitz Note Added: 26464
2013-10-01 21:33 c_schmitz Assigned To mfaber => c_schmitz
2013-10-01 21:33 c_schmitz Resolution open => fixed
2013-10-01 21:59 mfaber Assigned To c_schmitz => mfaber
2013-10-01 21:59 mfaber Status assigned => resolved
2013-10-01 21:59 mfaber Fixed in Version => 2.05
2013-10-01 22:25 mfaber Changeset attached => LimeSurvey master 91068ed1
2013-10-01 22:25 mfaber Note Added: 26465
2014-01-11 09:11 mfaber Status resolved => closed
2019-07-13 18:33 DenisChenu Relationship added related to 14944