|
@@ -12,6 +12,8 @@ import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+
|
|
|
@Component
|
|
@Component
|
|
|
public class HelperSchedule {
|
|
public class HelperSchedule {
|
|
|
|
|
|
|
@@ -37,6 +39,17 @@ public class HelperSchedule {
|
|
|
);
|
|
);
|
|
|
for(int i=0;i<temp.size();i++){
|
|
for(int i=0;i<temp.size();i++){
|
|
|
JSONObject quiz_record = temp.getJSONObject(i);
|
|
JSONObject quiz_record = temp.getJSONObject(i);
|
|
|
|
|
+ for (Map.Entry entry : quiz_record.getJSONObject("answers").entrySet()) {
|
|
|
|
|
+ String questionId = entry.getKey().toString();
|
|
|
|
|
+ if(((JSONObject)JSONObject.toJSON(entry.getValue())).getJSONObject("answer").equals("true"))
|
|
|
|
|
+ System.out.println("true");
|
|
|
|
|
+ else
|
|
|
|
|
+ System.out.println("false");
|
|
|
|
|
+ System.out.println(entry.getKey());
|
|
|
|
|
+ System.out.println(entry.getValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ generalRecordDao.setUserId(Integer.parseInt(quiz_record.getString("studentId")));
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
System.out.println(e);
|
|
System.out.println(e);
|