Skip to content

Commit

Permalink
fix(script): 修复中国大学MOOC课堂测验答题完成后没有等待暂停时间步骤的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Dec 5, 2023
1 parent 2d5f371 commit 3bc76b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/scripts/src/projects/icourse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ function waitForQuestion() {

function workAndExam(
type: 'chapter-test' | 'work-or-exam',
{ answererWrappers, period, thread, redundanceWordsText, upload }: CommonWorkOptions
{ answererWrappers, period, thread, redundanceWordsText, upload, stopSecondWhenFinish }: CommonWorkOptions
) {
CommonProject.scripts.workResults.methods.init({
questionPositionSyncHandlerType: 'icourse'
Expand Down Expand Up @@ -467,6 +467,10 @@ function workAndExam(
.doWork()
.then(async (results) => {
if (type === 'chapter-test') {
$message('info', { content: `答题完成,将等待 ${stopSecondWhenFinish} 秒后进行保存或提交。` });
$console.info(`答题完成,将等待 ${stopSecondWhenFinish} 秒后进行保存或提交。`);
await $.sleep(stopSecondWhenFinish * 1000);

// 处理提交
await worker.uploadHandler({
type: upload,
Expand Down

0 comments on commit 3bc76b1

Please sign in to comment.