| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| en:create:feedback-visual [04.04.2019 23:14] – admin | en:create:feedback-visual [23.10.2026 14:44] (current) – external edit 127.0.0.1 |
|---|
| ====== Personal evaluation for the participant ====== | ====== Individual Feedback for Participants ====== |
| |
| |
| Using the functions ''[[:en:create:functions:value]]'', ''[[:en:create:functions:valueMean]]'', the participant's answers can already be evaluated during the Questionnaire session (also see [[:en:create:points]]). Some questions, like for instance [[:en:create:questions:IAT]], deliver an evaluation directly. Additionally, with the help of ''[[:en:create:functions:statistic]]'' function, it is possible to evaluate values of all the previously tested participants. | Using the functions ''[[:en:create:functions:value]]'' and ''[[:en:create:functions:valuemean]]'', the participant's answers can already be evaluated during the survey (also see [[points]]). Some questions, like for instance the [[:en:create:questions:iat]], deliver an evaluation directly. Additionally, with the help of ''[[:en:create:functions:statistic]]'' function, it is possible to evaluate values of all the previously tested participants. |
| |
| | **Note:** This tutorial shows how feedback can be displayed within or at the end of a questionnaire. Using the additional [[:en:results:analyses|automatic data analysis]] module, it is possible to provide a PDF with a personal feedback for download, see [[:en:results:report]]. |
| | |
| | **Note:** Instructions on how to give feedback on individual questions (correct/incorrect) can be found in a separate tutorial: [[:en:create:feedback-correct]] |
| | |
| | **Note:** Another tutorial explains how to provide a print view of a participant's own answers ("print/save my questionnaire"): ''[[:en:create:functions:answersprint]]'' |
| |
| ===== Presenting outcome as text ===== | ===== Presenting outcome as text ===== |
| ==== Single Values (II) ==== | ==== Single Values (II) ==== |
| |
| Possibly, one may also want to output different lines of text depending on the outcome of the evaluation. To set this up the function [[:de:create:filters|Filter]] can be used: | Possibly, one may also want to output different lines of text depending on the outcome of the evaluation. For this, a [[:en:create:filters|filter]] is used: |
| |
| <code php> | <code php> |
| } | } |
| </code> | </code> |
| | |
| | **Note:** The line ''$zValue = ($value - 5) / 2.8;'' performs a z-transformation under the assumption that the values follow a distribution with a mean of 5 and a standard deviation of 2.8. The resulting values ''$zValue'' then lie within the range ''[-3;+3]'' in 99% of the cases. You do not have to perform a z-transformation, but if you do, you have to adjust the values. |
| |
| |
| ==== Multiple Values ==== | ==== Multiple Values ==== |
| |
| Multiple values are commonly displayed in a table. The easiest way to do this is with text-blocks and placeholders. For instance you could save the following HTML code under **Textblocks and Labels** inside a new textblock //results//. | Multiple values are commonly displayed in a table. The easiest way to do this is with text-blocks and placeholders. For instance you could save the following HTML code under **Textblocks and Labels** inside a new textblock //results// ("HTML code" representation). |
| |
| <code html> | <code html> |
| |
| <code php> | <code php> |
| text('result', array( | show('result', array( |
| '%val-extra%' => valueMean('AB01_01', 'AB01_05', 'AB01_09'), | '%val-extra%' => valueMean('AB01_01', 'AB01_05', 'AB01_09'), |
| '%val-neuro%' => valueMean('AB01_02', 'AB01_06', 'AB01_10') | '%val-neuro%' => valueMean('AB01_02', 'AB01_06', 'AB01_10') |
| {{:de:create:exp.feedback-visual.textelement.png?nolink|An example for visual presentation of a single value}} | {{:de:create:exp.feedback-visual.textelement.png?nolink|An example for visual presentation of a single value}} |
| |
| Save the following HTML code as a textblock, for example under the identifier "responseSD". | Save the following HTML code as a new text in the list of questions (the following examples assume that it gets the ID "RS01"). |
| |
| <code html> | <code html> |
| // Use textblocks (only if $value delivered a valid value) | // Use textblocks (only if $value delivered a valid value) |
| if ($value > 0) { | if ($value > 0) { |
| show('responseSD', array( | show('RS01', array( |
| '%title%' => 'Extraversion', | '%title%' => 'Extraversion', |
| '%zValue100%' => round($zValue * 100) | '%zValue100%' => (string)round($zValue * 100) |
| )); | )); |
| } | } |
| </code> | </code> |
| | |
| | **Note:** The line ''$zValue = ($value - 5) / 2.8'' performs a z-transformation under the assumption that the values follow a distribution with a mean of 5 and a standard deviation of 2.8. The resulting values ''$zValue'' then lie within the range ''[-3;+3]'' in 99% of the cases. You do not have to perform a z-transformation, but if you do, you have to adjust the values. |
| |
| |
| ==== Multiple Values (II) ==== | ==== Multiple Values (II) ==== |
| |
| As long as the //Highcharts// plug-in is available on the questionnaire server, you can use the Highcharts library to display nifty diagrams in your questionnaire. As long as the category labels are saved in the array ''$labels'', the results are saved in the array ''$ownData'', and reference data in the array ''$refData'', you can use the following text block "chart" (//Darstellung// "HTML_Code") and the associated PHP code to display a bar chart. You can find clarifications and details at [[http://www.highcharts.com/docs|Highcharts Dokumentation]]. | You can use the ChartJS library to display nifty diagrams in your questionnaire. If the category labels are saved in the array ''$labels'', the results are saved in the array ''$ownData'' and reference data is saved in the array ''$refData'', you can use the following text (in the example it has the identifier "CH01", as //Darstellung// "HTML_Code") and the associated PHP code to display a bar chart. You can find clarifications and details at [[https://www.chartjs.org/|ChartJS Documentation]]. |
| |
| <code html> | <code html> |
| <!-- Container for the diagram --> | <!-- Container for the diagram --> |
| <div id="chart" style="height: 600px"></div> | <canvas id="myChart" width="400" height="300"></canvas> |
| |
| <script type="text/javascript" src="../plugins/highcharts/highcharts.js"></script> | |
| <script type="text/javascript"> | <script type="text/javascript"> |
| <!-- | <!-- |
| |
| $(function () { | var chartCanvas = document.getElementById('myChart').getContext('2d'); |
| $('#chart').highcharts({ | var chart01 = new Chart(chartCanvas, { |
| chart: { | type: 'line', |
| type: 'bar' | data: { |
| }, | labels: %labels%, |
| title: { | datasets: [{ |
| text: null | label: 'Ihr Wert', |
| }, | data: %ownData%, |
| xAxis: { | backgroundColor: '#FF9900', |
| categories: %labels%, | borderColor: '#FFCCAA', |
| title: { | pointRadius: 8 |
| text: null | }, { |
| } | label: 'Durchschnitt', |
| }, | |
| plotOptions: { | |
| bar: { | |
| dataLabels: { | |
| enabled: true | |
| } | |
| } | |
| }, | |
| legend: { | |
| layout: 'horizontal', | |
| align: 'center', | |
| verticalAlign: 'bottom', | |
| floating: false, | |
| borderWidth: 0, | |
| backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'), | |
| shadow: false | |
| }, | |
| credits: { | |
| enabled: false | |
| }, | |
| series: [{ | |
| name: 'Average', | |
| data: %refData%, | data: %refData%, |
| color: '#BBBBBB', | backgroundColor: '#AAAAAA', |
| dataLabels: { | borderColor: '#DDDDDD', |
| enabled: false | pointRadius: 8 |
| | }] |
| | }, |
| | options: { |
| | indexAxis: 'y', |
| | scales: { |
| | x: { |
| | beginAtZero: true |
| } | } |
| }, { | } |
| name: 'Your Value', | } |
| data: %ownData%, | |
| color: '#009900', | |
| dataLabels: { | |
| enabled: false | |
| } | |
| }] | |
| }); | |
| }); | }); |
| |
| |
| <code php> | <code php> |
| // Make jQuery library available | // Make ChartJS library available |
| option('script', 'jQuery 1.x'); | library('ChartJS'); |
| // Bind the textblock with the HTML code for the chart | |
| text('chart', array( | // Test data (here you would read data from the dataset) |
| | $labels = ['Motivation', 'Engagement', 'Qualifikation']; |
| | $ownData = [57, 42, 80]; |
| | $refData = [52, 48, 74]; |
| | |
| | // Include text module with the HTML code for the chart |
| | show('TX09', [ |
| '%labels%' => json_encode($labels), | '%labels%' => json_encode($labels), |
| '%ownData%' => json_encode($ownData), | '%ownData%' => json_encode($ownData), |
| '%refData%' => json_encode($refData) | '%refData%' => json_encode($refData) |
| )); | ]); |
| </code> | </code> |