Bitte helfen Sie uns, Ihnen zu helfen und füllen Sie folgende Felder aus:
Ihre LimeSurvey-Version:
Version 5.3.13
Eigener Server oder LimeSurvey-Cloud: Cloud
Genutzte Designvorlage: fruity
==================
Hallo zusammen,
ich habe seit paar Wochen hier schon viel gelesen und mich mit Limesurvey vertraut gemacht, dennoch bekomme ich folgendes Problem nicht gelöst.
Kurze Einleitung: Matrixfrage 3 Teilfragen und 3 Teilantworten:
Es soll eine Max diff Frage gestellt werden, die Tabelle ist unten im Rohdesign angegeben, aber da ich parallel mir schon die Auswertung bei STATA anschaue, bin ich auf ein Problem gestoßen.
Ich würde gerne, dass Limesurvey über if-Bedingungen mir automatisch in einer versteckten Teilfrage (hier Teilfrage 3; man könnte auch dies den "middle" Wert nennen) die Alternative ausgeben lässt, die gar nicht angekreuzt wurde. Aber ich weiß nicht wie ich das in den EM reinschreiben soll.
Alternative1Alternative 2Alternative 3
Spatial content:xxxxxxx
Specific building:yyyyyy
distance 20kmdistance 25kmdistance 30km
Spatial content:xxxxxxx
Specific building:yyyyyy
distance 20kmdistance 25kmdistance 30kmMake a choice best Make a choice worst
Quellcode:
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tbody>
<tr>
<td colspan="2" style="text-align: center;" width="20%"> </td>
<td bgcolor="#308737" style="text-align: center;" width="26%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Alternative1</strong></span></span></td>
<td bgcolor="#308737" style="text-align: center;" width="26%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Alternative 2</strong></span> </span></td>
<td bgcolor="#308737" style="text-align: center;" width="28%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Alternative 3</strong></span> </span></td>
</tr>
<tr>
<td bgcolor="#c1c1c1" style="text-align: center;">
<p><br /><span style="font-size:16px;">Spatial content:xxxxxxx</span><span style="font-size:6px;"> </span></p>
</td>
<td bgcolor="#c1c1c1" style="text-align: center;">
<p><br /><span style="font-size:16px;">Specific building:yyyyyy</span><span style="font-size:6px;"> </span></p>
</td>
<td bgcolor="#f2f2f2" style="text-align: center;">
<div><span style="font-size:20px;"><strong>distance 20km</strong></span></div>
</td>
<td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong>distance 25km</strong></span></td>
<td style="text-align: center;" width="28%"><span style="font-size:20px;"><span style="font-size:20px;"><strong>distance 30km</strong> </span></span></td>
</tr>
<tr>
<td bgcolor="#c1c1c1" style="text-align: center;">
<p><br /><span style="font-size:16px;">Spatial content:xxxxxxx</span><span style="font-size:6px;"> </span></p>
</td>
<td bgcolor="#c1c1c1" style="text-align: center;">
<p><br /><span style="font-size:16px;">Specific building:yyyyyy</span><span style="font-size:6px;"> </span></p>
</td>
<td bgcolor="#f2f2f2" style="text-align: center;">
<div><span style="font-size:20px;"><strong>distance 20km</strong></span></div>
</td>
<td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong>distance 25km</strong></span></td>
<td style="text-align: center;" width="28%"><span style="font-size:20px;"><span style="font-size:20px;"><strong>distance 30km</strong></span> </span></td>
</tr>
<tr>
<td bgcolor="#c1c1c1" colspan="2" style="text-align: center;"><span style="font-size:14px;">Make a choice best </span></td>
<td bgcolor="#308737" style="text-align: center;"> </td>
<td bgcolor="#308737" style="text-align: center;"> </td>
<td bgcolor="#308737" style="text-align: center;"> </td>
</tr>
<tr>
<td bgcolor="#c1c1c1" colspan="2" style="text-align: center;"><span style="font-size:14px;">Make a choice worst</span></td>
<td bgcolor="#308737" style="text-align: center;"> </td>
<td bgcolor="#308737" style="text-align: center;"> </td>
<td bgcolor="#308737" style="text-align: center;"> </td>
</tr>
</tbody>
</table>
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Move the radios
$('.question-text table:eq(0) tr:last td:eq(1)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(0) *', thisQuestion));
$('.question-text table:eq(0) tr:last td:eq(2)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(1) *', thisQuestion));
$('.question-text table:eq(0) tr:last td:eq(3)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(2) *', thisQuestion));
$('.question-text table:eq(0) tr:last td:eq(4)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(3) *', thisQuestion));
$('.question-text table:eq(0) tr:last td:eq(5)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(4) *', thisQuestion));
$('.question-text table:eq(0) tr:last td:eq(6)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(5) *', thisQuestion));
$('.question-text table:eq(0) tr:last td:eq(7)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(6) *', thisQuestion));
// Some classes for presentation
$('.question-text table:eq(0) input:radio', thisQuestion).closest('td').addClass('answer-item radio-item text-center radio');
$('.question-text table:eq(0) .radio-item label', thisQuestion).show();
// Click event on the table cells
$('.question-text table:eq(0) .radio-item', thisQuestion).on('click', function(e) {
$('input:radio', this).trigger('click');
});
$('.question-text table:eq(0) input:radio', thisQuestion).on('click', function(e) {
e.stopPropagation();
$('.question-text table:eq(1) .radio-item', thisQuestion).on('click', function(e) {
$('input:radio', this).trigger('click');
});
$('.question-text table:eq(1) input:radio', thisQuestion).on('click', function(e) {
e.stopPropagation();
});
// Clean-up styles
$('.answer-container', thisQuestion).hide();
$('.question-text table:eq(0) .label-text', thisQuestion).remove();
$('.question-text table:eq(0) .radio-text', thisQuestion).css({
'cursor': 'pointer'
});
$('td.radio', thisQuestion).css({
'display': 'table-cell',
'padding': '5px'
});
});
</script>
Viele Grüße
Michael