@celljs/ta-edu 4.34.0 → 4.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -8,7 +8,7 @@ The education package of Ta (built in and off by default, `pi.offByDefault`: tur
8
8
  - **Quiz cards** (```ta-quiz`): choice, true or false, fill in the blank, answered in the card and checked at once; wrong answers go to the mistakes, asked again in another form after 1, 3, 7, 14 and 30 days, the student's row saying how many are due today. A teacher's set (`reveal: true`) shows its answers.
9
9
  - **Learning cards** (```ta-learning`): mastery by point, weak points, what to do next as buttons.
10
10
  - **Skills**: edu-tutor, edu-quiz, edu-parent, edu-grading, edu-lesson, edu-homeroom.
11
- - **Server side** (`pi.host`, with no page open): the scheduled tasks of the identities picked (a student's review at 20:00 daily, a parent's briefing on Sundays at 19:00, a teacher's week on Fridays at 16:00, a class teacher's parents' messages at 21:00 daily; one removed is not made again), each run reading this computer's data with `ta call @celljs/ta-edu brief <identity>`; a student's week sent to the parent on Sundays at 18:00; a parent's yes read from the chat of the two.
11
+ - **Server side** (`pi.host`, with no page open): the scheduled tasks of the identities picked (a student's review at 20:00 daily, a parent's briefing on Sundays at 19:00, a teacher's week on Fridays at 16:00, a class teacher's parents' messages at 21:00 daily; one removed is not made again; they belong to this package, held while it is off and running again once it is on), each run reading this computer's data with `ta call @celljs/ta-edu brief <identity>`; a student's week sent to the parent on Sundays at 18:00; a parent's yes read from the chat of the two.
12
12
  - **Safety**: a primary pupil uses the study buddy once a parent said yes in their own Ta (the pupil asks, the parent says yes and may take it back); no homework written for students; a crisis is referred, not handled; what is of students and families stays on this computer.
13
13
 
14
14
  Kindergarten and university (with graduate school) are other packages.
package/README.md CHANGED
@@ -8,7 +8,7 @@ Ta 的教育行业包(随 Ta 内置、默认关闭:`pi.offByDefault`;首
8
8
  - **题目卡**(```ta-quiz`):选择、判断、填空,在卡片里作答,马上判对错并显示讲解;答错的进错题本,隔 1、3、7、14、30 天出变式题再考(间隔复习),学生那一行显示今天该复习几道(带黄点)。全部做完有"讲讲我错的"。老师出的题 `reveal: true`,直接显示答案。
9
9
  - **学情卡**(```ta-learning`):每个知识点的掌握程度、薄弱点、接下来可以做的事(按钮)。
10
10
  - **技能**:edu-tutor(引导式讲题)、edu-quiz(出题与两种卡片)、edu-parent、edu-grading(批改与试卷分析)、edu-lesson(教学设计)、edu-homeroom(家长沟通、评语、班会、通知)。
11
- - **服务端**(`pi.host`,页面没开也在做):按选的身份在定时任务里建好学生每天 20:00 错题复习、家长周日 19:00 学习简报、老师周五 16:00 学情小结、班主任每天 21:00 家长消息(删掉的不再重建),每次运行用 `ta call @celljs/ta-edu brief <身份>` 读本机数据;学生的周报每周日 18:00 发给家长;读家长在私聊里的同意。
11
+ - **服务端**(`pi.host`,页面没开也在做):按选的身份在定时任务里建好学生每天 20:00 错题复习、家长周日 19:00 学习简报、老师周五 16:00 学情小结、班主任每天 21:00 家长消息(删掉的不再重建;任务属于本包,关掉教育时它们暂停,打开后恢复),每次运行用 `ta call @celljs/ta-edu brief <身份>` 读本机数据;学生的周报每周日 18:00 发给家长;读家长在私聊里的同意。
12
12
  - **安全**:小学生使用学习伙伴要家长在他自己的 Ta 里同意(学生点"请家长同意",家长点"同意",可收回;《中小学生成式人工智能使用指南(2025 年版)》);学生不代写作业;心理危机只转介不处理;学生、成绩、家庭的信息只在本机。
13
13
 
14
14
  ## 数据
package/host/index.mjs CHANGED
@@ -1934,10 +1934,14 @@ class EduHost {
1934
1934
  const picked = this.settings.identities.includes(identity);
1935
1935
  if (picked && !record) {
1936
1936
  const task = EduTasks.of(identity, this.words);
1937
- const added = await this.host.callPackageHost(CRON, "add", [{ ...task, notify: "always" }]);
1937
+ const added = await this.host.callPackageHost(CRON, "add", [{ ...task, notify: "always", owner: NAME }]);
1938
1938
  next[identity] = { id: added.id };
1939
1939
  } else if (record && "id" in record && !tasks.some((task) => task.id === record.id)) {
1940
1940
  next[identity] = { removed: true };
1941
+ } else if (picked && record && "id" in record && tasks.some((task) => task.id === record.id && task.owner !== NAME)) {
1942
+ await this.host.callPackageHost(CRON, "update", [record.id, { owner: NAME }]).catch(() => {
1943
+ return;
1944
+ });
1941
1945
  }
1942
1946
  if (!picked && record) {
1943
1947
  if ("id" in record && tasks.some((task) => task.id === record.id)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-edu",
3
- "version": "4.34.0",
3
+ "version": "4.35.0",
4
4
  "description": "A pi package for Ta: school education, an assistant for students, parents, teachers and class teachers, question cards with spaced review of mistakes",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -28,8 +28,8 @@
28
28
  "watch": "tsc -b -w --preserveWatchOutput"
29
29
  },
30
30
  "devDependencies": {
31
- "@celljs/ta-protocol": "4.34.0",
32
- "@celljs/ta-web": "4.34.0",
31
+ "@celljs/ta-protocol": "4.35.0",
32
+ "@celljs/ta-web": "4.35.0",
33
33
  "@types/react": "^19.3.0"
34
34
  },
35
35
  "publishConfig": {