original_string: public function get_last_section_number() {
          $course = $this->get_course();
          if (isset($course->numsections)) {
              return $course->numsections;
          }
          $modinfo = get_fast_modinfo($course);
          $sections = $modinfo->get_section_info_all();
          return (int)max(array_keys($sections));
      }
code: public function get_last_section_number() {
          $course = $this->get_course();
          if (isset($course->numsections)) {
              return $course->numsections;
          }
          $modinfo = get_fast_modinfo($course);
          $sections = $modinfo->get_section_info_all();
          return (int)max(array_keys($sections));
      }
code_tokens: public function get_last_section_number ( ) { $ course = $ this -> get_course ( ) ; if ( isset ( $ course -> numsections ) ) { return $ course -> numsections ; } $ modinfo = get_fast_modinfo ( $ course ) ; $ sections = $ modinfo -> get_section_info_all ( ) ; return ( int ) max ( array_keys ( $ sections ) ) ; }
docstring: Method used in the rendered and during backup instead of legacy 'numsections'
  
  Default renderer will treat sections with sectionnumber greater that the value returned by this
  method as "orphaned" and not display them on the course page unless in editing mode.
  Backup will store this value as 'numsections'.
  
  This method ensures that 3rd party course format plugins that still use 'numsections' continue to
  work but at the same time we no longer expect formats to have 'numsections' property.
  
  @return int
docstring_tokens: Method used in the rendered and during backup instead of legacy numsections