original_string: protected function get_role_risks_info() {
          global $OUTPUT;
  
          if (empty($this->roleid)) {
              return '';
          }
  
          $risks = array();
          $allrisks = get_all_risks();
          foreach ($this->capabilities as $capability) {
              $perm = $this->permissions[$capability->name];
              if ($perm != CAP_ALLOW) {
                  continue;
              }
              foreach ($allrisks as $type => $risk) {
                  if ($risk & (int)$capability->riskbitmask) {
                      $risks[$type] = $risk;
                  }
              }
          }
  
          $risksurl = new moodle_url(get_docs_url(s(get_string('risks', 'core_role'))));
          foreach ($risks as $type => $risk) {
              $pixicon = new pix_icon('/i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
              $risks[$type] = $OUTPUT->action_icon($risksurl, $pixicon, new popup_action('click', $risksurl));
          }
  
          return implode(' ', $risks);
      }
code: protected function get_role_risks_info() {
          global $OUTPUT;
  
          if (empty($this->roleid)) {
              return '';
          }
  
          $risks = array();
          $allrisks = get_all_risks();
          foreach ($this->capabilities as $capability) {
              $perm = $this->permissions[$capability->name];
              if ($perm != CAP_ALLOW) {
                  continue;
              }
              foreach ($allrisks as $type => $risk) {
                  if ($risk & (int)$capability->riskbitmask) {
                      $risks[$type] = $risk;
                  }
              }
          }
  
          $risksurl = new moodle_url(get_docs_url(s(get_string('risks', 'core_role'))));
          foreach ($risks as $type => $risk) {
              $pixicon = new pix_icon('/i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
              $risks[$type] = $OUTPUT->action_icon($risksurl, $pixicon, new popup_action('click', $risksurl));
          }
  
          return implode(' ', $risks);
      }
code_tokens: protected function get_role_risks_info ( ) { global $ OUTPUT ; if ( empty ( $ this -> roleid ) ) { return '' ; } $ risks = array ( ) ; $ allrisks = get_all_risks ( ) ; foreach ( $ this -> capabilities as $ capability ) { $ perm = $ this -> permissions [ $ capability -> name ] ; if ( $ perm != CAP_ALLOW ) { continue ; } foreach ( $ allrisks as $ type => $ risk ) { if ( $ risk & ( int ) $ capability -> riskbitmask ) { $ risks [ $ type ] = $ risk ; } } } $ risksurl = new moodle_url ( get_docs_url ( s ( get_string ( 'risks' , 'core_role' ) ) ) ) ; foreach ( $ risks as $ type => $ risk ) { $ pixicon = new pix_icon ( '/i/' . str_replace ( 'risk' , 'risk_' , $ type ) , get_string ( $ type . 'short' , 'admin' ) ) ; $ risks [ $ type ] = $ OUTPUT -> action_icon ( $ risksurl , $ pixicon , new popup_action ( 'click' , $ risksurl ) ) ; } return implode ( ' ' , $ risks ) ; }
docstring: Returns HTML risk icons.
  
  @return string
docstring_tokens: Returns HTML risk icons .