Skip to main content

Supply course materials

In many online teaching scenarios, teachers use a variety of interactive courseware to deliver an informative learning experience. Flexible Classroom enables teachers to display such courseware during classes. The supported formats are PPT, PPTX, DOC, DOCX, PDF, MP3, MP4, PNG, JPG, and GIF.

Courseware in flexible classrooms can be divided into two categories:

  • Public resources: Uploaded and maintained by educational agencies; teachers cannot edit the courseware.
  • Personal resources: Uploaded and maintained by teachers on the client end.

To display courseware on the whiteboard in flexible classrooms, you must convert the courseware to a format supported by the Agora Interactive Whiteboard service. For security reasons, Flexible Classroom does not store your courseware; all courseware must be stored either in a third-party cloud storage account that you provide or on your own server.

Upload courseware before a class

If you want to upload the courseware to third-party cloud storage or to your own server before a class and then display the courseware in Flexible Classroom, perform the following steps:

  1. In Agora Console, enable and configure the Whiteboard feature to store the courseware used in Flexible Classroom.

  2. In Agora Console, enable the file-conversion feature of the Whiteboard service, and add a storage configuration for storing the converted courseware. For details, see How to enable the file-conversion feature.

  3. On your app server, call this RESTful API to start a file-conversion task. The Agora Interactive Whiteboard service uploads the converted files to the third-party cloud storage that you have configured in Agora Console.

  4. On your app server, poll this RESTful API to query the progress of a file-conversion task. Pay special attention to the convertedFileList parameter in the response. This parameter contains an array of converted files. Each convertedFileList object contains the following parameters:

    • width: Number. Indicates the width of the image in pixels.
    • height: Number. Indicates the height of the image in pixels.
    • conversionFileUrl: String. Indicates the URL of the generated image.
    • preview: String. Indicates the address of the preview. This field is returned only when preview is set as true and type is set as dynamic in the request body when starting file conversion.
  5. When you call launch on your client, pass in the list of converted files by setting the courseWareList parameter. Then students can see the courseware in the classroom.


    _36
    courseWareList:
    _36
    [
    _36
    {
    _36
    resourceName: xxxxxxx,
    _36
    resourceUuid: xxxxxxxxx,
    _36
    ext: 'pptx',
    _36
    url: 'https://xxxxxxxxxxxxxx',
    _36
    size: 0,
    _36
    updateTime: xxxxxxxx
    _36
    taskUuid: 'xxxxxxxxx',
    _36
    conversion: {
    _36
    type: 'dynamic',
    _36
    preview: true,
    _36
    scale: 2,
    _36
    outputFormat: 'png',
    _36
    },
    _36
    taskProgress: {
    _36
    totalPageSize: 3,
    _36
    convertedPageSize: 3,
    _36
    convertedPercentage: 100,
    _36
    convertedFileList: [
    _36
    {
    _36
    name: '1',
    _36
    ppt: {
    _36
    src: 'pptx://convertcdn.netless.link/dynamicConvert/3bxxxxxxx/1.slide',
    _36
    width: 1280,
    _36
    height: 720,
    _36
    preview:'dddddddddddddddurl'
    _36
    },
    _36
    },
    _36
    ...
    _36
    ] as any,
    _36
    currentStep: '',
    _36
    },
    _36
    },
    _36
    ],

Upload courseware during a class

To upload courseware during a class, perform the following steps:

  1. Log in to Flexible Classroom, and enter the desired classroom.

  2. Click Cloud Drive in the tool bar, and then click Upload as shown in the following screenshot:

    You can delete your personal resources by selecting the option icon and clicking Delete, as shown in the following screenshot:

Cloud storage configuration

To ensure that Flexible Classroom can access your cloud storage, configure your cloud storage account as follows:

  • Alibaba Cloud OSS account

    • Ensure that read and write permissions are set to public read.

    • Cross domain rule configuration

      • Configure Source and Allow Headers according to your actual situation.
      • Exposure Headers must be filled in according to the figure below:

  • AWS S3 accounts

    • Bucket policy


      _13
      {
      _13
      "Version": "2012-10-17",
      _13
      "Id": "Policy1622700880591",
      _13
      "Statement": [
      _13
      {
      _13
      "Sid": "Stmt1622700872941",
      _13
      "Effect": "Allow",
      _13
      "Principal": "*",
      _13
      "Action": "s3:GetObject",
      _13
      "Resource": "arn:aws-cn:s3:::agora-adc-artifacts/*"
      _13
      }
      _13
      ]
      _13
      }

    • Cross-origin resource sharing


      _15
      [
      _15
      {
      _15
      "AllowedHeaders": [
      _15
      "*"
      _15
      ],
      _15
      "AllowedMethods": [
      _15
      "PUT",
      _15
      "GET"
      _15
      ],
      _15
      "AllowedOrigins": [
      _15
      "*"
      _15
      ],
      _15
      "ExposeHeaders": []
      _15
      }
      _15
      ]