# 关于自动关闭主题的帮助？

**URL:** https://meta.discourse.org/t/help-with-auto-close-topic/173320
**Category:** Support
**Created:** [2020年十二月15日 01:50 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320 "2020-12-15T01:50:41Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 01:50 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/1 "2020-12-15T01:50:41Z")

</div>

你好！我想请教一下关于设置自动化步骤的最佳方式。

我们正使用 Discourse 平台作为学习管理系统（LMS）。我们的第一批学员将于下周结业，由于届时我将无法到岗，希望能实现自动化处理。

我基本上希望隐藏这些分类，使学员无法访问，但保留其中的主题和评论；或者，自动将所有学员从平台中移除。我们团队希望日后仍能查阅这些分类，因此需要确保所有评论和主题对我们保持可用。

自动关闭（auto-close）功能是否是最佳方案？是否有更成熟的处理方式？当主题被关闭后，学员会看到什么内容？

感谢任何建议。我是一名学校教师，正在努力学习各种新知识！

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [2020年十二月15日 02:02 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/2 "2020-12-15T02:02:15Z")

</div>

> [@catdog](#):
>
> 对参与者隐藏分类，

不，关闭主题并不是正确的方法。

你应该更改分类权限，使其仅对工作人员私有，请参阅[如何使用分类安全设置创建私有分类](https://meta.discourse.org/t/how-to-use-category-security-settings-to-create-private-categories/87678)。

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 02:24 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/3 "2020-12-15T02:24:42Z")

</div>

好的，谢谢。不过，这能自动化吗？这是我的主要目标——我下周不在公司，但需要在周二晚上移除所有参与者。

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 02:46 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/4 "2020-12-15T02:46:57Z")

</div>

补充一点——我认为我想要的其实是分类的置顶时间功能。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2020年十二月15日 06:49 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/5 "2020-12-15T06:49:10Z")

</div>

我认为你需要一个插件，或者通过 API 来实现（配合某种能在适当时机调用 API 的工具）。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2020年十二月15日 19:27 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/6 "2020-12-15T19:27:52Z")

</div>

不确定这是否是你想要的。但有一个插件可以隐藏对主题的回复，仅对主题创建者以及可能的某个群组可见。

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 22:47 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/7 "2020-12-15T22:47:32Z")

</div>

谢谢你的建议。可惜这听起来有点超出我的能力范围！没关系，我想我最终还是在周二登录了……！

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 22:48 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/8 "2020-12-15T22:48:06Z")

</div>

谢谢 @Heliosurge，我会稍微查一下。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2020年十二月15日 22:53 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/9 "2020-12-15T22:53:41Z")

</div>

不客气。我刚才花时间进行了一次关键词搜索。

这是该插件的链接：

> [@Discourse Private Replies](https://meta.discourse.org/t/discourse-private-replies/146712?u=heliosurge):
>
> Github: [GitHub - communiteq/discourse-private-replies](https://github.com/communiteq/discourse-private-replies) This plugin hides topic replies for everyone but the topic starter and the post author. Use cases This can be used for for instance homework assignments where the teacher opens a topic and posts an assignment, and all students make a post with their answers. When everyone has submitted their work, the teacher can open up the answers so the students will be able to discuss them. A second use case can be an auction where something is offered…

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 23:34 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/10 "2020-12-15T23:34:36Z")

</div>

非常感谢——真的很感激你找到了它（我也尝试过，但没能成功！）

不幸的是，它目前还无法完全实现我想要的效果（即自动隐藏除模组外的所有分类），但我看到它在课程的其它地方会有用。谢谢。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2020年十二月15日 23:54 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/11 "2020-12-15T23:54:03Z")

</div>

不客气。如果是为了对普通用户隐藏，而仅对拥有完整权限的版主和管理员可见，那么另一个可行的方案是允许版主在设置中创建分类。

这样一来，任何拥有完整版主或管理员权限的用户都可以修改分类权限。

例如，将“所有人可见/回复/创建”的权限设置，删除所有人并改为仅“工作人员”可见。

或者，也可以通过私信（PM）实现：在私信中添加“工作人员”或特定群组（如“教师组”和“学生组”）。当话题关闭后，教师、版主或 TL4 级别的用户可以从私信中移除“学生组”。

Dan

但这需要一名成员来完成该任务。

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月15日 23:56 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/12 "2020-12-15T23:56:24Z")

</div>

> [@Heliosurge](#):
>
> 删除所有人并将其改为“工作人员”。  
> …  
> 但需要一名成员来完成此任务。

是的——我认为这是我目前找到的唯一可行方案。这也给我上了一课：下次在安排学员批次时，切勿让课程关闭日与我休假的时间重合！

非常感谢你的帮助 @Heliosurge，谢谢。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2020年十二月15日 23:59 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/13 "2020-12-15T23:59:31Z")

</div>

不客气。在 #Marketplace 频道中，或许有人愿意协助开发一个插件来满足您的需求；但如果预算紧张，这可能不是最理想的选择。不过，询问一下具体费用以及是否能纳入预算也无妨。

安装插件需要拥有服务器 root 权限的管理员通过命令行进行操作。

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2020年十二月16日 08:59 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/14 "2020-12-16T08:59:34Z")

</div>

最快的方法是将该批次的所有学生放入一个群组，并允许该群组访问相应类别。到了合适的时候，只需移除该群组的类别访问权限即可。

这仍然是一个手动操作。你可以设置一些自动化方案来实现这一点，但我认为你应该将精力集中在以下两个方面：

- 寻找一位你信任的人来为你执行切换操作；

或者更好的是：

- 确保你可以从任何地方访问你的 Discourse LMS，而不仅仅限于工作场所。

---

<div class="post-metadata">

### Author: ![catdog](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@catdog](https://meta.discourse.org/u/catdog)
#### Post date: [2020年十二月16日 09:30 UTC](https://meta.discourse.org/t/help-with-auto-close-topic/173320/15 "2020-12-16T09:30:12Z")

</div>

感谢 @RGJ——很遗憾整个团队都将休假，所以这次只能由我来负责了。请放心，我会在客厅完成关闭操作！
