我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

创建组分配

您可以为参加您课程的学生团队创建协作作业。

本文内容

关于组分配

A group assignment is collaborative coursework for groups of students on GitHub 课堂. 学生可以像专业开发人员团队一样,在共享仓库中共同完成小组作业。

当学生接受小组作业时,该学生可以创建新团队或加入现有团队。 GitHub 课堂 将任务团队保存为集合。 您可以在创建作业时为特定作业指定一组团队,并且在后面的作业中可以重复使用该组团队。

For each group assignment, GitHub 课堂 automatically creates a single shared repository for the team to access. The repository can be empty, or you can create the repository from a template repository with starter code, documentation, tests, and other resources. The repository belongs to your organization account on GitHub, and GitHub 课堂 grants access to teams that students create or join when accepting the assignment.

Each assignment has a title and an optional deadline. You can choose the visibility of repositories that GitHub 课堂 creates and choose access permissions. You can also automatically grade assignments and create a dedicated space to discuss the assignment with the student.

您可以决定一个任务可以拥有多少个团队,以及每个团队可以拥有多少成员。 学生为作业创建的每个团队都是 GitHub 上组织内的团队。 团队的可见性是秘密。 您在 GitHub 上创建的团队不会出现在 GitHub 课堂 中。 更多信息请参阅“关于团队”。

有关创建小组作业的视频演示,请参阅“设置 GitHub 课堂 的基本知识”。

基本要求

You must create a classroom before you can create an assignment. 更多信息请参阅“管理教室”。

创建作业

To create an assignment, sign into GitHub Classroom and navigate to a classroom. In the Assignments tab, click New assignment.

The 'New assignment' button

设置作业的基本信息

指定作业的名称,决定是否分配截止时间,确定团队,并选择作业仓库的可见性。

指定作业名称

对于小组作业,GitHub 课堂 使用仓库前缀和团队名称对仓库命名。 默认情况下,仓库前缀是作业标题。 例如,如果将作业命名为 "assignment-1",而团队在 GitHub 上的名称是 "student-team",则团队成员的作业仓库的名称将是 assignment-1-student-team

Type a title for the assignment. Optionally, click to edit the prefix.

Assignment title and prefix

分配作业的截止时间

Optionally, you can assign a deadline to the assignment. Under "Deadline (optional)", click in the text field, then use the date picker to assign a deadline.

Date picker for assignment deadline

选择作业类型

在“Individual or group assignment(个人或小组作业)”下,选择下拉菜单,然后单击 Group assignment(小组作业)。 创建作业后不可更改作业类型。 如果要创建个人作业,请参阅“创建个人作业”。

确定作业的团队

如果已为教室创建了小组作业,可以对新作业重复使用一组团队。 要使用学生为作业创建的团队创建一个新组,请输入组的名称。 (可选)键入团队成员和团队总数的最大数量。

提示

  • 我们建议在组的名称中包含有关该组团队的详细信息。 例如,如果要对某个作业使用团队组,请以作业命名该组。 如果要在整个学期或课程中重复使用该组,请以学期或课程命名该组。

  • 如果想将学生分配到特定团队,请为学生指定团队的名称并提供成员列表。

用于参与小组作业的团队的参数

选择作业仓库的可见性

The repositories for an assignment can be public or private. If you use private repositories, only the student or team can see the feedback you provide.

You can also decide whether to grant students admin permissions to the repository for an assignment. Grant admin permissions if the student should be able to perform administrative tasks for the assignment repository. For more information, see "About repository visibility" and "Repository permission levels for an organization."

Under "Repository visibility", select a visibility. Optionally, select Grant students admin access to their repository.

Visibility options for assignment repositories

When you're done, click Continue to configure starter code and a development environment for the assignment.

'Continue' button

添加起始代码并配置开发环境

Optionally, decide whether to provide empty repositories or starter code, and preconfigure a development environment for your students.

选择模板仓库

默认情况下,新作业将为学生创建的每个团队创建一个空仓库。 You can optionally choose a template repository as starter code for the assignment. The template repository must belong to your organization or be a public repository on GitHub. 有关模板仓库的更多信息,请参阅“创建模板仓库”。

Under "Add a template repository to give students starter code", select the Select a repository drop-down, then type a search query. In the list of results, click the template repository you'd like to use for starter code.

Using the 'Select a repository' drop-down menu to find a template repository to use as starter code for an assignment

选择在线集成开发环境 (IDE)

You can optionally configure an assignment to use an online integrated development environment (IDE). Online IDEs allow your students to write code, run programs, and collaborate in a browser, without installing Git and a full development toolchain on the student's computer. If you choose an online IDE for an assignment, students can still check out and run code locally on a computer with the necessary software. 更多信息请参阅“集成 GitHub 课堂 与 IDE”。

To choose an online IDE for the assignment, select the Select an online IDE drop-down menu, then click the IDE you'd like your students to use.

Using the 'Select an online IDE' drop-down menu to click an online IDE for the assignment

When you're done, click Continue to configure automatic grading and feedback for the project.

'Continue' button

提供反馈

(可选)您可以自动对作业进行分级,并创建一个空间,用于与团队讨论每个提交。

自动测试作业

You can use autograding to automatically check a student's work for an assignment on GitHub 课堂. You configure tests for an assignment, and the tests run immediately every time a student pushes to an assignment repository on GitHub. The student can view the test results, make changes, and push to see new results. For more information, see "Use autograding."

Under "Add autograding tests", select the Add test drop-down menu, then click the grading method you want to use. For more information, see "Grading methods."

Using the 'Add test' drop-down menu to click a grading method

Define the parameters of your test case, like the name, commands, inputs, outputs, timeout, and points. When you're done, click Save test case.

'Save test case' button for an autograding test

You can add more tests with the Add test drop-down menu, and you can edit or delete existing tests with or .

Pencil and trash icons to edit or delete an autograding test

防止对重要文件的更改

You can prevent students from changing files that contain tests for autograding, or other important files in the assignment repository.

Under "Protected file paths", type relative paths within the repository to protect.

Text field for typing protected file paths

为反馈创建拉取请求

You can automatically create a pull request where you can provide feedback and answer a student's questions about an assignment. For more information about the review of changes in a pull request, see "Reviewing changes in pull requests."

To create pull requests for the discussion of feedback, select Enable feedback pull requests.

Checkbox for 'Enable feedback pull requests'

To create the assignment, click Create assignment.

'Create assignment' button

邀请学生参加作业

By default, GitHub 课堂 enables an invitation URL for each assignment you create. Students can accept and submit the assignment while the invitation URL is enabled. You can share the URL with your students on your LMS, course homepage, or wherever you post assignments. Students can also navigate to the assignment on GitHub 课堂 if the student has already accepted an assignment for the classroom.

Warning: Be careful where you share invitation URLs. Anyone with an invitation URL for an assignment can accept the invitation and associate a user account on GitHub with an identifier in your roster.

您可以在作业的 Teams(团队)选项卡中查看正在处理或已提交作业的团队。 To prevent acceptance or submission of an assignment by students, deselect Enable assignment invitation URL. To edit the assignment, click Edit assignment.

组分配

后续步骤

  • 在创建作业和学生组成团队后,团队成员可以使用 Git 和 GitHub 的功能开始处理作业。 学生可以克隆仓库、推送提交、管理分支、创建和审查拉取请求、解决合并冲突以及讨论议题的更改。 您和团队都可以审查仓库的提交历史记录。 更多信息请参阅“GitHub 使用入门”、“创建、克隆和存档仓库”、“使用 Git”和“协作处理议题和拉取请求”,以及 GitHub Learning Lab 中的管理合并冲突课程。

  • 当团队完成作业时,您可以查看仓库中的文件,或者查看仓库的历史和可视化内容,以更好地了解团队如何协作。 更多信息请参阅“使用图表可视化仓库”。

  • 您可以通过在拉取请求中评论个别提交或行来提供作业反馈。 更多信息请参阅“评论拉取请求”和“从代码打开议题”。 有关创建已保存回复以对常见错误提供反馈的信息,请参阅“关于已保存回复”。

延伸阅读

此文档对您有帮助吗?

Privacy policy

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或, 了解如何参与。