QuestionChoice 是选择题。
下面一个Action 是选择个一个科目的其中的选择题:
request.put("List1", this.questionService.FindAllQuestion("from QuestionChioce where examtype='" + type + "'"));
QuestionChoice里面有[b]正确答案[/b] 每个[b]题目的分数[/b]。 保存到了LIST1 中 接下来时JSP:
现在考试科目为:${type}
<form action="AddScore.action" method="post">
<font>一:选择题</font>
<br>
<s:iterator value="#request.List1" status="status" id="ch">
${status.index+1}问题:<s:property value="#ch.title" />
<br>
<input type="hidden" name="id1"
value="<s:property value="#ch.id"/>"/>
<br/>
<input type="checkbox" name="student_key"
value="<s:property value="#ch.answer1"/>">
<s:property value="#ch.answer1"/>
<br>
<input type="checkbox" name="student_key"
value="<s:property value="#ch.answer2"/>">
<s:property value="#ch.answer2"/>
<br>
<input type="checkbox" name="student_key"
value="<s:property value="#ch.answer3"/>">
<s:property value="#ch.answer3"/>
<br>
<input type="checkbox" name="student_key"
value="<s:property value="#ch.answer4"/>">
<s:property value="#ch.answer4"/>
<br>
</s:iterator>
<br>
接下来写AddScore.action 怎么写 我怎么比较答案。 算出分数 并显示 谁能帮助我下 小弟谢谢了@!!!!!