Check out the LimeSurvey source code on GitHub!

Custom Rarnking Question's Render

More
5 years 9 months ago #60094 by lsga
Hi,

The default render of a ranking question is a table with the class 'rank', and the answers and the ranks are in the same line.
Ex:
<table class="rank">
	<tbody>
		<tr>
             		<td class="rank label">...</td>
			<td class="rank output">...</td>
		</tr>
	</tbody>
</table>

I looked in the documentation and it seems there is no way to change that templating, because the answers are called with: {ANSWER}...

So, where can I change that ? Is a change of this nature a 'hack', or is there a plugin or extension system to do it in a clean way ?

Please Log in to join the conversation.

More
5 years 9 months ago #60095 by lsga
Ok, I found it in quanta.php, in the function do_ranking($ia). I changed $answer to:
$answer .= "\t<div class='rank'>\n"
    . "\t<div class='rank label'>\n"
    . "<strong>&nbsp;&nbsp;<label for='CHOICES_{$ia[0]}'>".$clang->gT("Your Choices").":</label></strong><br />\n"
    . "&nbsp;".$choicelist
    . "\t&nbsp;</div>\n";

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form