endian11
2021-01-22 632baef8b4ca7854f88072dd6a446f5753995cdf
发送所有灯光题目
1个文件已修改
34 ■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/util/DataInit.kt 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/util/DataInit.kt
@@ -85,22 +85,22 @@
    Log.i("AYJiaKao",list.size.toString())
    tempQs.add(QuestionBean(100, "下面将进行模拟夜间行驶场景灯光使用的考试,请按语音指令在5秒内做出相应的灯光操作"))//提示下面将进行灯光考试
    if (list.size>5){
        var questbean = QuestionBean(list[0].id,list[0].question)
        questbean.parseSolutionAndProcess(list[0].answer)
        questbean.wrong_code = listQuests[list[0].id].wrong_code
        tempQs.add(questbean)
        val a = Utils.getRandomInts(4, list.size)
        for (i in a.indices) {
            var te = list[a[i]]
            Log.i("AYJiaKao",te.toString())
            var questbean = QuestionBean(te.id,te.question)
            questbean.parseSolutionAndProcess(te.answer)
            questbean.wrong_code = listQuests[te.id].wrong_code
            tempQs.add(questbean)
        }
    }else{
//    if (list.size>5){
//        var questbean = QuestionBean(list[0].id,list[0].question)
//        questbean.parseSolutionAndProcess(list[0].answer)
//        questbean.wrong_code = listQuests[list[0].id].wrong_code
//        tempQs.add(questbean)
//        val a = Utils.getRandomInts(4, list.size)
//        for (i in a.indices) {
//            var te = list[a[i]]
//            Log.i("AYJiaKao",te.toString())
//            var questbean = QuestionBean(te.id,te.question)
//            questbean.parseSolutionAndProcess(te.answer)
//            questbean.wrong_code = listQuests[te.id].wrong_code
//            tempQs.add(questbean)
//
//        }
//    }else{
        for (i in list.indices){
        var questbean = QuestionBean(list[i].id,list[i].question)
@@ -108,7 +108,7 @@
            questbean.wrong_code = listQuests[i].wrong_code
        tempQs.add(questbean)
    }
    }
//    }
    tempQs.add(QuestionBean(101, "模拟夜间考试完成请关闭所有灯光,请起步继续完成考试"))//提示灯光考试结束
    simulateNightBean.setQuestion(tempQs)