- Posts: 27
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Matriz de números
- brodriguez
- Topic Author
- Offline
- Junior Member
Less
More
3 years 10 months ago #200153
by brodriguez
Matriz de números was created by brodriguez
Hola, tengo una pregunta sobre matriz de número donde tengo en las columnas marcas y en las filas atributos. Mi pregunta es cómo hacer que las marcas roten, o sea se muestren en orden aleatorio
Gracias!
Gracias!
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
3 years 10 months ago #200157
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Matriz de números
This is the English forum, please only use English here.
Este es el foro en Ingles, por favor, solo usar Ingles. Voy a mover la pregunta al foro en Español.
Este es el foro en Ingles, por favor, solo usar Ingles. Voy a mover la pregunta al foro en Español.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
3 years 10 months ago #200158
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Matriz de números
Qual es tu versión de LS?
Hasta 3.x estoy bastante seguro que no funciona, por lo menos no "out of the box" (sin una solución individual en JavaScript).
Ahora 4.x (que yo actualmente no recomiendo porque todavía tiene muchos errores) hay un bug, que la función "rotar" hace rotar tanto las lineas cuanto las columnas. Entonces parece que 4.x puede ter esta función (pero no recomiendo usarlo por causa de todos los bugs en abierto).
Hasta 3.x estoy bastante seguro que no funciona, por lo menos no "out of the box" (sin una solución individual en JavaScript).
Ahora 4.x (que yo actualmente no recomiendo porque todavía tiene muchos errores) hay un bug, que la función "rotar" hace rotar tanto las lineas cuanto las columnas. Entonces parece que 4.x puede ter esta función (pero no recomiendo usarlo por causa de todos los bugs en abierto).
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- brodriguez
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 0
3 years 10 months ago #200160
by brodriguez
Replied by brodriguez on topic Matriz de números
Hola es Versión 3.17.13+190824
Sería ideal poder contar entonces con una solución en javascript, (se pega el script en el texto de la pregunta - modo de código fuente)
Gracias
Sería ideal poder contar entonces con una solución en javascript, (se pega el script en el texto de la pregunta - modo de código fuente)
Gracias
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
3 years 10 months ago #200167
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Matriz de números
Con Javascript no puedo ayudar.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- brodriguez
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 0
3 years 10 months ago #200168
by brodriguez
Replied by brodriguez on topic Matriz de números
Gracias y ojalá alguien mas pudiera ayudarme...
Saludos
Saludos
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3941
3 years 10 months ago #200189
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Matriz de números
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- brodriguez
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 0
3 years 10 months ago #200191
by brodriguez
Replied by brodriguez on topic Matriz de números
Efectivamente Joffm
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3941
3 years 10 months ago #200223
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Matriz de números
Un ejemplo.
Nota: Solo se cambia el texto en las columnas.
Debe reestructurar antes del análisis debido al orden en "Def".
Joffm
Nota: Solo se cambia el texto en las columnas.
Debe reestructurar antes del análisis debido al orden en "Def".
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- brodriguez
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 0
3 years 10 months ago #200255
by brodriguez
Replied by brodriguez on topic Matriz de números
Muchas gracias
Hay alguna forma cuando las etiquetas o nombres de las marcas son muy largas, poder ubicarlas en forma vertical?
Hay alguna forma cuando las etiquetas o nombres de las marcas son muy largas, poder ubicarlas en forma vertical?
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3941
3 years 9 months ago #200848
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Matriz de números
Una solución mejor
En el codigo fuente de la pregunta.
En el codigo fuente de la pregunta.
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ randomArrayNumCols({QID}); }); // A function to randomize columns in an array-numbers question function randomArrayNumCols(qID){ var thisQuestion = $('#question'+qID); // Index the array columns $('table.subquestion-list tr', thisQuestion).each(function(i) { $('> *', this).each(function(i) { $(this).attr('data-index', i); }); }); // Create an array of the columns var columns = []; $('table.subquestion-list tr[id^="javatbd"]:eq(0) td.answer-item', thisQuestion).each(function(i) { columns.push($(this).attr('data-index')); }); // Shuffle the columns array columns = $.shuffle(columns); // Reposition the row elements $('table.subquestion-list tr', thisQuestion).each(function(i) { var thisRow = $(this); $(columns).each(function(i, val) { thisRow.append($('[data-index="'+val+'"]', thisRow)); thisRow.append($('.col-no-answer', thisRow)); }); }); } // A function to shuffle elements or contents of arrays (function($){ $.fn.shuffle = function() { return this.each(function(){ var items = $(this).children(); return (items.length) ? $(this).html($.shuffle(items)) : this; }); } $.shuffle = function(arr) { for( var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x ); return arr; } })(jQuery); </script>
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
- brodriguez
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 0
3 years 9 months ago #200849
by brodriguez
Replied by brodriguez on topic Matriz de números
Muchas gracias Joffm
The topic has been locked.