original_string: public function get_risk_icon($type) {
          global $OUTPUT;
  
          $alt = get_string("{$type}short", "admin");
          $title = get_string($type, "admin");
  
          $text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), $alt, 'moodle', [
                  'title' => $title,
              ]);
          $action = new popup_action('click', $this->risksurl, 'docspopup');
          $riskicon = $OUTPUT->action_link($this->risksurl, $text, $action);
  
          return $riskicon;
      }
code: public function get_risk_icon($type) {
          global $OUTPUT;
  
          $alt = get_string("{$type}short", "admin");
          $title = get_string($type, "admin");
  
          $text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), $alt, 'moodle', [
                  'title' => $title,
              ]);
          $action = new popup_action('click', $this->risksurl, 'docspopup');
          $riskicon = $OUTPUT->action_link($this->risksurl, $text, $action);
  
          return $riskicon;
      }
code_tokens: public function get_risk_icon ( $ type ) { global $ OUTPUT ; $ alt = get_string ( "{$type}short" , "admin" ) ; $ title = get_string ( $ type , "admin" ) ; $ text = $ OUTPUT -> pix_icon ( 'i/' . str_replace ( 'risk' , 'risk_' , $ type ) , $ alt , 'moodle' , [ 'title' => $ title , ] ) ; $ action = new popup_action ( 'click' , $ this -> risksurl , 'docspopup' ) ; $ riskicon = $ OUTPUT -> action_link ( $ this -> risksurl , $ text , $ action ) ; return $ riskicon ; }
docstring: Print a risk icon, as a link to the Risks page on Moodle Docs.
  
  @param string $type the type of risk, will be one of the keys from the
  get_all_risks array. Must start with 'risk'.
docstring_tokens: Print a risk icon as a link to the Risks page on Moodle Docs .