喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 帮助

RSS 订阅当前论坛  

喜悦证交所已经关闭

上一主题 下一主题
     
标题: [问题] 十万火急!!考试系统 评分问题?叩谢了  
 
henfeng
新手上路
Rank: 1



UID 119837
精华 0
积分 21
帖子 15
金钱 21 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2008-4-23
状态 离线
[广告]: q m
十万火急!!考试系统 评分问题?叩谢了

我在做在线考试系统  有单选 多选 填空 判断 简答五种题型  不同的科目可选出不同的题型 不同的题型可以设定不同的出题道数(也就是出几道题)  然后生成一个整套完整的席卷
我用下面的方法读出了题  可是要怎么样才能 提交后得到 所有的题的答案(考生所在的答案也就是表单提交上来的所有的值)   
我用了好多方法都没成功
评分这好难啊   就差这了   大家帮帮忙吧    叩谢了
/*试题列表信息*/
    //总数
    $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.'<br />';
                                $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'].'<br>';
                                 echo "<input name=\"tid[]\" id=\"tid[]\" value=\"$sresult[id]\">";
                                 $smresult=sql_select("select * from small_result where smalltitle_id=$sresult[id]");
                                 while($xx=mysql_fetch_array($smresult)){ //小题对应选项
                                         if($brows['bigtitle']==1){
                                          echo '<input type="radio" name="t_'.$sresult['id'].'[]" value="'.$xx['xx'].'" id="t_'.$sresult['id'].'[]" checked>'.$xx['xx'].' '.$xx['smalltitle_c'].'<br>';                                                
                                         }
                                         if($brows['bigtitle']==2){       
                                          echo '<input type="checkbox" name="t_'.$sresult['id'].'[]" value="'.$xx['xx'].'" id="t_'.$sresult['id'].'[]" checked>'.$xx['xx'].' '.$xx['smalltitle_c'].'<br>';                                                
                                         }
                                         if($brows['bigtitle']==3){       
                                          echo '<input type="text" name="t_'.$sresult['id'].'[]" value="1" id="t_'.$sresult['id'].'[]">'.$xx['smalltitle_c'].'<br>';                                                
                                         }                                                                                   
                                         if($brows['bigtitle']==4){
                                          echo $xx['smalltitle_c'].'<input type="radio" name="t_'.$sresult['id'].'[]" value="0" id="t_'.$sresult['id'].'[]">是<input type="radio" name="t_[]" value="1" id="t_[]">否<br>';                                                
                                         }                                                                                         
                                 } echo '<br>';
                         }   
                        }
                }
        }
        if($brows['bigtitle']==5){
                echo '<a name="jd"></a><font color="blue">简答题</font>'.$b_score.$brows['sscore'].$l_score.'<br />';
                $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'].'<br>';       
                    echo "<input name=\"tid[]\" id=\"tid[]\" value=\"$sresultb[id]\">";
                    echo "<textarea name=\"t_.$sresult[id].[]\" id=\"t_.$sresult[id].[]\"></textarea><br>";
            }
                                                
        }
       
}
2008-4-25 04:43 PM#1
查看资料  发短消息  顶部
 
风在芯中
金牌会员
Rank: 6Rank: 6
kuliu.com



UID 25808
精华 0
积分 2549
帖子 717
金钱 2549 喜悦币
威望 0
人脉 0
阅读权限 70
注册 2004-1-19
来自 福建 福州
状态 离线
[推荐阅读] 广州公司急招Java开发工程师,待遇从优
拿张表来记录学生提交的答案啊



酷溜网
2008-4-25 04:57 PM#2
查看资料  访问主页  Blog  发短消息  顶部
 
henfeng
新手上路
Rank: 1



UID 119837
精华 0
积分 21
帖子 15
金钱 21 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2008-4-23
状态 离线
[推荐阅读] 代码之家上线 请大家帮忙测试测试
问题是怎样得到这些答案啊
2008-4-25 06:36 PM#3
查看资料  发短消息  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.031805 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP