diff --git a/lib.php b/lib.php index 6a0f8e0c..d72ce32e 100755 --- a/lib.php +++ b/lib.php @@ -1523,7 +1523,7 @@ function turnitintooltwo_init_browser_assignment_table($tiicourseid) { ); if (!empty($turnitincourse)) { - $course = current($turnitincourse); + $course = current((array)$turnitincourse); $coursedetails = turnitintooltwo_assignment::get_course_data($course->courseid, $course->course_type); $courseid = $course->courseid; $coursetitle = $coursedetails->fullname;