original_string: public function determine_format() {
          if ($this->grade->grade_item->load_scale()) {
              $scale = $this->grade->grade_item->load_scale();
  
              $options = array(-1 => get_string('nograde'));
  
              foreach ($scale->scale_items as $i => $name) {
                  $options[$i + 1] = $name;
              }
  
              return new dropdown_attribute(
                  $this->get_name(),
                  $options,
                  $this->get_label(),
                  $this->get_value(),
                  $this->is_disabled()
              );
          } else {
              return new text_attribute(
                  $this->get_name(),
                  $this->get_value(),
                  $this->get_label(),
                  $this->is_disabled()
              );
          }
      }
code: public function determine_format() {
          if ($this->grade->grade_item->load_scale()) {
              $scale = $this->grade->grade_item->load_scale();
  
              $options = array(-1 => get_string('nograde'));
  
              foreach ($scale->scale_items as $i => $name) {
                  $options[$i + 1] = $name;
              }
  
              return new dropdown_attribute(
                  $this->get_name(),
                  $options,
                  $this->get_label(),
                  $this->get_value(),
                  $this->is_disabled()
              );
          } else {
              return new text_attribute(
                  $this->get_name(),
                  $this->get_value(),
                  $this->get_label(),
                  $this->is_disabled()
              );
          }
      }
code_tokens: public function determine_format ( ) { if ( $ this -> grade -> grade_item -> load_scale ( ) ) { $ scale = $ this -> grade -> grade_item -> load_scale ( ) ; $ options = array ( - 1 => get_string ( 'nograde' ) ) ; foreach ( $ scale -> scale_items as $ i => $ name ) { $ options [ $ i + 1 ] = $ name ; } return new dropdown_attribute ( $ this -> get_name ( ) , $ options , $ this -> get_label ( ) , $ this -> get_value ( ) , $ this -> is_disabled ( ) ) ; } else { return new text_attribute ( $ this -> get_name ( ) , $ this -> get_value ( ) , $ this -> get_label ( ) , $ this -> is_disabled ( ) ) ; } }
docstring: Create the element for this column.
  
  @return element
docstring_tokens: Create the element for this column .