original_string: public static function get_grades_table($courseid, $userid = 0, $groupid = 0) {
          global $CFG, $USER;
  
          list($params, $course, $context, $user, $groupid) = self::check_report_access($courseid, $userid, $groupid);
          $userid   = $params['userid'];
  
          // We pass userid because it can be still 0.
          list($tables, $warnings) = self::get_report_data($course, $context, $user, $userid, $groupid);
  
          $result = array();
          $result['tables'] = $tables;
          $result['warnings'] = $warnings;
          return $result;
      }
code: public static function get_grades_table($courseid, $userid = 0, $groupid = 0) {
          global $CFG, $USER;
  
          list($params, $course, $context, $user, $groupid) = self::check_report_access($courseid, $userid, $groupid);
          $userid   = $params['userid'];
  
          // We pass userid because it can be still 0.
          list($tables, $warnings) = self::get_report_data($course, $context, $user, $userid, $groupid);
  
          $result = array();
          $result['tables'] = $tables;
          $result['warnings'] = $warnings;
          return $result;
      }
code_tokens: public static function get_grades_table ( $ courseid , $ userid = 0 , $ groupid = 0 ) { global $ CFG , $ USER ; list ( $ params , $ course , $ context , $ user , $ groupid ) = self :: check_report_access ( $ courseid , $ userid , $ groupid ) ; $ userid = $ params [ 'userid' ] ; // We pass userid because it can be still 0. list ( $ tables , $ warnings ) = self :: get_report_data ( $ course , $ context , $ user , $ userid , $ groupid ) ; $ result = array ( ) ; $ result [ 'tables' ] = $ tables ; $ result [ 'warnings' ] = $ warnings ; return $ result ; }
docstring: Returns a list of grades tables for users in a course.
  
  @param int $courseid Course Id
  @param int $userid   Only this user (optional)
  @param int $groupid  Get users from this group only
  
  @return array the grades tables
  @since Moodle 2.9
docstring_tokens: Returns a list of grades tables for users in a course .