تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
إطار iframe الخاص بميزة "اكتشاف المرفقات" هو طريقة العرض الأولية التي تظهر للمعلّم عند فتح إضافة أثناء إنشاء مهمة في Classroom. المرفق هو المحتوى أو النشاط الذي تريد أن يتفاعل معه الطلاب.
من داخل دورة تدريبية في Classroom، ينشئ المعلّم مشاركة جديدة (على سبيل المثال، مهمة أو إشعار أو سؤال) ويختار إضافة من القائمة المنسدلة الخاصة بالإضافات (الشكل 1).
الشكل 1. عرض لعملية إنشاء مهمة تتضمّن خيارات الإضافات المحتملة التي يمكن للمعلّم إرفاقها
بعد أن يختار المعلّم إضافة، ينشئ Classroom إطار iframe خاصًا بميزة "اكتشاف المرفقات" ويحمّل عنوان URL الخاص بتشغيل الإضافة. يتم تمرير أي مَعلمات طلب بحث iframe ذات صلة إلى عنوان URL الخاص بالإطلاق (الشكل 2).
الشكل 2. مثال على واجهة مستخدم لاكتشاف المرفقات في إطار iframe
يمكنك اعتبار طريقة عرض "اقتراح المرفقات" هي الصفحة المقصودة للمعلّمين في الإضافة. يستخدم المعلّم عادةً تطبيق الويب الخاص بالشريك ضمن إطار iframe لاختيار المحتوى الذي يريد إرفاقه بعنصر البث.
قد يفرض تطبيق الإضافة قيودًا على المحتوى الذي يتم عرضه استنادًا إلى ما إذا كان عنصر ساحة المشاركة إشعارًا أو واجبًا دراسيًا أو مادة دراسية. بعد ذلك، يرسل تطبيق الإضافة طلبات إلى Classroom API لإنشاء المرفق وإرفاقه بالمهمة.
عندما ينتهي المعلّم من اختيار المرفقات وإنشائها، ترسل الإضافة حمولة postMessage تطلب إغلاق إطار iframe. يتم إغلاق إطار iframe، ويظهر للمعلّم المرفقات التي يمكنه معاينتها أو إزالتها من المهمة (الشكل 3). يكمل المعلّم عملية إنشاء المشاركة من خلال تعيينها للطلاب.
الشكل 3. عرض لإنشاء مهمة تتضمّن ثلاثة مرفقات إضافية من نوع النشاط
اعتبارات تجربة المستخدم
عند فتح الإضافة لأول مرة، يجب أن تطلب من المعلّم تسجيل الدخول.
يجب استخدام ميزة "الدخول الموحّد" من Google لجميع طلبات البيانات من Classroom API. إذا كان منتجك يتضمّن نظام تسجيل دخول منفصلاً، عليك ربط الحسابات.
يجب أن يتمكّن المعلّم من معاينة المرفق داخل إطار iframe قبل اتخاذ قراره النهائي.
يجب أن يتمكّن المعلّم من البحث عن المحتوى القابل للإرفاق أو تصفّحه.
قد يوفّر التطبيق الإضافي مجموعة متنوعة من طرق العرض، مثل المحتوى الحديث والمحتوى الخاص بي، بالإضافة إلى إمكانية الفلترة حسب المهارات التعليمية.
يجب أن يوفّر الإضافة إمكانية إنشاء عنصر جديد قابل للإرفاق من داخل إطار iframe.
لمزيد من التفاصيل حول متطلبات تجربة المستخدم، يُرجى الاطّلاع على قائمة التحقّق من متطلبات إضافة Classroom.
حالة الترخيص
إذا كانت الإضافة تتطلّب ترخيصًا لمنتجك، يجب عرض رسالة واضحة تشرح كيف يمكن للمعلّم الذي لا يملك ترخيصًا حلّ المشكلة. ننصحك أيضًا بإخفاء أو إيقاف المحتوى غير المتاح للمعلّم بسبب قيود الترخيص.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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"]],["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Attachment Discovery iframe\n\nThe **Attachment Discovery iframe** is the initial view shown to a teacher when\nopening an add-on during the creation of a\nClassroom task. An\n**attachment** is the content or activity that you intend for students to\ninteract with.\n\nFrom within a Classroom course, a teacher creates a new post (for\nexample, an assignment, announcement, or question) and selects an\nadd-on from the add-on\ndrop-down list (Figure 1).\n\n**Figure 1.** View of an assignment\ncreation including the possible add-on options a\nteacher can attach.\n\nOnce a teacher selects an add-on,\nClassroom creates an Attachment Discovery iframe and loads the\nadd-on's launch URL. Any relevant [iframe query\nparameters](/workspace/classroom/add-ons/developer-guides/iframes) are passed to the launch URL (Figure 2).\n\n**Figure 2.** An example of an **attachment discovery** UI in an iframe.\n\nThink of the Attachment Discovery view as the landing page for teachers in your\nadd-on. Typically, the teacher uses the partner's web\napplication within the iframe to select content to attach to their stream item.\nThe add-on application might restrict which content is\nshown depending on whether the stream item is an announcement, assignment, or\ncourse material. The add-on application then makes\nClassroom API calls to create and attach the attachment to the\nassignment.\n\nWhen the teacher is finished selecting and creating attachments, the\nadd-on sends a `postMessage` payload requesting the\niframe to be closed. The iframe closes and the teacher then sees the\nattachments, which they might then choose to preview or remove from the\nassignment (Figure 3). The teacher completes the creation flow by assigning the\nstream item to their students.\n\n**Figure 3.** View of an assignment creation with three activity-type\nadd-on attachments.\n\nUser experience considerations\n------------------------------\n\n- On initial opening, the add-on must prompt the teacher to sign in.\n- Google single sign-on is required for all Classroom API calls. If your product has a separate login system, you must link accounts.\n- A teacher must be able to preview an attachment within the iframe before making their final selection.\n- A teacher should be able to search for, or browse through, attachable content.\n- The add-on may provide a variety of views such as recent content, my content, and filter by learning skills.\n- The add-on must provide an ability to create a new attachable item from within the iframe.\n\nSee the Classroom add-on [requirements checklist](/workspace/classroom/add-ons/requirements) for more details\non user experience requirements.\n\nLicensing status\n----------------\n\nIf your add-on requires a license to your product, a\nclear message should be shown to explain how a teacher without a license can\nremedy the situation. Consider also hiding or disabling content that's not\navailable to a teacher due to licensing restrictions."]]