تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن للمطوّرين استخدام Google Classroom API للتفاعل مع الواجبات الدراسية في Google Classroom. ويُشار إلى التطبيق الذي يستخدم واجهة برمجة التطبيقات بهذه الطريقة باسم CourseWork عملية دمج.
يُستخدَم مسار الدمج هذا عادةً لإنشاء المهام الدراسية ووضع الدرجات عليها باستخدام روابط تؤدي إلى مراجع خارج Classroom. ويتيح هذا الخيار للمطوّرين الوصول إلى ميزات إدارة الدورات الدراسية بشكل أكبر مقارنةً
بأزرار المشاركة في Classroom.
آلية العمل
الميزة الأساسية لعملية الدمج CourseWork هي إنشاء وإدارة الواجبات والإشعارات ومواد الدورات التدريبية باستخدام Classroom API.
أحد الأمثلة على تجربة المستخدم الشائعة التي يتيحها CourseWork التكامل هو
السماح للمعلّمين باكتشاف المحتوى وتعيينه وتقييمه من داخل موقعك الإلكتروني
أو تطبيقك:
يسجّل مستخدم من فئة المعلّمين الدخول إلى موقعك الإلكتروني.
يعثر المعلّم على محتوى يريد مشاركته مع صفه أو ينشئه. ينقر المعلّم على زر في موقعك الإلكتروني لإرسال هذا المحتوى إلى Google Classroom.
يرسل تطبيقك طلبًا إلى courses.courseWork.create. يتضمّن الطلب الكائن CourseWork في نصّه، ويحتوي هذا الكائن على ما يلي:
تمثّل هذه السمة معرّف الدورة التدريبية الوجهة.
تمثّل هذه السمة عنوان المهمة.
تمثّل هذه السمة الوصف النصي للمهمة.
linkMaterial يتضمّن عنوان URL للمحتوى الذي اختاره المعلّم.
يمكنك أيضًا تحديد الحد الأقصى للنتيجة التي يمكن تحقيقها للمحتوى المحدّد.
يظهر واجب جديد في Classroom مع مرفق رابط.
يشير الرابط إلى عنوان URL المحدّد في طلب create. راجِع الشكل 1
للاطّلاع على مثال.
يظهر أيضًا عمود جديد للواجب في دفتر التقديرات في Classroom، بما في ذلك الحد الأقصى للدرجة إذا تم توفيره.
يتلقّى الطلاب الواجب الدراسي وينقرون على link Material لفتح عنوان URL المقدَّم في علامة تبويب جديدة وعرض المحتوى أو إكماله على موقعك الإلكتروني.
يمكنك اختياريًا توفير عناصر تحكّم للطالب لتسليم الواجب.
يُرجى مراعاة ما يلي قبل اتّخاذ قرار بشأن ما إذا كان دمج CourseWork هو الخيار المناسب لاحتياجات منتجك.
يجب منح المستخدم الإذن وطلب موافقته. أنت بصدد تقديم طلبات إلى واجهة برمجة التطبيقات نيابةً عن المستخدم. يعني هذا، على سبيل المثال، أنّه لا يمكنك إنشاء مهام دراسية في أي دورة تدريبية في Google Classroom، بل يمكنك إنشاء مهام دراسية في الدورات التدريبية التي يدرّسها المستخدم المفوّض فقط.
يجب أن توفّر للمستخدم طريقة لاختيار دورة تدريبية لتلقّي المحتوى.
ننصحك باستخدام courses.list للحصول على قائمة بالدورات التدريبية التي يدرّسها المستخدم، ثم السماح للمستخدم باختيار دورة تدريبية واحدة أو أكثر من القائمة.
عندما ينقر مستخدم على link Material في Classroom، يتم فتح الرابط في علامة تبويب جديدة. لن يتلقّى الخادم أي معلومات من Classroom عند فتح عنوان URL.
يمكن للمعلّم تعديل أو حذف الواجبات الدراسية بشكل مستقل عن المطوّر. وهذا يعني أنّ معرفة المطوّر بالمواد الدراسية قد تصبح قديمة. إذا كنت بحاجة إلى معرفة التغييرات في الواجبات الدراسية، ننصحك بإعداد إشعارات فورية بشأن التغييرات في الواجبات الدراسية.
يمكن للمعلّم إنشاء واجبات دراسية في واجهة مستخدم Classroom باستخدام روابط تم لصقها إلى عناوين URL على موقعك الإلكتروني. إنّ الأعمال الصفية التي يتم إنشاؤها بهذه الطريقة هي ملك للمعلم فقط، لذا لن تتمكّن من عرضها أو تعديلها أو ضبط درجات التسليم باستخدام Classroom API.
تاريخ التعديل الأخير: 2025-08-01 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-01 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# CourseWork integration\n\nDevelopers can use Google Classroom API to interact with coursework in\nGoogle Classroom. An application that uses the API in this way is referred to\nas a *`CourseWork` integration*.\n| **Key Point:** A `CourseWork` integration allows developers to programmatically access and modify the state of Google Classroom announcements, course materials, assignments, and student submissions. Choose this path if you need a low-cost way to push your content into Classroom.\n\nThis integration path is commonly used to create and grade assignments with\nlinks to resources outside of Classroom. It provides more\ndeveloper access to coursework management as compared to [Classroom Share buttons](/workspace/classroom/guides/sharebutton).\n\nHow it works\n------------\n\nThe core feature of a `CourseWork` integration is the creation and management of\nassignments, announcements, and course materials using Classroom API.\n\nOne example of a common user journey enabled by a `CourseWork` integration is to\nallow teachers to discover, assign, and grade content from within your website\nor application:\n\n1. A teacher user signs in to your website.\n2. The teacher finds or creates content that they want to share with their class. The teacher clicks a button on your website to send this content to Google Classroom.\n3. Your application issues a request to [`courses.courseWork.create`](/workspace/classroom/reference/rest/v1/courses.courseWork/create). The request contains a `CourseWork` object in its body that contains:\n - The destination course ID.\n - The title of the assignment.\n - The text description for the assignment.\n - A `link` [`Material`](/workspace/classroom/reference/rest/v1/Material) with the URL to the content selected by the teacher.\n - Optionally, the maximum score attainable for the selected content.\n4. A new assignment appears in Classroom with a link attachment. The link refers to the URL specified in the `create` request. See Figure 1 for an example.\n5. A new column for the assignment also appears in the Classroom gradebook, including the maximum score if provided.\n6. Students receive the assignment and click the `link Material` to open the provided URL in a new tab and view or complete the content on your website. Optionally, provide controls for the student to [turn in the assignment](/workspace/classroom/guides/manage-coursework#manage_student_response_state).\n7. Optionally, issue a request to [`courses.courseWork.studentSubmissions.modifyAttachments`](/workspace/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/modifyAttachments) to add attachments to a student submission, such as a Google Drive file or `link\n Material` that points to the student's work on your website.\n8. Optionally, issue a request to [`courses.courseWork.studentSubmissions.patch`](/workspace/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/patch) to set the student's grade for the assignment.\n\n**Figure 1.** Teacher view when editing an assignment with `link Material`\ncreated by a `CourseWork` integration.\n\nAlternatively, you could call [`courses.announcements.create`](/workspace/classroom/reference/rest/v1/courses.announcements/create) or\n[`courses.courseWorkMaterials.create`](/workspace/classroom/reference/rest/v1/courses.courseWorkMaterials/create) to create an announcement or course\nmaterial instead of an assignment. See the [Create \\& manage coursework](/workspace/classroom/guides/manage-coursework) and [Set\n\\& update grades](/workspace/classroom/guides/classroom-api/manage-grades) pages for detailed descriptions of the relevant\nClassroom API actions.\n\nConsiderations\n--------------\n\n| **Key Point:** There are some important limitations to a `CourseWork` integration. If these prevent you from realizing your product, consider building a [Google Classroom add-on](/workspace/classroom/add-ons) instead.\n\nKeep the following in mind before deciding if a `CourseWork` integration is the\nright choice for your product needs.\n\n- You need to authorize the user and prompt for their consent. You're making API requests *on the user's behalf* . This means, for example, that you can't create coursework in *any* Google Classroom course; you can only create coursework in courses that the authorized user teaches.\n- You need a way for the user to select a course to receive the content. Consider using [`courses.list`](/workspace/classroom/reference/rest/v1/courses/list) to get a list of the courses taught by the user, then allow the user to select one or more of the courses from the list.\n- When a user clicks a `link Material` in Classroom, the link opens in a new tab. Your server won't receive any information from Classroom when the URL opens.\n- A teacher can modify or delete the coursework independently of the developer. This means that a developer's knowledge of the coursework might become out of date. If you need to be aware of changes in coursework, consider setting up [push notifications](/workspace/classroom/best-practices/push-notifications) for coursework changes.\n- A teacher can create coursework in the Classroom UI with pasted links to URLs on your website. Coursework created in this manner are solely owned by the teacher, so you won't be able to view, modify, or set submission grades using the Classroom API."]]