********** 模板入口 ************* {#template MAIN} {#include questionBuilder root=$T} {#/template MAIN} ********** 创建题干和答案模板 ********* {#template questionBuilder} {#param name=st value=0} {#foreach $T as t} {#foreach prepareQuestions($T.t.id,$T.t.questions) as q} {#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}