<form name="theform" method="post" action="question.php">
<center>
<input type="hidden" name="nextwizardpage" value="calculated.html"/>
<table cellpadding="5">
<?php if (!empty($datasets)) { ?>
<tr valign="top">
    <td align="right"><b><?php  print_string("wildcard", "quiz") ?> </b></td>
    <td align="right">{<?php foreach($datasets as $name => $tmp){break;} p($name) ?>}</td>
    <td><b> - <?php  print_string("substitutedby", "quiz") ?></b></td>
    <td align="left"><?php echo array_shift($datasets) ?></td>
</tr>
<?php   foreach ($datasets as $name => $menu) { ?>    
<tr valign="top">
    <td/>
    <td align="right">{<?php p($name) ?>}</td>
    <td/>
    <td align="left"><?php echo $menu ?>
</tr>
<?php   }
      } else { ?>
<tr>
<td colspan="4"><?php print_string('nopossibledatasets', 'quiz') ?>
<input type="hidden" name="dataset[]" value="0"/>
</td>
</tr>
<?php } ?>
<tr valign="top">
    <td/>
    <td/>
    <td/>
    <td>
        <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey; ?>" />
        <input type="hidden" name="name"               value="<?php  p($question->name) ?>" />
        <input type="hidden" name="questiontext"       value="<?php  p($question->questiontext) ?>" />
        <input type="hidden" name="questiontextformat" value="<?php  p($question->questiontextformat) ?>" />
        <input type="hidden" name="image"              value="<?php  p($question->image) ?>" />
        <?php if (!empty($hiddeninputnames)) foreach ($hiddeninputnames as $key => $hiddeninputname) { ?>
            <input type="hidden" name="<?php p($hiddeninputname) ?>"
                                value="<?php p($hiddeninputvalues[$key]) ?>" />
        <?php } ?>
    </td>
</tr>
</table>

<input type="hidden" name="id" value="<?php  p($question->id) ?>" />
<input type="hidden" name="qtype" value="<?php  p($question->qtype) ?>" />
<input type="hidden" name="category" value="<?php  p($question->category) ?>" />
<input type="submit"      value="<?php  print_string("savechanges") ?>" />
</center>
</form>

