original_string: public static function get_stats_summary($siteinfo) {
          $fieldsneedconfirm = self::get_new_registration_fields();
          $summary = html_writer::tag('p', get_string('sendfollowinginfo_help', 'hub')) .
              html_writer::start_tag('ul');
  
          $mobileservicesenabled = $siteinfo['mobileservicesenabled'] ? get_string('yes') : get_string('no');
          $mobilenotificationsenabled = $siteinfo['mobilenotificationsenabled'] ? get_string('yes') : get_string('no');
          $moodlerelease = $siteinfo['moodlerelease'];
          if (preg_match('/^(\d+\.\d.*?)[\. ]/', $moodlerelease, $matches)) {
              $moodlerelease = $matches[1];
          }
          $senddata = [
              'moodlerelease' => get_string('sitereleasenum', 'hub', $moodlerelease),
              'courses' => get_string('coursesnumber', 'hub', $siteinfo['courses']),
              'users' => get_string('usersnumber', 'hub', $siteinfo['users']),
              'enrolments' => get_string('roleassignmentsnumber', 'hub', $siteinfo['enrolments']),
              'posts' => get_string('postsnumber', 'hub', $siteinfo['posts']),
              'questions' => get_string('questionsnumber', 'hub', $siteinfo['questions']),
              'resources' => get_string('resourcesnumber', 'hub', $siteinfo['resources']),
              'badges' => get_string('badgesnumber', 'hub', $siteinfo['badges']),
              'issuedbadges' => get_string('issuedbadgesnumber', 'hub', $siteinfo['issuedbadges']),
              'participantnumberaverage' => get_string('participantnumberaverage', 'hub',
                  format_float($siteinfo['participantnumberaverage'], 2)),
              'modulenumberaverage' => get_string('modulenumberaverage', 'hub',
                  format_float($siteinfo['modulenumberaverage'], 2)),
              'mobileservicesenabled' => get_string('mobileservicesenabled', 'hub', $mobileservicesenabled),
              'mobilenotificationsenabled' => get_string('mobilenotificationsenabled', 'hub', $mobilenotificationsenabled),
              'registereduserdevices' => get_string('registereduserdevices', 'hub', $siteinfo['registereduserdevices']),
              'registeredactiveuserdevices' => get_string('registeredactiveuserdevices', 'hub', $siteinfo['registeredactiveuserdevices']),
              'analyticsenabledmodels' => get_string('analyticsenabledmodels', 'hub', $siteinfo['analyticsenabledmodels']),
              'analyticspredictions' => get_string('analyticspredictions', 'hub', $siteinfo['analyticspredictions']),
              'analyticsactions' => get_string('analyticsactions', 'hub', $siteinfo['analyticsactions']),
              'analyticsactionsnotuseful' => get_string('analyticsactionsnotuseful', 'hub', $siteinfo['analyticsactionsnotuseful']),
          ];
  
          foreach ($senddata as $key => $str) {
              $class = in_array($key, $fieldsneedconfirm) ? ' needsconfirmation mark' : '';
              $summary .= html_writer::tag('li', $str, ['class' => 'site' . $key . $class]);
          }
          $summary .= html_writer::end_tag('ul');
          return $summary;
      }
code: public static function get_stats_summary($siteinfo) {
          $fieldsneedconfirm = self::get_new_registration_fields();
          $summary = html_writer::tag('p', get_string('sendfollowinginfo_help', 'hub')) .
              html_writer::start_tag('ul');
  
          $mobileservicesenabled = $siteinfo['mobileservicesenabled'] ? get_string('yes') : get_string('no');
          $mobilenotificationsenabled = $siteinfo['mobilenotificationsenabled'] ? get_string('yes') : get_string('no');
          $moodlerelease = $siteinfo['moodlerelease'];
          if (preg_match('/^(\d+\.\d.*?)[\. ]/', $moodlerelease, $matches)) {
              $moodlerelease = $matches[1];
          }
          $senddata = [
              'moodlerelease' => get_string('sitereleasenum', 'hub', $moodlerelease),
              'courses' => get_string('coursesnumber', 'hub', $siteinfo['courses']),
              'users' => get_string('usersnumber', 'hub', $siteinfo['users']),
              'enrolments' => get_string('roleassignmentsnumber', 'hub', $siteinfo['enrolments']),
              'posts' => get_string('postsnumber', 'hub', $siteinfo['posts']),
              'questions' => get_string('questionsnumber', 'hub', $siteinfo['questions']),
              'resources' => get_string('resourcesnumber', 'hub', $siteinfo['resources']),
              'badges' => get_string('badgesnumber', 'hub', $siteinfo['badges']),
              'issuedbadges' => get_string('issuedbadgesnumber', 'hub', $siteinfo['issuedbadges']),
              'participantnumberaverage' => get_string('participantnumberaverage', 'hub',
                  format_float($siteinfo['participantnumberaverage'], 2)),
              'modulenumberaverage' => get_string('modulenumberaverage', 'hub',
                  format_float($siteinfo['modulenumberaverage'], 2)),
              'mobileservicesenabled' => get_string('mobileservicesenabled', 'hub', $mobileservicesenabled),
              'mobilenotificationsenabled' => get_string('mobilenotificationsenabled', 'hub', $mobilenotificationsenabled),
              'registereduserdevices' => get_string('registereduserdevices', 'hub', $siteinfo['registereduserdevices']),
              'registeredactiveuserdevices' => get_string('registeredactiveuserdevices', 'hub', $siteinfo['registeredactiveuserdevices']),
              'analyticsenabledmodels' => get_string('analyticsenabledmodels', 'hub', $siteinfo['analyticsenabledmodels']),
              'analyticspredictions' => get_string('analyticspredictions', 'hub', $siteinfo['analyticspredictions']),
              'analyticsactions' => get_string('analyticsactions', 'hub', $siteinfo['analyticsactions']),
              'analyticsactionsnotuseful' => get_string('analyticsactionsnotuseful', 'hub', $siteinfo['analyticsactionsnotuseful']),
          ];
  
          foreach ($senddata as $key => $str) {
              $class = in_array($key, $fieldsneedconfirm) ? ' needsconfirmation mark' : '';
              $summary .= html_writer::tag('li', $str, ['class' => 'site' . $key . $class]);
          }
          $summary .= html_writer::end_tag('ul');
          return $summary;
      }
code_tokens: public static function get_stats_summary ( $ siteinfo ) { $ fieldsneedconfirm = self :: get_new_registration_fields ( ) ; $ summary = html_writer :: tag ( 'p' , get_string ( 'sendfollowinginfo_help' , 'hub' ) ) . html_writer :: start_tag ( 'ul' ) ; $ mobileservicesenabled = $ siteinfo [ 'mobileservicesenabled' ] ? get_string ( 'yes' ) : get_string ( 'no' ) ; $ mobilenotificationsenabled = $ siteinfo [ 'mobilenotificationsenabled' ] ? get_string ( 'yes' ) : get_string ( 'no' ) ; $ moodlerelease = $ siteinfo [ 'moodlerelease' ] ; if ( preg_match ( '/^(\d+\.\d.*?)[\. ]/' , $ moodlerelease , $ matches ) ) { $ moodlerelease = $ matches [ 1 ] ; } $ senddata = [ 'moodlerelease' => get_string ( 'sitereleasenum' , 'hub' , $ moodlerelease ) , 'courses' => get_string ( 'coursesnumber' , 'hub' , $ siteinfo [ 'courses' ] ) , 'users' => get_string ( 'usersnumber' , 'hub' , $ siteinfo [ 'users' ] ) , 'enrolments' => get_string ( 'roleassignmentsnumber' , 'hub' , $ siteinfo [ 'enrolments' ] ) , 'posts' => get_string ( 'postsnumber' , 'hub' , $ siteinfo [ 'posts' ] ) , 'questions' => get_string ( 'questionsnumber' , 'hub' , $ siteinfo [ 'questions' ] ) , 'resources' => get_string ( 'resourcesnumber' , 'hub' , $ siteinfo [ 'resources' ] ) , 'badges' => get_string ( 'badgesnumber' , 'hub' , $ siteinfo [ 'badges' ] ) , 'issuedbadges' => get_string ( 'issuedbadgesnumber' , 'hub' , $ siteinfo [ 'issuedbadges' ] ) , 'participantnumberaverage' => get_string ( 'participantnumberaverage' , 'hub' , format_float ( $ siteinfo [ 'participantnumberaverage' ] , 2 ) ) , 'modulenumberaverage' => get_string ( 'modulenumberaverage' , 'hub' , format_float ( $ siteinfo [ 'modulenumberaverage' ] , 2 ) ) , 'mobileservicesenabled' => get_string ( 'mobileservicesenabled' , 'hub' , $ mobileservicesenabled ) , 'mobilenotificationsenabled' => get_string ( 'mobilenotificationsenabled' , 'hub' , $ mobilenotificationsenabled ) , 'registereduserdevices' => get_string ( 'registereduserdevices' , 'hub' , $ siteinfo [ 'registereduserdevices' ] ) , 'registeredactiveuserdevices' => get_string ( 'registeredactiveuserdevices' , 'hub' , $ siteinfo [ 'registeredactiveuserdevices' ] ) , 'analyticsenabledmodels' => get_string ( 'analyticsenabledmodels' , 'hub' , $ siteinfo [ 'analyticsenabledmodels' ] ) , 'analyticspredictions' => get_string ( 'analyticspredictions' , 'hub' , $ siteinfo [ 'analyticspredictions' ] ) , 'analyticsactions' => get_string ( 'analyticsactions' , 'hub' , $ siteinfo [ 'analyticsactions' ] ) , 'analyticsactionsnotuseful' => get_string ( 'analyticsactionsnotuseful' , 'hub' , $ siteinfo [ 'analyticsactionsnotuseful' ] ) , ] ; foreach ( $ senddata as $ key => $ str ) { $ class = in_array ( $ key , $ fieldsneedconfirm ) ? ' needsconfirmation mark' : '' ; $ summary .= html_writer :: tag ( 'li' , $ str , [ 'class' => 'site' . $ key . $ class ] ) ; } $ summary .= html_writer :: end_tag ( 'ul' ) ; return $ summary ; }
docstring: Human-readable summary of data that will be sent to moodle.net
  
  @param array $siteinfo result of get_site_info()
  @return string
docstring_tokens: Human - readable summary of data that will be sent to moodle . net