{"id":21664101,"url":"https://github.com/byjrk/wpfcommenthelper","last_synced_at":"2026-05-16T21:38:55.088Z","repository":{"id":92320610,"uuid":"158692722","full_name":"BYJRK/WpfCommentHelper","owner":"BYJRK","description":"Generate comments when scoring the homework with an XML file containing the rules and prepared comments","archived":false,"fork":false,"pushed_at":"2020-06-15T08:42:37.000Z","size":40572,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T07:41:43.883Z","etag":null,"topics":["csharp","wpf","xml"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BYJRK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-22T11:58:55.000Z","updated_at":"2023-01-11T11:44:00.000Z","dependencies_parsed_at":"2023-05-16T20:45:11.784Z","dependency_job_id":null,"html_url":"https://github.com/BYJRK/WpfCommentHelper","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BYJRK%2FWpfCommentHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BYJRK%2FWpfCommentHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BYJRK%2FWpfCommentHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BYJRK%2FWpfCommentHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BYJRK","download_url":"https://codeload.github.com/BYJRK/WpfCommentHelper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244560392,"owners_count":20472220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","wpf","xml"],"created_at":"2024-11-25T10:32:40.972Z","updated_at":"2026-05-16T21:38:50.062Z","avatar_url":"https://github.com/BYJRK.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 作业批改助手\n\n这款 WPF 小软件或许会对大学助教群体有所帮助吧……\n\n![](example.png)\n\n如果想要使用该软件，需要手动设置作业批语相关的 `.xml` 文件。上图所使用的模板如下：\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003ctask title=\"Lab 1\" desc=\"这是整个项目的标题，通常只用来显示总分。\"\u003e\n    \u003ctask title=\"Task 1\" desc=\"这是第一个题目。\\n题目不一定总是有类似这样的描述信息。\\n描述信息支持诸如\\\\n的换行符。\"\u003e\n        \u003csubtask title=\"(a)\" desc=\"这是第一小题。与题目不同的是，在批语中，小题前不会有空行。\\n小题通常有分数，表示这道题目的总分。\\n小题中通常包含多个扣分项。\" score=\"30\"\u003e\n            \u003ccheck title=\"第一个扣分项\" score=\"-10\"/\u003e\n            \u003ccheck title=\"第二个扣分项\" score=\"-10\"/\u003e\n            \u003ccheck title=\"第三个扣分项\" score=\"-10\"/\u003e\n            \u003ccheck title=\"扣分项可以没有分数\"/\u003e\n            \u003ccheck title=\"也可以不显示内容，只需要结尾加上星号*\"/\u003e\n        \u003c/subtask\u003e\n        \u003csubtask title=\"(b)\" desc=\"这是第二小题。\" score=\"40\"\u003e\n            \u003ccheck title=\"第一问回答错误\" score=\"-10\"/\u003e\n            \u003ccheck title=\"第二问回答错误\" score=\"-10\"/\u003e\n            \u003cgroup title=\"第三问回答有误\" desc=\"这是一个选项分组，批语没有段前换行，而且后跟分号。\\n其下通常有多个选项。任意一个勾选，都会将该分组的标题写入批语。\\n因此分组中通常为加星号的扣分项。\"\u003e\n                \u003ccheck title=\"扣分的第一个原因*\" score=\"-10\"/\u003e\n                \u003ccheck title=\"扣分的第二个原因*\" score=\"-5\"/\u003e\n                \u003ccheck title=\"扣分的第三个原因*\" score=\"-5\"/\u003e\n            \u003c/group\u003e\n        \u003c/subtask\u003e\n        \u003csubtask title=\"(c)\" desc=\"下面的项目的分数可以自行编辑，也可以用滚轮快速调节。\"\u003e\n            \u003cmark title=\"整体印象分(0~10)\" score=\"8\" range=\"0,10\"/\u003e\n        \u003c/subtask\u003e\n    \u003c/task\u003e\n\u003c/task\u003e\n```\n\n# XML 元件介绍\n\n## 容器\n\n容器包含三种，分别为`Task`，`Subtask`和`Group`。\n\n这三种容器其下都可以包含任意多的任何元件。\n\n### Task\n\n```xml\n\u003ctask title=\"Task Title\" score=\"0\" desc=\"Description\" /\u003e\n```\n\n`Task`通常指**大题**。在输出批语时，`Task`的标题前会有额外的空行，用来和其他`Task`隔开。\n\n因为`Task`的分数一般由其下的小题分数加和得到，所以通常这里分数设置为`0`，或者不用设置，默认为`0`。\n\n### Subtask\n\n```xml\n\u003csubtask title=\"Subtask Title\" score=\"30\" desc=\"Description\" /\u003e\n```\n\n`Subtask`通常指**小题**。在输出批语时，`Subtask`的标题前不会有额外的空行。从格式上看，它属于某个`Task`。\n\n本软件最推荐的方法是扣分制，因此推荐`Subtask`包含分数，其下的元件的分数为负数（其下元件的和的绝对值最好与`Subtask`的分数相同，但并不强制要求）。\n\n### Group\n\n```xml\n\u003cgroup title=\"Group Title\" score=\"0\" desc=\"Description\" /\u003e\n```\n\n`Group`一般用于评分项的分组。在输出批语时，`Group`的标题前不会有额外的空行，其后也会像普通打分项那样，用分号与下文分隔。\n\n`Group`一般这样使用：\n\n```xml\n\u003cgroup title=\"回答不够充分\" score=\"0\" desc=\"Description\"\u003e\n\t\u003ccheck title=\"没有考虑第一种情况\" score=\"-3\"/\u003e\n\t\u003ccheck title=\"没有考虑第二种情况\" score=\"-3\"/\u003e\n\t\u003ccheck title=\"没有考虑第三种情况\" score=\"-4\"/\u003e\n\u003c/group\u003e\n```\n\n这样在生成批语时，不会生成过于详尽或复杂针对单个小题的评语。\n\n## 打分项\n\n打分项分三种，分别为`CheckBox`，`RadioButton`和`MarkBox`。打分项没有`desc`，但是有`ischecked`属性。\n\n### CheckBox\n\n```xml\n\u003ccheck title=\"回答错误\" score=\"-10\" ischecked=\"False\"/\u003e\n```\n\n`CheckBox`为一个复选项。只有在勾选时才会将对应的标题显示在批语中。\n\n`ischecked`默认为`False`。如果为`True`，则默认被勾选。\n\n### RadioButton\n\n`RadioButton`为单选项（很少会使用这个元件），只有在被选中时才会显示在批语中。\n\n因为单选项需要出现在同一个容器中，才能出发单选效果，因此如果要使用`RadioButton`，最好将其单独放在一个`Subtask`或`Group`中。例如：\n\n```xml\n\u003csubtask title=\"第一小题\"\u003e\n\t\u003cradio title=\"完全正确*\" score=\"20\" ischecked=\"true\"/\u003e\n\t\u003cradio title=\"基本正确\" score=\"15\"/\u003e\n\t\u003cradio title=\"部分错误\" score=\"10\"/\u003e\n\t\u003cradio title=\"明显错误\" score=\"5\"/\u003e\n\t\u003cradio title=\"完全错误\" score=\"0\"/\u003e\n\u003c/subtask\u003e\n```\n\n只有需要这种递进的批语时才建议使用`RadioButton`，否则一般请使用下面要讲到的`MarkBox`。\n\n### MarkBox\n\n```xml\n\u003cmark title=\"卷面分数\" range=\"0,5\" score=\"5\" ischecked=\"false\"/\u003e\n```\n\n`MarkBox`为一个打分项，由开头的复选框决定其对应批语是否在输出中呈现。\n\n`score`表示默认分数。如果不写，则默认为`range`的最大值。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyjrk%2Fwpfcommenthelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyjrk%2Fwpfcommenthelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyjrk%2Fwpfcommenthelper/lists"}