original_string: function update_content($recordid, $value, $name=''){
          global $DB;
  
          $content = new stdClass();
          $content->fieldid = $this->field->id;
          $content->recordid = $recordid;
          $content->content = clean_param($value, PARAM_NOTAGS);
  
          if ($oldcontent = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))) {
              $content->id = $oldcontent->id;
              return $DB->update_record('data_content', $content);
          } else {
              return $DB->insert_record('data_content', $content);
          }
      }
code: function update_content($recordid, $value, $name=''){
          global $DB;
  
          $content = new stdClass();
          $content->fieldid = $this->field->id;
          $content->recordid = $recordid;
          $content->content = clean_param($value, PARAM_NOTAGS);
  
          if ($oldcontent = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))) {
              $content->id = $oldcontent->id;
              return $DB->update_record('data_content', $content);
          } else {
              return $DB->insert_record('data_content', $content);
          }
      }
code_tokens: function update_content ( $ recordid , $ value , $ name = '' ) { global $ DB ; $ content = new stdClass ( ) ; $ content -> fieldid = $ this -> field -> id ; $ content -> recordid = $ recordid ; $ content -> content = clean_param ( $ value , PARAM_NOTAGS ) ; if ( $ oldcontent = $ DB -> get_record ( 'data_content' , array ( 'fieldid' => $ this -> field -> id , 'recordid' => $ recordid ) ) ) { $ content -> id = $ oldcontent -> id ; return $ DB -> update_record ( 'data_content' , $ content ) ; } else { return $ DB -> insert_record ( 'data_content' , $ content ) ; } }
docstring: Update the content of one data field in the data_content table
  @global object
  @param int $recordid
  @param mixed $value
  @param string $name
  @return bool
docstring_tokens: Update the content of one data field in the data_content table