original_string: protected function validate_competencyframeworkid($value) {
  
          // During update.
          if ($this->get('id')) {
  
              // Ensure that we are not trying to move the competency across frameworks.
              if ($this->beforeupdate->get('competencyframeworkid') != $value) {
                  return new lang_string('invaliddata', 'error');
              }
  
          } else {
              // During create.
  
              // Check that the framework exists.
              if (!competency_framework::record_exists($value)) {
                  return new lang_string('invaliddata', 'error');
              }
          }
  
          return true;
      }
code: protected function validate_competencyframeworkid($value) {
  
          // During update.
          if ($this->get('id')) {
  
              // Ensure that we are not trying to move the competency across frameworks.
              if ($this->beforeupdate->get('competencyframeworkid') != $value) {
                  return new lang_string('invaliddata', 'error');
              }
  
          } else {
              // During create.
  
              // Check that the framework exists.
              if (!competency_framework::record_exists($value)) {
                  return new lang_string('invaliddata', 'error');
              }
          }
  
          return true;
      }
code_tokens: protected function validate_competencyframeworkid ( $ value ) { // During update. if ( $ this -> get ( 'id' ) ) { // Ensure that we are not trying to move the competency across frameworks. if ( $ this -> beforeupdate -> get ( 'competencyframeworkid' ) != $ value ) { return new lang_string ( 'invaliddata' , 'error' ) ; } } else { // During create. // Check that the framework exists. if ( ! competency_framework :: record_exists ( $ value ) ) { return new lang_string ( 'invaliddata' , 'error' ) ; } } return true ; }
docstring: Validate the competency framework ID.
  
  @param int $value The framework ID.
  @return true|lang_string
docstring_tokens: Validate the competency framework ID .