[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-04。"],[],[],null,["Teachers can copy stream items in Classroom. Doing so also copies\nthe add-on attachments that are contained within the stream items. This saves\nteachers a lot of time when creating learning content for multiple sections or\nfor new sections each school year.\n\nWhen teachers copy stream items in Classroom, the copied\nstream item has different `courseId`, `itemId`, and `attachmentId` query\nparameters compared to the original stream item.\n\nHow to copy content\n\nThe following sections describe how teachers can copy stream items in\nClassroom.\n\nCopy a course\n\nWhen copying a course, all of the stream items in the course are copied to the\nnew course as drafts. The teacher may then publish the stream items to students\nenrolled in the new course. A student may be enrolled in the original course\n*and* the copied course. This can happen if a student is held back or retaking a\nclass. \n\n**Figure 1.** Teachers can copy courses by navigating to the vertical dotted\nmenu in [Classroom](//classroom.google.com) and clicking **Copy**. Then,\nthe teacher can specify details about the course in the pop-up and copy it.\n\nPublish a stream item to multiple courses\n\nA teacher can publish a stream item to more than one course through the stream\nitem creation page. it's possible that a student is enrolled in both courses.\n\n**Figure 2.** Teachers can publish a stream item to more than one course by\nclicking the drop-down in the sidebar on the stream item creation page and\nselecting multiple course(s).\n\nReuse a post\n\nA teacher can reuse a post by navigating to the **Classwork tab** and clicking\n**Create** . From the drop-down, they can click **Reuse post** to select a class\nand then select the stream item to reuse.\n\n**Figure 3.** Teachers can begin the flow of reusing a post from the\n**Classwork tab** and click **Reuse post**. \n\n**Figure 4.** After clicking **Reuse post**, teachers can select a class and the\nstream item they want to reuse.\n\nExpected behavior\n\nWhen a course or stream item is copied, the same student may be assigned the\nsame add-on attachment across different courses. Users *must not* see an error\nin the iframe. The *recommended* behavior for add-ons in the copied stream item\nis to:\n\n1. Ensure that teachers can still preview the attachment in the `teacherViewUri`.\n - If the teacher should perform additional configuration for a new course, display a user-friendly message informing the teacher about the appropriate course of action.\n2. Ensure that students see a *new* add-on attachment in the `studentViewUri`.\n - For [content-type attachments](/workspace/classroom/add-ons/get-started/attachments-journey#attachment_types), this means displaying the content for the student to see in the `studentViewUri`.\n - For [activity-type attachments](/workspace/classroom/add-ons/get-started/attachments-journey#attachment_types), this means that the attachment is incomplete and the student shouldn't be able to see any of their responses from another course.\n - If your add-on doesn't allow the same student to complete an attachment twice, display a user-friendly message describing the scenario or a path to resolve the issue.\n3. Ensure that teachers see the student submission from the copied stream item in the `studentWorkReviewUri`. The teacher shouldn't be able to see a student's submission for the attachment from another course.\n\nTeacher View iframe\n\nWhen a teacher launches the `teacherViewUri`, the `attachmentId` is sent as a\nquery parameter in addition to `courseId`, `itemId`, `itemType`, and\n`login_hint` (if the user has already authorized your app). The `attachmentId`\ncan be used to display the correct attachment in the iframe.\n\nIf you don't have a record of the query parameters on the `teacherViewUri`, you\ncan use the [`CopyHistory`](/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments#copyhistory) object in the [`AddOnAttachment`](/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments) resource to\nidentify the original stream item. Then, you can display the correct attachment\nin the `teacherViewUri`.\n\nStudent View iframe\n\nWhen a student launches the `studentViewUri`, the `attachmentId` is sent as a\nquery parameter in addition to `courseId`, `itemId`, `itemType`, and\n`login_hint` (if the user has already authorized your app). In order to render\nthe `studentViewUri` when a stream item or course is copied, use two parameters:\n\n- `attachmentId`, which can be retrieved from the request URL.\n- `submissionId`, which can be retrieved by calling the appropriate [`courseWork.getAddOnContext`](/workspace/classroom/reference/rest/v1/courses.courseWork/getAddOnContext), [`courseWorkMaterials.getAddOnContext`](/workspace/classroom/reference/rest/v1/courses.courseWorkMaterials/getAddOnContext) or [`announcements.getAddOnContext`](/workspace/classroom/reference/rest/v1/courses.announcements/getAddOnContext) method based on the `itemType` and reading the [`StudentContext`](/workspace/classroom/reference/rest/v1/AddOnContext#studentcontext) object.\n\nThe `attachmentId` is a unique identifier for the attachment. The\n`submissionId`, however, is not guaranteed to be unique. Therefore, a copied or\nreused stream item has a different `attachmentId`, but the `submissionId` may\nremain the same. When the student launches the `studentViewUri`, you can display\nthe attachment by identifying the student work based on a composite key of the\n`attachmentId` and `submissionId`.\n\nIf the `studentViewUri` is rendered based on the `submissionId` alone, you risk\nshowing the student their submission from another course because the\n`submissionId` is not guaranteed to be unique.\n\nAs mentioned earlier, if you can't identify the `attachmentId`, you can use the\n[`CopyHistory`](/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments#copyhistory) object in the [`AddOnAttachment`](/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments) resource to identify the\noriginal stream item and its query parameters.\n\nStudent Work Review iframe\n\nWhen the teacher launches the `studentWorkReviewUri`, the `attachmentId` and the\n`submissionId` are sent as query parameters in addition to the `courseId` and\n`itemId` and `itemType`. You can use these query parameters to retrieve the\n[`AddOnAttachment`](/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments) resource or [`CopyHistory`](/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments#copyhistory) resource if you can't identify\nthe `attachmentId` provided. This lets you to search for the student work using\na composite key of the `attachmentId` and `submissionId`."]]