original_string: public function config_form_criteria($data) {
          global $OUTPUT;
          $agg = $data->get_aggregation_methods();
  
          $editurl = new moodle_url('/badges/criteria_settings.php',
                  array('badgeid' => $this->badgeid, 'edit' => true, 'type' => $this->criteriatype, 'crit' => $this->id));
          $deleteurl = new moodle_url('/badges/criteria_action.php',
                  array('badgeid' => $this->badgeid, 'delete' => true, 'type' => $this->criteriatype));
          $editaction = $OUTPUT->action_icon($editurl, new pix_icon('t/edit', get_string('edit')), null, array('class' => 'criteria-action'));
          $deleteaction = $OUTPUT->action_icon($deleteurl, new pix_icon('t/delete', get_string('delete')), null, array('class' => 'criteria-action'));
  
          echo $OUTPUT->box_start();
          if (!$data->is_locked() && !$data->is_active()) {
              echo $OUTPUT->box($deleteaction . $editaction, array('criteria-header'));
          }
          echo $OUTPUT->heading($this->get_title() . $OUTPUT->help_icon('criteria_' . $this->criteriatype, 'badges'), 3, 'main help');
  
          if (!empty($this->description)) {
              $badge = new badge($this->badgeid);
              echo $OUTPUT->box(
                  format_text($this->description, $this->descriptionformat, array('context' => $badge->get_context())),
                  'criteria-description'
                  );
          }
  
          if (!empty($this->params)) {
              if (count($this->params) > 1) {
                  echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges',
                          core_text::strtoupper($agg[$data->get_aggregation_method($this->criteriatype)])), array('clearfix'));
              } else {
                  echo $OUTPUT->box(get_string('criteria_descr_single_' . $this->criteriatype , 'badges'), array('clearfix'));
              }
              echo $OUTPUT->box($this->get_details(), array('clearfix'));
          }
          echo $OUTPUT->box_end();
      }
code: public function config_form_criteria($data) {
          global $OUTPUT;
          $agg = $data->get_aggregation_methods();
  
          $editurl = new moodle_url('/badges/criteria_settings.php',
                  array('badgeid' => $this->badgeid, 'edit' => true, 'type' => $this->criteriatype, 'crit' => $this->id));
          $deleteurl = new moodle_url('/badges/criteria_action.php',
                  array('badgeid' => $this->badgeid, 'delete' => true, 'type' => $this->criteriatype));
          $editaction = $OUTPUT->action_icon($editurl, new pix_icon('t/edit', get_string('edit')), null, array('class' => 'criteria-action'));
          $deleteaction = $OUTPUT->action_icon($deleteurl, new pix_icon('t/delete', get_string('delete')), null, array('class' => 'criteria-action'));
  
          echo $OUTPUT->box_start();
          if (!$data->is_locked() && !$data->is_active()) {
              echo $OUTPUT->box($deleteaction . $editaction, array('criteria-header'));
          }
          echo $OUTPUT->heading($this->get_title() . $OUTPUT->help_icon('criteria_' . $this->criteriatype, 'badges'), 3, 'main help');
  
          if (!empty($this->description)) {
              $badge = new badge($this->badgeid);
              echo $OUTPUT->box(
                  format_text($this->description, $this->descriptionformat, array('context' => $badge->get_context())),
                  'criteria-description'
                  );
          }
  
          if (!empty($this->params)) {
              if (count($this->params) > 1) {
                  echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges',
                          core_text::strtoupper($agg[$data->get_aggregation_method($this->criteriatype)])), array('clearfix'));
              } else {
                  echo $OUTPUT->box(get_string('criteria_descr_single_' . $this->criteriatype , 'badges'), array('clearfix'));
              }
              echo $OUTPUT->box($this->get_details(), array('clearfix'));
          }
          echo $OUTPUT->box_end();
      }
code_tokens: public function config_form_criteria ( $ data ) { global $ OUTPUT ; $ agg = $ data -> get_aggregation_methods ( ) ; $ editurl = new moodle_url ( '/badges/criteria_settings.php' , array ( 'badgeid' => $ this -> badgeid , 'edit' => true , 'type' => $ this -> criteriatype , 'crit' => $ this -> id ) ) ; $ deleteurl = new moodle_url ( '/badges/criteria_action.php' , array ( 'badgeid' => $ this -> badgeid , 'delete' => true , 'type' => $ this -> criteriatype ) ) ; $ editaction = $ OUTPUT -> action_icon ( $ editurl , new pix_icon ( 't/edit' , get_string ( 'edit' ) ) , null , array ( 'class' => 'criteria-action' ) ) ; $ deleteaction = $ OUTPUT -> action_icon ( $ deleteurl , new pix_icon ( 't/delete' , get_string ( 'delete' ) ) , null , array ( 'class' => 'criteria-action' ) ) ; echo $ OUTPUT -> box_start ( ) ; if ( ! $ data -> is_locked ( ) && ! $ data -> is_active ( ) ) { echo $ OUTPUT -> box ( $ deleteaction . $ editaction , array ( 'criteria-header' ) ) ; } echo $ OUTPUT -> heading ( $ this -> get_title ( ) . $ OUTPUT -> help_icon ( 'criteria_' . $ this -> criteriatype , 'badges' ) , 3 , 'main help' ) ; if ( ! empty ( $ this -> description ) ) { $ badge = new badge ( $ this -> badgeid ) ; echo $ OUTPUT -> box ( format_text ( $ this -> description , $ this -> descriptionformat , array ( 'context' => $ badge -> get_context ( ) ) ) , 'criteria-description' ) ; } if ( ! empty ( $ this -> params ) ) { if ( count ( $ this -> params ) > 1 ) { echo $ OUTPUT -> box ( get_string ( 'criteria_descr_' . $ this -> criteriatype , 'badges' , core_text :: strtoupper ( $ agg [ $ data -> get_aggregation_method ( $ this -> criteriatype ) ] ) ) , array ( 'clearfix' ) ) ; } else { echo $ OUTPUT -> box ( get_string ( 'criteria_descr_single_' . $ this -> criteriatype , 'badges' ) , array ( 'clearfix' ) ) ; } echo $ OUTPUT -> box ( $ this -> get_details ( ) , array ( 'clearfix' ) ) ; } echo $ OUTPUT -> box_end ( ) ; }
docstring: Add appropriate criteria elements
  
  @param stdClass $data details of various criteria
docstring_tokens: Add appropriate criteria elements