123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- #ifndef PAPERDEF_H
- #define PAPERDEF_H
- #include <string>
- #include <vector>
- #include "json/json.h"
- #include <QString>
- extern int g_ItemOrderIndex;
- QString Arab2Sinogram(int num);
- enum STRUCT_TYPE
- {
- stSingleChoice = 1, //单选
- stMultiChoice, //多选
- stJudge, //判断
- stFillBlank, //填空
- stQuestionAndAnswer, //问答
- stSubjectSet, //套题
- };
- struct SUBQUESTION_INFO
- {
- std::string sId;
- int nOrderIndex;
- int nDetailNumber;
- int nQuestionNumber;
- int nNumber;
- double fScore;
- int nStructType;
- bool bObjective;
- Json::Value jBody;
- std::string sOptionOrders;
- Json::Value jOptions;
- Json::Value jStandarddAnswer;
- QString sAnswer;
- int nAnswerDuration;
- SUBQUESTION_INFO()
- {
- sId = "";
- nOrderIndex = 0;
- nDetailNumber = 0;
- nQuestionNumber = 0;
- nNumber = 0;
- fScore = 0;
- nStructType = 0;
- bObjective = false;
- jBody = Json::Value::null;
- sOptionOrders = "";
- jOptions = Json::Value::null;
- jStandarddAnswer = Json::Value::null;
- sAnswer = "";
- nAnswerDuration = 0;
- }
- };
- struct QUESTION_INFO
- {
- std::string sId;
- int nOrderIndex;
- int nDetailNumber;
- int nNumber;
- double fScore;
- int nStructType;
- bool bObjective;
- Json::Value jBody;
- std::string sOptionOrders;
- Json::Value jOptions;
- Json::Value jStandarddAnswer;
- QString sAnswer;
- int nAnswerDuration;
- std::vector<SUBQUESTION_INFO> vSubQuestions;
- QUESTION_INFO()
- {
- sId = "";
- nOrderIndex = 0;
- nDetailNumber = 0;
- nNumber = 0;
- fScore = 0;
- nStructType = 0;
- bObjective = false;
- jBody = Json::Value::null;
- sOptionOrders = "";
- jOptions = Json::Value::null;
- jStandarddAnswer = Json::Value::null;
- sAnswer = "";
- nAnswerDuration = 0;
- vSubQuestions.clear();
- }
- };
- enum QUESTION_SHOW_LEVEL
- {
- qslShowQuestion = 2,
- qslShowSubQuestion,
- };
- struct QUESTION_SHOW_INFO
- {
- int nLevel; //2 3
- int nDettailNumber;
- int nStartIndex;
- std::string sDetailName;
- QUESTION_INFO vQi;
- SUBQUESTION_INFO vSQI;
- // boost::variant<QUESTION_INFO, SUBQUESTION_INFO> vItem;
- QUESTION_SHOW_INFO()
- {
- nDettailNumber = 0;
- nLevel = 0;
- sDetailName = "";
- }
- };
- struct DEATIL_INFO
- {
- int nNumber;
- std::string sName;
- double fTotalScore;
- int nQueStionCount;
- std::vector<QUESTION_INFO> vQuestions;
- DEATIL_INFO()
- {
- nNumber = 0;
- sName = "";
- fTotalScore = 0;
- nQueStionCount = 0;
- vQuestions.clear();
- }
- };
- struct PAPER_INFO
- {
- std::string sId;
- std::string sName;
- std::string sCourseCode;
- std::string sCourseName;
- double fTotalScore;
- int nHasVideo;
- int nDetailCount;
- std::vector<DEATIL_INFO> vDetails;
- PAPER_INFO()
- {
- sId = "";
- sName = "";
- sCourseCode = "";
- sCourseName = "";
- fTotalScore = 0;
- nHasVideo = 0;
- nDetailCount = 0;
- vDetails.clear();
- }
- };
- #endif // PAPERDEF_H
|