<{strip}>
<{* 解答欄表示用テンプレート *}>

<{if $question.question_type == QUIZ_QUESTION_TYPE_RADIO_VALUE && $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_NORMAL}>
	<h6>
		<{foreach from=$question.choices item=choice name="choice"}>
			<input type="hidden" name="choice_id[<{$question.question_id}>][]" value="<{$choice.choice_id}>">
			<input type="radio" name="answer_value[<{$question.question_id}>]" value="<{$choice.choice_id}>">
			<{$choice.choice_value|nl2br}>&nbsp;
		<{/foreach}>
	</h6>

<{elseif $question.question_type == QUIZ_QUESTION_TYPE_RADIO_VALUE && $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_REFERENCE}>
	<ul>
		<{foreach from=$question.choices item=choice name="choice"}>
			<{if $choice.correct == _ON}>
				<li><span style="font-size:xx-small"><{$choice.choice_value|nl2br}></span></li>
			<{/if}>
		<{/foreach}>
	</ul>

<{elseif $question.question_type == QUIZ_QUESTION_TYPE_RADIO_VALUE && $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_ANSWER}>
	<ul>
		<{foreach from=$question.choices item=choice name="choice"}>
			<{if $answer.answer_value[$choice.choice_id] == _ON}>
				<li><span style="font-size:xx-small"><{$choice.choice_value|nl2br}></span></li>
			<{/if}>
		<{/foreach}>
	</ul>

<{elseif $question.question_type == QUIZ_QUESTION_TYPE_CHECKBOX_VALUE && $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_NORMAL}>
	<h6>
		<{foreach from=$question.choices item=choice name="choice"}>
			<input type="hidden" name="choice_id[<{$question.question_id}>][]" value="<{$choice.choice_id}>">
			<input type="checkbox" name="answer_value[<{$question.question_id}>][<{$choice.choice_id}>]" value="<{$choice.choice_id}>">
			<{$choice.choice_value|nl2br}>&nbsp;
		<{/foreach}>
	</h6>

<{elseif $question.question_type == QUIZ_QUESTION_TYPE_CHECKBOX_VALUE && $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_REFERENCE}>
	<ul>
		<{foreach from=$question.choices item=choice name="choice"}>
			<{if $choice.correct == _ON}>
				<li><span style="font-size:xx-small"><{$choice.choice_value|nl2br}></span></li>
			<{/if}>
		<{/foreach}>
	</ul>

<{elseif $question.question_type == QUIZ_QUESTION_TYPE_CHECKBOX_VALUE && $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_ANSWER}>
	<ul>
		<{foreach from=$question.choices item=choice name="choice"}>
			<{if $answer.answer_value[$choice.choice_id] == _ON}>
				<li><{$choice.choice_value|nl2br}></li>
			<{/if}>
		<{/foreach}>
	</ul>

<{elseif $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_NORMAL}>
	<textarea name="answer_value[<{$question.question_id}>]" cols="20" rows="5"></textarea>
	<br />

<{elseif $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_REFERENCE}>
	<h6><{$answer.answer_value|smarty:nodefaults|nl2br}></h6>

<{elseif $choiceDisplay == $smarty.const.QUIZ_CHOICE_DISPLAY_ANSWER}>
	<h6><{$answer.answer_value|smarty:nodefaults|nl2br}></h6>

<{/if}>

<{/strip}>