有没有办法在Google教室API中安排作业

时间:2017-03-25 19:45:28

标签: api google-classroom

有没有办法可以使用课堂API安排作业?

2 个答案:

答案 0 :(得分:1)

截至目前,您无法设置何时应通过API发布作业的计划。关于app-api-issues问题47305262存在一些未解决的问题。您可以为该问题加注星标,并在发生任何更改时立即通知您。一个解决方法可能是将状态属性设置为DRAFT,直到需要将状态更改为PUBLISHED。

POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWork

{
  "courseId": string,
  "id": string,
  "title": string,
  "description": string,
  "materials": [
    {
      object(Material)
    }
  ],
  "state": enum(CourseWorkState),
  "alternateLink": string,
  "creationTime": string,
  "updateTime": string,
  "dueDate": {
    object(Date)
  },
  "dueTime": {
    object(TimeOfDay)
  },
  "maxPoints": number,
  "workType": enum(CourseWorkType),
  "associatedWithDeveloper": boolean,
  "submissionModificationMode": enum(SubmissionModificationMode),

  // Union field details can be only one of the following:
  "assignment": {
    object(Assignment)
  },
  "multipleChoiceQuestion": {
    object(MultipleChoiceQuestion)
  },
  // End of list of possible types for union field details.
}
Fields 

答案 1 :(得分:0)

自2017年6月21日起更新,API已更新,允许使用CourseWork的scheduledTime字段设置预定时间(https://developers.google.com/classroom/reference/rest/v1/courses.courseWork)。

issue现已标记为已修复。