123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- ********** 模板入口 *************
- {#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}
- <div id="q_{$T.q.question_id}" class="q_container" {#if $P.st != 0} style="display:none;" {#/if}>
- <div class="singleQuestionContainer">
- <div class="questioncontainer">
- <div class="question-title">{$T.t.name}</div>
- {#if $T.t.name == "单选题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> {$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="{$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}");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> {$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> {$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> {$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 style="clear:both;"></div>
- </div>
-
- {#elseif $T.t.name == "简答题"}
- {#include sign root=$T.q.question_id}
- <font color='red'>({$T.q.score}分)</font> {$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}
- <div class="buttonContainer">
- <div class="leftButtonContainer"><input type="button" value="上一题" class="longbutton" {#if $P.st == 1} style="display:none" {#/if} onclick=" PreBtnEvent(this);" /></div>
- <div class="rightButtonContainer"><input type="button" value="下一题" class="longbutton" {#if $P.st == examInfo.questionCount} style="display:none" {#/if} onclick="NextBtnEvent(this);" /></div>
- <div class="box"></div>
- </div>
- </div>
- </div>
- {#/for}
- {#/for}
- {#/template questionBuilder}
- {#template sign}
- <input type='button' value=' 标识 ' class='btn_sign' author='{$T}' /> <br />
- {#/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}
|