Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
题库开始记录选项id
  • Loading branch information
pooneyy committed Sep 17, 2023
1 parent 5d93e74 commit 2f47a9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@

运行`exportData.py`,按照提示操作。

### 更新日志
### 代码更新日志

- 2023.09.17
- 更新`importData.py`获取题库的方式,登录相关的代码来自[Coaixy/weiban-tool](https://github.com/Coaixy/weiban-tool)
- 题库开始记录选项id

2 changes: 2 additions & 0 deletions Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ def getPaperDetails(self):
userQuestionsBank[i['id']] = {}
userQuestionsBank[i['id']]['question'] = i['title']
userQuestionsBank[i['id']]['answer'] = []
userQuestionsBank[i['id']]['answerIds'] = []
userQuestionsBank[i['id']]['type'] = i['type']
userQuestionsBank[i['id']]['typeLabel'] = i['typeLabel']
for j in i['optionList']:
if j['isCorrect'] == 1:
userQuestionsBank[i['id']]['answer'].append(j['content'])
userQuestionsBank[i['id']]['answerIds'].append(j['id'])
return userQuestionsBank

def fill_key(key):
Expand Down
2 changes: 2 additions & 0 deletions importOneReviewPaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ def getPaperDetails(data):
userQuestionsBank[i['id']] = {}
userQuestionsBank[i['id']]['question'] = i['title']
userQuestionsBank[i['id']]['answer'] = []
userQuestionsBank[i['id']]['answerIds'] = []
userQuestionsBank[i['id']]['type'] = i['type']
userQuestionsBank[i['id']]['typeLabel'] = i['typeLabel']
for j in i['optionList']:
if j['isCorrect'] == 1:
userQuestionsBank[i['id']]['answer'].append(j['content'])
userQuestionsBank[i['id']]['answerIds'].append(j['id'])
return userQuestionsBank

def main():
Expand Down

0 comments on commit 2f47a9e

Please sign in to comment.