An individual assignment is coursework for each student who participates in a course on GitHub 课堂. The student is intended to complete an individual assignment without help from other students.
When a student accepts an assignment, GitHub 课堂 automatically creates a new repository for the student. The repositories can be empty, or you can create the repositories from a template repository with starter code, documentation, tests, and other resources. Each assignment repository belongs to your organization account on GitHub.
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 课堂 的基本知识”。
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.
对于个人作业，GitHub 课堂 使用仓库前缀和学生的 GitHub 用户名对仓库命名。 默认情况下，仓库前缀是作业标题。 例如，如果您对作业 "assignment-1" 命名，学生在 GitHub 上的用户名是 @octocat，则 @octocat 的作业仓库的名称将是
Type a title for the assignment. Optionally, click to edit the 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.
在“Individual or group assignment（个人或小组作业）”下，选择下拉菜单，然后单击 Individual 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.
When you're done, click Continue to configure starter code and a development environment for the assignment.
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.
When you're done, click Continue to configure automatic grading and feedback for the project.
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.
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."
Define the parameters of your test case, like the name, commands, inputs, outputs, timeout, and points. When you're done, click Save test case.
You can add more tests with the Add test drop-down menu, and you can edit or delete existing tests with or .
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.
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.
To create the assignment, click Create assignment.
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.
您可以在作业的 All students（所有学生）选项卡中查看学生是否已进入教室或提交作业。 To prevent acceptance or submission of an assignment by students, deselect Enable assignment invitation URL. To edit the assignment, click Edit assignment.