protected function canAdministerCourse(GcrMdlCourse $course)
 {
     global $CFG;
     $current_user = $CFG->current_app->getCurrentUser();
     return $course->isTeacher($current_user) || $current_user->getRoleManager()->hasPrivilege('GCUser') || $current_user->getRoleManager()->hasPrivilege('EschoolAdmin') && $course->getInstitution()->getShortName() == $CFG->current_app->getShortName();
 }