Skip to content

feat(ui-plugins): add Grade Book (grade-book) - #304

Open
ppppp2005-p wants to merge 11 commits into
zai-org:mainfrom
ppppp2005-p:feat/grade-book
Open

ppppp2005-p wants to merge 11 commits into
zai-org:mainfrom
ppppp2005-p:feat/grade-book

Conversation

@ppppp2005-p

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
  • Standard plugin / 普通插件(非 UI)
  • Not applicable / 不适用

Affected plugin name(s) / 涉及的插件名称:grade-book (UI Plugin, new)

What / 改动内容

New community UI plugin Grade Book / 成绩统计分析: Turn a score sheet into totals, averages, rankings and report cards. Drop in a spreadsheet with one row per student and one column per subject: full marks are guessed per subject (100, 150…) or set by you, subjects can be weighted, and every student gets a total, weighted average, band (优秀 / 良好 / 及格 …) and overall and class rank. Per-subject statistics for each class — mean, highest, lowest, pass and excellent rates — and score distribution charts come with it. Fix scores or write a comment for each student, then export an Excel grade book, one A5 report card per student and a summary PDF. Runs locally; no school system login or API keys.

  • Tools: grades_open, grades_edit, grades_status, grades_export (all share one side panel: file picker, settings, issue list, editable table, preview, export).
  • Totals, weighted averages and ranks: overall and per class, ties share a rank (1, 2, 2, 4); rank by total or weighted average.
  • Full marks and weights per subject: guessed from the scores or set as “语文=150; 物理=100” and “数学=1.5”.
  • Bands by % of full marks: “优秀 85; 良好 75; 及格 60; 不及格 0”, applied to each subject and the average.
  • Class statistics: mean, max, min, median, SD, pass and excellent rates, absences — per subject, per class.
  • Distribution charts per subject in the panel and the summary PDF.
  • Report cards: one A5 page per student with scores, class averages, band, ranks, a score-vs-class chart, your comment and a parent signature line.
  • Checks: scores above full marks, text that isn't a score, duplicate students; 缺考 / absent is left out of averages.
  • Scope (v0.1):
    • One row per student; one exam or term per sheet.
    • Bands and ranks only — no GPA conversion tables for specific schools.
  • Local only; writes only grade-book/ in the workspace. Workspace paths are checked so symlinks cannot lead reads or writes outside the workspace (regression test included).
  • Tests: vitest unit + MCP tool tests on real sample files, and a browser e2e with the official AppBridge host (panel → open → edit → export).

A ZCode Desktop demo recording is attached in the comments. / ZCode 桌面版演示录屏见评论。

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/<name>/
  • Usage category is set (productivity)
  • Plugin type and affected names are declared above
  • version 0.1.0 in both plugin.json and marketplace.json
  • README.md (EN) and README_CN.md (中文) both provided and equivalent
  • description_i18n has both en and zh-CN
  • No secrets, machine-specific paths, or private dependencies
  • Model/API/network dependencies documented
  • python3 scripts/validate.py and python3 scripts/build_dist.py pass locally
  • Exercised in ZCode Desktop (ZCode 4.0.0, macOS arm64: installed from a local marketplace, Opened scores.xlsx (24 students, 2 classes, 5 subjects; a missed exam flagged for ranking), exported grades.xlsx, report-cards.pdf and summary.pdf; demo video in the comments)

@ppppp2005-p

Copy link
Copy Markdown
Author

ZCode desktop demo (ZCode 4.0.0, macOS arm64)

grade-book-demo.mp4

Flow shown:

  1. Installed grade-book from a local marketplace built from this PR's branch.
  2. Asked ZCode to open p100/grade-book/scores.xlsx with school 青禾实验中学, fix anything that blocks the export with grades_edit, then export.
  3. grades_open read 24 students in 2 classes and 5 subjects (语文 / 数学 / 英语 out of 150, 物理 / 化学 out of 100): average 75%, top student 郑雨萱. Nothing blocked the export, so grades_edit was not needed. The model passed on the one note: 2026008 黄俊杰 (高一(2)班) missed the physics exam, so ranking by total puts him last (24th); ranking by average would put him about 22nd, and the tool suggests that option.
  4. The panel (成绩统计分析) shows the settings (exam name 期中考试成绩单, school 青禾实验中学, bands as % of full marks, pass line 60%, rank by total) and the summary chips (24 students, 5 subjects, 2 classes, 75 average, 87.5 pass).
  5. grades_export wrote grade-book/scores/grades.xlsx (the grade book), report-cards.pdf (one page per student) and summary.pdf (class statistics). The second image is the first report card: 王一鸣 of 高一(1)班 with each subject's score, full marks, class average and band, total 530, average 81.6%, class rank 7 / 12, overall rank 10 / 24, and a score vs class average bar chart.

演示流程:本地 marketplace 安装 → grades_open(24 名学生、2 个班、5 科;缺考学生按总分排名偏低的提示)→ grades_export 导出成绩册 xlsx、每人一页成绩单和统计报告;第二张图是王一鸣的成绩单(等级、班均、班级 / 年级排名、对比条形图)。

@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants