Modifying display.html of MC-Questions to get a new type

Modifying display.html of MC-Questions to get a new type

Stefan Eberhard發表於
Number of replies: 0
Can the MC-Question be changed to a new type by modifying display.html?

A accounting question type with checkboxes on the left (debit) and right (credit) side could be created by just changing the display.html

If you have a given number of answers (10 or 12 or 14) and there is no shuffling of answers, display.html could be changed to create a two-row-table with first answer and check-box on the left side and the second answer and check-box on the right side looking something like the attached (faked) picture.

In display-html there would probably be a change in this section:

 <table class="answer">
 <?php $row = 1; foreach ($anss as $answer) { ?>
 <tr class="<?php echo 'r'.$row = $row ? 0 : 1; ?>">
 <td class="c0 control">
 <?php echo $answer->control; ?>
 </td>
 <td class="c1 text <?php echo $answer->class ?>">
 <label for="<?php echo $answer->id ?>">
 <?php echo $answer->text; ?>
 <?php echo $answer->feedbackimg; ?>
 </label>
 </td>
 <td class="c0 feedback">
 <?php echo $answer->feedback; ?>
 </td>
 </tr>
 <?php } ?>
 </table>

In this case you can use the negative mark capability of the MC-Question type.



評比平均分數: -