original_string: public static function update_cron() {
          global $DB;
  
          if (!$registration = self::get_registration()) {
              mtrace(get_string('registrationwarning', 'admin'));
              return;
          }
  
          if (self::get_new_registration_fields()) {
              mtrace(get_string('pleaserefreshregistrationnewdata', 'admin'));
              return;
          }
  
          $siteinfo = self::get_site_info();
          api::update_registration($siteinfo);
          $DB->update_record('registration_hubs', ['id' => $registration->id, 'timemodified' => time()]);
          mtrace(get_string('siteregistrationupdated', 'hub'));
          self::$registration = null;
      }
code: public static function update_cron() {
          global $DB;
  
          if (!$registration = self::get_registration()) {
              mtrace(get_string('registrationwarning', 'admin'));
              return;
          }
  
          if (self::get_new_registration_fields()) {
              mtrace(get_string('pleaserefreshregistrationnewdata', 'admin'));
              return;
          }
  
          $siteinfo = self::get_site_info();
          api::update_registration($siteinfo);
          $DB->update_record('registration_hubs', ['id' => $registration->id, 'timemodified' => time()]);
          mtrace(get_string('siteregistrationupdated', 'hub'));
          self::$registration = null;
      }
code_tokens: public static function update_cron ( ) { global $ DB ; if ( ! $ registration = self :: get_registration ( ) ) { mtrace ( get_string ( 'registrationwarning' , 'admin' ) ) ; return ; } if ( self :: get_new_registration_fields ( ) ) { mtrace ( get_string ( 'pleaserefreshregistrationnewdata' , 'admin' ) ) ; return ; } $ siteinfo = self :: get_site_info ( ) ; api :: update_registration ( $ siteinfo ) ; $ DB -> update_record ( 'registration_hubs' , [ 'id' => $ registration -> id , 'timemodified' => time ( ) ] ) ; mtrace ( get_string ( 'siteregistrationupdated' , 'hub' ) ) ; self :: $ registration = null ; }
docstring: Updates site registration via cron
  
  @throws moodle_exception
docstring_tokens: Updates site registration via cron