original_string: public static function convert_for_section_cache($section) {
          global $CFG;
  
          // Course id stored in course table
          unset($section->course);
          // Section number stored in array key
          unset($section->section);
          // Sequence stored implicity in modinfo $sections array
          unset($section->sequence);
  
          // Remove default data
          foreach (self::$sectioncachedefaults as $field => $value) {
              // Exact compare as strings to avoid problems if some strings are set
              // to "0" etc.
              if (isset($section->{$field}) && $section->{$field} === $value) {
                  unset($section->{$field});
              }
          }
      }
code: public static function convert_for_section_cache($section) {
          global $CFG;
  
          // Course id stored in course table
          unset($section->course);
          // Section number stored in array key
          unset($section->section);
          // Sequence stored implicity in modinfo $sections array
          unset($section->sequence);
  
          // Remove default data
          foreach (self::$sectioncachedefaults as $field => $value) {
              // Exact compare as strings to avoid problems if some strings are set
              // to "0" etc.
              if (isset($section->{$field}) && $section->{$field} === $value) {
                  unset($section->{$field});
              }
          }
      }
code_tokens: public static function convert_for_section_cache ( $ section ) { global $ CFG ; // Course id stored in course table unset ( $ section -> course ) ; // Section number stored in array key unset ( $ section -> section ) ; // Sequence stored implicity in modinfo $sections array unset ( $ section -> sequence ) ; // Remove default data foreach ( self :: $ sectioncachedefaults as $ field => $ value ) { // Exact compare as strings to avoid problems if some strings are set // to "0" etc. if ( isset ( $ section -> { $ field } ) && $ section -> { $ field } === $ value ) { unset ( $ section -> { $ field } ) ; } } }
docstring: Prepares section data for inclusion in sectioncache cache, removing items
  that are set to defaults, and adding availability data if required.
  
  Called by build_section_cache in course_modinfo only; do not use otherwise.
  @param object $section Raw section data object
docstring_tokens: Prepares section data for inclusion in sectioncache cache removing items that are set to defaults and adding availability data if required .