********** 模板入口 ************* {#template MAIN} {#include questionBuilder root=$T} {#/template MAIN} ********** 创建题干和答案模板 ********* {#template questionBuilder} {#param name=st value=0}
{#foreach $T as t}
{$T.t.name}   共 {$T.t.questions.length} 题
{#foreach prepareQuestions($T.t.id,$T.t.questions) as q}
{#if $T.t.name == "单选题"} {#include sign root=$T.q.question_id} ({$T.q.score}分) 
{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content}
{#include questionImg root=$T.q}
{#foreach ReplaceFirstChar(prepareAnswers($T.q.answers)) as a}
{#include answerImg root=$T.a}
{#/for}
{#elseif $T.t.name == "填空题"} {#include sign root=$T.q.question_id} ({$T.q.score}分) 
{$P.st = $P.st + 1}{#include casual root=$T.t}{transformMuilte($T.t,$T.q)}
{#include questionImg root=$T.q} {#elseif $T.t.name == "多选题"} {#include sign root=$T.q.question_id} ({$T.q.score}分) 
{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content} {#include questionImg root=$T.q}
{#foreach ReplaceFirstChar(prepareAnswers($T.q.answers)) as a}
{#include answerImg root=$T.a}
{#/for}
{#elseif $T.t.name == "是非题"} {#include sign root=$T.q.question_id} ({$T.q.score}分) 
{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content} {#include questionImg root=$T.q}
{#foreach ($T.q.answers) as a}
{#include answerImg root=$T.a}
{#/for}
{#elseif $T.t.name == "简答题"} {#include sign root=$T.q.question_id} ({$T.q.score}分) 
{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content} {#include questionImg root=$T.q}
{#/if} {#/for} {#/for} {#/template questionBuilder} {#template sign}   {#/template sign} {#template casual} .   {#/template casual} {#template checkComplate} {#if $T==1}{#/if} {#/template checkComplate} {#template questionImg} {#if $T.hasImg==1}
{#/if} {#/template questionImg} {#template answerImg} {#if $T.hasImg==1}
{#/if} {#/template answerImg}