我正在尝试使用Classroom API从Google Classroom获取Classwork信息。但是,它仅提取文档详细信息。但是材料细节没有显示。
我正在使用PHP代码获取详细信息
$assignmentResults = $service->courses_courseWork->listCoursesCourseWork($courseId);
//print_r($assignmentResults); exit;
if(count($assignmentResults->getCourseWork())>0):
foreach ($assignmentResults->getCourseWork() as $assignment) {
//print("<pre>".print_r($assignment,true)."</pre>");exit;
$arrAssignment[$i]['id'] = $assignment->id;
$arrAssignment[$i]['title'] = $assignment->title;
$arrAssignment[$i]['description'] = $assignment->description;
$arrAssignment[$i]['materials'] = $this->getMaterials($assignment->materials);
$arrAssignment[$i]['assignment'] = $this->assignment($assignment->assignment);
$i++;
}
endif;
查看随附的图像。预期结果在图像上突出显示。