123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- ********** 模板入口 *************
- {#template MAIN}
- {#include questionBuilder root=$T}
- {#/template MAIN}
- ********** 创建题干和答案模板 *********
- {#template questionBuilder}
- {#param name=st value=0}
- <div class="singleQuestionContainer">
- {#foreach $T as t}
- <div class="question-title paper-title"><a name='t({$T.t.id})'></a>{$T.t.name} 共 {$T.t.questions.length} 题</div>
- {#foreach prepareQuestions($T.t.id,$T.t.questions) as q}
-
- <div class="questioncontainer"><a name='q({$T.q.question_id})'></a>
- {#if $T.t.name == "单选题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> <br />{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content}</div>
- {#include questionImg root=$T.q}
- <div class="answercontainer">
- {#foreach ReplaceFirstChar(prepareAnswers($T.q.answers)) as a}
- <div class="answers">
- <span><input type="radio" id="Radio1" {GetCheckAnswer($T.q.question_id,$T.a.answer_id)} value="{$T.a.answer_id}" name="st-{$T.t.id}-{$T.q.question_id}" onclick='behaviour.Check_rad(this,"{$T.a.answer_id}","{$T.q.question_id}");ChecComplate()' />
- <label for='{$T.a.answer_id}'>{$T.a.content}</label>{#include answerImg root=$T.a}</span>
- </div>
- {#/for}
- </div>
-
- {#elseif $T.t.name == "填空题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> <br />{$P.st = $P.st + 1}{#include casual root=$T.t}{transformMuilte($T.t,$T.q)}</div>
- {#include questionImg root=$T.q}
-
- {#elseif $T.t.name == "多选题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> <br />{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content}</div>
- {#include questionImg root=$T.q}
- <div class="answercontainer">
- {#foreach ReplaceFirstChar(prepareAnswers($T.q.answers)) as a}
- <div class="answers">
- <span><input type="checkbox" id="{$T.a.answer_id}" {GetCheckAnswer($T.q.question_id,$T.a.answer_id)} value="{$T.a.answer_id}" name="st-{$T.t.id}-{$T.q.question_id}" onclick="behaviour.Check_chk(this,'st-{$T.t.id}-{$T.q.question_id}','{$T.a.answer_id}','{$T.q.question_id}');ChecComplate()" />
- <label for='{$T.a.answer_id}'>{$T.a.content}</label>{#include answerImg root=$T.a}</span>
- </div>
- {#/for}
- <div style="clear:both;"></div>
- </div>
-
- {#elseif $T.t.name == "是非题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> <br />{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content}</div>
- {#include questionImg root=$T.q}
- <div class="answercontainer">
- {#foreach ($T.q.answers) as a}
- <div class="answers">
- <span><input type="radio" id="{$T.a.answer_id}" {GetCheckAnswer($T.q.question_id,$T.a.answer_id)} value="{$T.a.answer_id}" name="st-{$T.t.id}-{$T.q.question_id}" onclick='behaviour.Check_rad(this,"{$T.a.answer_id}","{$T.q.question_id}");' />
- <label for='{$T.a.answer_id}'>{$T.a.content}</label>{#include answerImg root=$T.a}</span>
- </div>
- {#/for}
- </div>
-
- {#elseif $T.t.name == "简答题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> <br />{$P.st = $P.st + 1}{#include casual root=$T.t}{$T.q.content}</div>
- {#include questionImg root=$T.q}
- <div class="answercontainer">
- <textarea questionid='{$T.q.question_id}' answertype='{$T.t.name}' style='WIDTH:90%;HEIGHT:100px' name='ST-{$T.t.id}-{$T.q.question_id}'
- onblur='behaviour.Check_area(this,"{$T.q.answers.answer_id}","{$T.q.question_id}");'></textarea>
- </div>
- {#/if}
- {#/for}
- {#/for}
- </div>
- {#/template questionBuilder}
- {#template sign}
- <input type='button' value=' 标识 ' class='btn_sign' author='{$T}' />
- {#/template sign}
- {#template casual}
- .
- {#/template casual}
- {#template checkComplate}
- {#if $T==1}{#/if}
- {#/template checkComplate}
- {#template questionImg}
- {#if $T.hasImg==1}
- <div style="padding-left:80px">
- <img src="{examinee.fileServerUrl + $T.url}" title="{$T.note}" width="150px" onclick="radopen('{examinee.fileServerUrl + $T.url}','showImg')" style="cursor:pointer;" />
- </div>
- {#/if}
- {#/template questionImg}
- {#template answerImg}
- {#if $T.hasImg==1}
- <div style="padding-left:30px">
- <img src="{examinee.fileServerUrl + $T.url}" title="{$T.note}" width="150px" onclick="radopen('{examinee.fileServerUrl + $T.url}','showImg')" style="cursor:pointer;" />
- </div>
- {#/if}
- {#/template answerImg}
|