original_string: function display_edit_field() {
          global $CFG, $DB, $OUTPUT;
  
          if (empty($this->field)) {   // No field has been defined yet, try and make one
              $this->define_default_field();
          }
          echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
  
          echo '<form id="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
          echo '<input type="hidden" name="d" value="'.$this->data->id.'" />'."\n";
          if (empty($this->field->id)) {
              echo '<input type="hidden" name="mode" value="add" />'."\n";
              $savebutton = get_string('add');
          } else {
              echo '<input type="hidden" name="fid" value="'.$this->field->id.'" />'."\n";
              echo '<input type="hidden" name="mode" value="update" />'."\n";
              $savebutton = get_string('savechanges');
          }
          echo '<input type="hidden" name="type" value="'.$this->type.'" />'."\n";
          echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />'."\n";
  
          echo $OUTPUT->heading($this->name(), 3);
  
          require_once($CFG->dirroot.'/mod/data/field/'.$this->type.'/mod.html');
  
          echo '<div class="mdl-align">';
          echo '<input type="submit" class="btn btn-primary" value="'.$savebutton.'" />'."\n";
          echo '<input type="submit" class="btn btn-secondary" name="cancel" value="'.get_string('cancel').'" />'."\n";
          echo '</div>';
  
          echo '</form>';
  
          echo $OUTPUT->box_end();
      }
code: function display_edit_field() {
          global $CFG, $DB, $OUTPUT;
  
          if (empty($this->field)) {   // No field has been defined yet, try and make one
              $this->define_default_field();
          }
          echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
  
          echo '<form id="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
          echo '<input type="hidden" name="d" value="'.$this->data->id.'" />'."\n";
          if (empty($this->field->id)) {
              echo '<input type="hidden" name="mode" value="add" />'."\n";
              $savebutton = get_string('add');
          } else {
              echo '<input type="hidden" name="fid" value="'.$this->field->id.'" />'."\n";
              echo '<input type="hidden" name="mode" value="update" />'."\n";
              $savebutton = get_string('savechanges');
          }
          echo '<input type="hidden" name="type" value="'.$this->type.'" />'."\n";
          echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />'."\n";
  
          echo $OUTPUT->heading($this->name(), 3);
  
          require_once($CFG->dirroot.'/mod/data/field/'.$this->type.'/mod.html');
  
          echo '<div class="mdl-align">';
          echo '<input type="submit" class="btn btn-primary" value="'.$savebutton.'" />'."\n";
          echo '<input type="submit" class="btn btn-secondary" name="cancel" value="'.get_string('cancel').'" />'."\n";
          echo '</div>';
  
          echo '</form>';
  
          echo $OUTPUT->box_end();
      }
code_tokens: function display_edit_field ( ) { global $ CFG , $ DB , $ OUTPUT ; if ( empty ( $ this -> field ) ) { // No field has been defined yet, try and make one $ this -> define_default_field ( ) ; } echo $ OUTPUT -> box_start ( 'generalbox boxaligncenter boxwidthwide' ) ; echo '<form id="editfield" action="' . $ CFG -> wwwroot . '/mod/data/field.php" method="post">' . "\n" ; echo '<input type="hidden" name="d" value="' . $ this -> data -> id . '" />' . "\n" ; if ( empty ( $ this -> field -> id ) ) { echo '<input type="hidden" name="mode" value="add" />' . "\n" ; $ savebutton = get_string ( 'add' ) ; } else { echo '<input type="hidden" name="fid" value="' . $ this -> field -> id . '" />' . "\n" ; echo '<input type="hidden" name="mode" value="update" />' . "\n" ; $ savebutton = get_string ( 'savechanges' ) ; } echo '<input type="hidden" name="type" value="' . $ this -> type . '" />' . "\n" ; echo '<input name="sesskey" value="' . sesskey ( ) . '" type="hidden" />' . "\n" ; echo $ OUTPUT -> heading ( $ this -> name ( ) , 3 ) ; require_once ( $ CFG -> dirroot . '/mod/data/field/' . $ this -> type . '/mod.html' ) ; echo '<div class="mdl-align">' ; echo '<input type="submit" class="btn btn-primary" value="' . $ savebutton . '" />' . "\n" ; echo '<input type="submit" class="btn btn-secondary" name="cancel" value="' . get_string ( 'cancel' ) . '" />' . "\n" ; echo '</div>' ; echo '</form>' ; echo $ OUTPUT -> box_end ( ) ; }
docstring: Print the relevant form element to define the attributes for this field
  viewable by teachers only.
  
  @global object
  @global object
  @return void Output is echo'd
docstring_tokens: Print the relevant form element to define the attributes for this field viewable by teachers only .