Problem with the include function


Author
Message
schilleriana
schilleriana
Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)
Group: Forum Members
Posts: 4, Visits: 1

We have a problem with the include function.


We have two files experimentkreativhoch.exp and experimentkreativganz.exp, which are included in the testDurchgang.exp.


The <expressions>, <values> and <defaults> tags are in the testDurchgang.exp file.


The problem now is to run the experiment. The Inquisit Application crashed immediately after clicking the run button.


Scripts: (http://130.60.233.170/Test_Durchgang.rar)



We hope someone can help us!


Thanks,


schilleriana







Tags
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

#1: The following <survey> definition is wrong:


<survey kreativ_ganz_survey>
/ pages =[1=surveypage kreativ_ganz;2=surveypage kreativ_ganz_ende]
</survey>


#2: <surveypage kreativ_hoch> refers to an expression that does not exist:


Expression 'expressions.answer_hochh' is invalid. Expression contains an unknown element or property name.


#3: Your <expressions> refer to an <item verstehenwords> element which does not exist in any of the files:


<expressions>
/ answer_hoch = getitem(item.verstehenwords, values.verstehen_itemnumber)
/ answer_ganz = getitem(item.verstehenwords, values.ganz_itemnumber)
</expressions>


I recommend you revise your code carefully.


Regards,


~Dave


schilleriana
schilleriana
Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Hello Dave


Thanks to your advices I've revised my code.


I revised the code (experimentkreativganz.exp, experimentkreativhoch.exp and testDurchgang.exp), but the problem is, that Inquisit crashed after clicking the "run" button (testDurchgang.exp). I have, when I will use the <include> function, no possibility to check the errors.


I have put a single file (experimentkreativganz_single_file.exp) in the rar file. With this one, Inquisit will run without a problem.



(The new file: http://130.60.233.170/Test_Durchgang_version2.rar )


regards,


Schilleriana


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

Seems like the include function is simply overwhelmed by the sheer length of the to-be-included scripts, ultimately resulting in a hard crash. Until this bug gets fixed, your options are:


- Do not use include in this particular case. Keep everything in a single file instead.


or


- Shorten your scripts by revising the scoring. There is a lot of redundancy and you could streamline things dramatically by making use of string functions (e.g. contains();) and recursive expressions.


Best regards,


~Dave


schilleriana
schilleriana
Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Hello Dave


Thank you for your response.


Yes, I see the problem with the redundancy [:)]


I will to check whether the synonym are in the list or not. The problem is to check the whole list of the items in a recursive way.  


<expressions>

/ answer = getitem(item.ganzwords, values.ganz_itemnumber)

</expressions>


When I use the Expression function, I can go to the whole list of the items with increasing the values.ganz_itemnumber. The problem for me is


the expression


<expressions>

/ answer = getitem(item.ganzwords, values.ganz_itemnumber)

</expressions>


I can´t use a "for/while" command. 


I will here increase the values.ganz_itemnumber in a recursive way and not to use in a such way


if( contains(textbox.handlung_eingabe1.response, expressions.answer) == true ) )  {values.handlung_richtige = concat(concat(values.handlung_richtige," "),expressions.answer)}; values.ganz_itemnumber+1


if( contains(textbox.handlung_eingabe1.response, expressions.answer) == true ) ) {values.handlung_richtige = concat(concat(values.handlung_richtige," "),expressions.answer)}; values.ganz_itemnumber+1


if( contains(textbox.handlung_eingabe1.response, expressions.answer) == true ) ) {values.handlung_richtige = concat(concat(values.handlung_richtige," "),expressions.answer)}; values.ganz_itemnumber+1


Do you have any solutions?


regards,


Schilleriana


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

There are several options. One would be to *not* use an <item> element to store the correct responses, but instead list them in a single long string. I.e.


<values>
/ validanswers = "Car,Cat,Case,Chair,Choir,..."
[...]
</values>


and then use the contains() function to check if the given response is contained in the string.


Regards,


~Dave


schilleriana
schilleriana
Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)Partner Member (786 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Thank you David.


This is a very good idea.



Regards,


Schilleriana


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search