今回はすべてのコースではなく「指定した1つのコース情報を取得する方法」について、考えてみます。
Google Apps Scriptに以下のスクリプトをコピー&ペーストしてください。
- function getCourse() {
- const courseId = '312347346819'; //コースのIDを入力
- const course = Classroom.Courses.get(courseId);
- console.log(course);
- }
courseIdは、冒頭「すべてのClassroomからクラスコードを一括でスプレッドシートに自動出力する方法」を参考にしながら、オブジェクトのプロパティは「id」を指定してみてください。
実行ログの結果として、以下が表示されます。
これで、指定した1つのコース情報を出力することできました。
How can I export an one of course information?
After obtaining the course ID of Classroom, try running the script described above.
However, keep in mind about the courseId is differenet from classcode(enrollmentCode).