<{* $Id: formmakex_manage_results.html,v 1.0 2009/02/10 makinosuke Exp $ *}> <{capture assign=respondents_nav}><{strip}>
<{if $respondents.prev_rid}> < <{$langs.prev}> <{/if}>
<{$smarty.const._AM_FORMMAKEX_SEEARESULT}>
<{if $respondents.next_rid}> <{$langs.next}> > <{/if}>
<{/strip}><{/capture}> <{$respondents_nav}> <{if $respondents.current_rid == ''}> <{capture assign=results_nav}><{strip}> <{foreach from=$form.questions item=question name=results_nav}> <{if $question.typename != 'sectiontext'}> <{counter assign=nav_i}> <{if $nav_i > 1}> | <{/if}> <{$question.content}> <{/if}> <{/foreach}> <{/strip}><{/capture}>

<{$smarty.const.FORMMAKEX_LIST_COL_RESULTS_SPREADSHEET}>

<{foreach from=$form.questions item=question name=questions}>

<{$question.content}> (<{$question.name}>) <{if $question.required == 'Y'}> *<{/if}>

<{if $question.typename == 'yesno' || $question.typename == 'radio' || $question.typename == 'dropdown'}> <{foreach from=$question.responses_options item=response}> <{/foreach}> <{foreach from=$question.responses_others item=response}> <{/foreach}>
value count %
<{$response.response}> <{$response.subtotal}> <{$response.percentage_countNA|round:1}> %
<{$response.response}> <{$response.subtotal}> <{$response.percentage_countNA|round:1}> %
<{$smarty.const._GT_NA}> <{$question.NA_total}> <{$question.NA_total_percentage|round:1}> %
<{$smarty.const._GT_SUM}> <{$question.responses_total_countNA}> <{$question.percentages_total_countNA|round:1}> %
<{elseif $question.typename == 'checkbox'}> <{assign var=subtotal_max value=1}> <{foreach from=$question.responses_options item=response}> <{if $response.subtotal > $subtotal_max}><{assign var=subtotal_max value=`$response.subtotal`}><{/if}> <{/foreach}> <{foreach from=$question.responses_others item=response}> <{if $response.subtotal > $subtotal_max}><{assign var=subtotal_max value=`$response.subtotal`}><{/if}> <{/foreach}> <{if $question.NA_total > $subtotal_max}><{assign var=subtotal_max value=`$question.NA_total`}><{/if}>
value count %
<{$response.response}> <{$response.subtotal}> <{$response.percentage_countNA|round:1}> %
<{$response.response}> <{$response.subtotal}> <{$response.percentage_countNA|round:1}> %
<{elseif $question.typename == 'textbox' || $question.typename == 'essaybox' || $question.typename == 'attach'}> <{foreach from=$question.responses item=response}> <{/foreach}>
value count %
<{$response.response}> <{$response.subtotal}> <{$response.percentage_countNA|round:1}> %
<{$smarty.const._GT_NA}> <{$question.NA_total}> <{$question.NA_total_percentage|round:1}> %
<{$smarty.const._GT_SUM}> <{$question.responses_total_countNA}> <{$question.percentages_total_countNA|round:1}> %
<{elseif $question.typename == 'numeric'}> <{foreach from=$question.responses item=response}> <{/foreach}>
value count %
<{$response.response}> <{$response.subtotal}> <{$response.percentage_countNA|round:1}> %
<{$smarty.const._GT_NA}> <{$question.NA_total}> <{$question.NA_total_percentage|round:1}> %
<{$smarty.const._GT_SUM}> <{$question.responses_total_countNA}> <{$question.percentages_total_countNA|round:1}> %
max min average median
<{$question.numeric_responses_max}> <{$question.numeric_responses_min}> <{$question.numeric_responses_average|round:1}> <{$question.numeric_responses_median}>
<{elseif $question.typename == 'date'}> <{foreach from=$question.date_responses_nested key=year_key item=year_data}> <{/foreach}>
year count %
<{$year_key}> <{$year_data.subtotal}> <{$year_data.percentage_countNA|round:1}>%
<{foreach from=$year_data.month key=month_key item=month_data}> <{/foreach}>
month count %
<{$month_key}> <{$month_data.subtotal}> <{$month_data.percentage_countNA|round:1}>%
<{foreach from=$month_data.day key=day_key item=day_data}> <{/foreach}>
day count %
<{$day_key}> <{$day_data.subtotal}> <{$day_data.percentage_countNA|round:1}>%
<{$smarty.const._GT_NA}> <{$question.NA_total}> <{$question.NA_total_percentage|round:1}> %
<{elseif $question.typename == 'rate'}> <{foreach from=$question.responses item=response}> <{foreach from=$response.rates item=rate}> <{/foreach}> <{/foreach}>
subject 1 2 3 4 5 average <{$smarty.const._GT_NA}>
<{$response.subject}><{$rate.subtotal}> (<{$rate.percentage_countNA|round:1}>%)<{$response.average|round:1}> <{$response.NA_total}> (<{$response.NA_total_percentage|round:1}>%)
<{/if}> <{include file="db:formmakex_manage_results_chart.html"}>
[ <{$results_nav}> ]
<{/foreach}> <{else}>

<{$langs.respondent}> <{$respondents.current_respondent}> <{$respondents.current_submitted|date_format:'%Y/%m/%d %H:%M'}> (RID: <{$respondents.current_rid}>)

<{foreach from=$form.questions item=question}> <{/foreach}>
question response
<{$question.content}> (<{$question.content}>) <{if $question.required == 'Y'}> *<{/if}> <{foreach from=$question.responses item=response}> <{$response.response}> <{/foreach}>
<{if $deny.process==3}> <{$langs.deny_result}> <{else}>
<{/if}>
<{/if}> <{$respondents_nav}>