チュートリング (Tutoring)

The tutoring object provides methods and properties that can be used in tutoring mode.

1. メソッド

⚠️ All tutoring methods can only be used when accessing external content of an account registered through the Elice platform tutoring mode.

getAccountList (アカウントリストの取得)

Use the getAccountList method to retrieve a list of accounts enrolled in a course.

The following parameters are required:

  • offset: The starting position of the account list page.

  • count: The number of account lists to retrieve.

import { eliceContents } from 'src/constants';

const getAccountList = async () => {
    const accountList = await eliceContents.tutoring.getAccountList();
    console.log(accountList); // [{ fullname: 'elice', uid: 123 }, ...]
};

getAccountKvstore (アカウントのKvstoreの取得)

Use the getAccountKvstore method to retrieve the learning history of a specific account enrolled in a course.

The required parameters are as follows:

  • uid: The unique identifier of the account.

  • key: The key of the kvstore.

import { eliceContents } from 'src/constants';

const getAccountKvstore = async () => {
    const kvstore = await eliceContents.tutoring.getAccountKvstore({ uid: 123, key: 'quiz01.answer' });
    console.log(kvstore); // 'Elice'
};

2. プロパティ

isTutoringMode (チュータリングモード)

⚠️ The isTutoringMode property will be deprecated starting from version 1.0.0. Please use eliceContents.tutoring.isEnabled instead.

import { eliceContents } from 'src/constants';

console.log(eliceContents.isTutoringMode);  // false or true

isEnabled (チュータリングの有効化状態)

The isEnabled property is used to check if tutoring mode is enabled. If tutoring mode is enabled, the value is true; otherwise, it is false.

import { eliceContents } from 'src/constants';

eliceContents
  .init()
  .then(() => {
    console.log(eliceContents.tutoring.isEnabled); // false or true
});

⚠️ Tutoring mode is enabled when all of the following conditions are met:

  • The user has accessed external content of an account registered through the Elice platform tutoring mode.

  • The external content SDK is initialized.

Last updated