original_string: public function display($templates) {
          global $OUTPUT;
          if (empty($templates)) {
              echo $OUTPUT->box(get_string('no_templates_available_yet', 'feedback'),
                               'generalbox boxaligncenter');
              return;
          }
  
          $this->setup();
          $strdeletefeedback = get_string('delete_template', 'feedback');
  
          foreach ($templates as $template) {
              $data = array();
              $data[] = format_string($template->name);
              $url = new moodle_url($this->baseurl, array('deletetempl' => $template->id, 'sesskey' => sesskey()));
  
              $deleteaction = new confirm_action(get_string('confirmdeletetemplate', 'feedback'));
              $data[] = $OUTPUT->action_icon($url, new pix_icon('t/delete', $strdeletefeedback), $deleteaction);
              $this->add_data($data);
          }
          $this->finish_output();
      }
code: public function display($templates) {
          global $OUTPUT;
          if (empty($templates)) {
              echo $OUTPUT->box(get_string('no_templates_available_yet', 'feedback'),
                               'generalbox boxaligncenter');
              return;
          }
  
          $this->setup();
          $strdeletefeedback = get_string('delete_template', 'feedback');
  
          foreach ($templates as $template) {
              $data = array();
              $data[] = format_string($template->name);
              $url = new moodle_url($this->baseurl, array('deletetempl' => $template->id, 'sesskey' => sesskey()));
  
              $deleteaction = new confirm_action(get_string('confirmdeletetemplate', 'feedback'));
              $data[] = $OUTPUT->action_icon($url, new pix_icon('t/delete', $strdeletefeedback), $deleteaction);
              $this->add_data($data);
          }
          $this->finish_output();
      }
code_tokens: public function display ( $ templates ) { global $ OUTPUT ; if ( empty ( $ templates ) ) { echo $ OUTPUT -> box ( get_string ( 'no_templates_available_yet' , 'feedback' ) , 'generalbox boxaligncenter' ) ; return ; } $ this -> setup ( ) ; $ strdeletefeedback = get_string ( 'delete_template' , 'feedback' ) ; foreach ( $ templates as $ template ) { $ data = array ( ) ; $ data [ ] = format_string ( $ template -> name ) ; $ url = new moodle_url ( $ this -> baseurl , array ( 'deletetempl' => $ template -> id , 'sesskey' => sesskey ( ) ) ) ; $ deleteaction = new confirm_action ( get_string ( 'confirmdeletetemplate' , 'feedback' ) ) ; $ data [ ] = $ OUTPUT -> action_icon ( $ url , new pix_icon ( 't/delete' , $ strdeletefeedback ) , $ deleteaction ) ; $ this -> add_data ( $ data ) ; } $ this -> finish_output ( ) ; }
docstring: Displays the table with the given set of templates
  @param array $templates
docstring_tokens: Displays the table with the given set of templates