十万火急!!考试系统 评分问题?叩谢了 打印 E-mail
  2008-04-25
我在做在线考试系统 有单选 多选 填空 判断 简答五种题型 不同的科目可选出不同的题型 不同的题型可以设定不同的出题道数(也就是出几道题) 然后生成一个整套完整的席卷 我用下面的方法读出了题 可是要怎么样才能 提交后得到 所有的题的答案(考生所在的答案也就是表单提交上来的所有的值) 我用了好多方法都没成功 评分这好难啊 就差这了 大家帮帮忙吧 叩谢了 /*试题列表信息*/ //总数 $result=sql_select("select * from big_test where test_subject_id=$_GET[sid] order by bigtitle asc"); while ($brows=mysql_fetch_array($result)){ if($brows[‘bigtitle‘]>=1 and $brows[‘bigtitle‘]<=4){ for($i=1;$i<=4;$i++){ if($brows[‘bigtitle‘]==$i){ //判断题型 tb($brows[‘bigtitle‘]); //题型名  echo $b_score.$brows[‘sscore‘].$l_score.‘
‘; $num=$brows[‘test_num‘]; //随机数判断 $smtitle=sql_select("select * from small_test WHERE bigtitle_id=$i and subject_id=$_GET[sid] order by rand() LIMIT $num"); while($sresult=mysql_fetch_array($smtitle)){ //小题题干 echo $sresult[‘smalltitle‘].‘
‘; echo ""; $smresult=sql_select("select * from small_result where smalltitle_id=$sresult[id]"); while($xx=mysql_fetch_array($smresult)){ //小题对应选项 if($brows[‘bigtitle‘]==1){ echo ‘‘.$xx[‘xx‘].‘ ‘.$xx[‘smalltitle_c‘].‘
‘; } if($brows[‘bigtitle‘]==2){ echo ‘‘.$xx[‘xx‘].‘ ‘.$xx[‘smalltitle_c‘].‘
‘; } if($brows[‘bigtitle‘]==3){ echo ‘‘.$xx[‘smalltitle_c‘].‘
‘; } if($brows[‘bigtitle‘]==4){ echo $xx[‘smalltitle_c‘].‘
‘; } } echo ‘
‘; } } } } if($brows[‘bigtitle‘]==5){ echo ‘简答题‘.$b_score.$brows[‘sscore‘].$l_score.‘
‘; $smtitleb=sql_select("select * from brief_answer WHERE subject_id=$_GET[sid] order by rand() LIMIT $brows[test_num]"); while($sresultb=mysql_fetch_array($smtitleb)){ echo $sresultb[‘brief_topic‘].‘
‘; echo ""; echo "
"; } } }
发表评论
网友评论

发表评论
用户访客
标题
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
评论



下一篇 >