original_string: public static function update_framework($record) {
          static::require_enabled();
          $framework = new competency_framework($record->id);
  
          // Check the permissions before update.
          require_capability('moodle/competency:competencymanage', $framework->get_context());
  
          // Account for different formats of taxonomies.
          $framework->from_record($record);
          if (isset($record->taxonomies)) {
              $framework->set('taxonomies', $record->taxonomies);
          }
  
          // Trigger a competency framework updated event.
          \core\event\competency_framework_updated::create_from_framework($framework)->trigger();
  
          return $framework->update();
      }
code: public static function update_framework($record) {
          static::require_enabled();
          $framework = new competency_framework($record->id);
  
          // Check the permissions before update.
          require_capability('moodle/competency:competencymanage', $framework->get_context());
  
          // Account for different formats of taxonomies.
          $framework->from_record($record);
          if (isset($record->taxonomies)) {
              $framework->set('taxonomies', $record->taxonomies);
          }
  
          // Trigger a competency framework updated event.
          \core\event\competency_framework_updated::create_from_framework($framework)->trigger();
  
          return $framework->update();
      }
code_tokens: public static function update_framework ( $ record ) { static :: require_enabled ( ) ; $ framework = new competency_framework ( $ record -> id ) ; // Check the permissions before update. require_capability ( 'moodle/competency:competencymanage' , $ framework -> get_context ( ) ) ; // Account for different formats of taxonomies. $ framework -> from_record ( $ record ) ; if ( isset ( $ record -> taxonomies ) ) { $ framework -> set ( 'taxonomies' , $ record -> taxonomies ) ; } // Trigger a competency framework updated event. \ core \ event \ competency_framework_updated :: create_from_framework ( $ framework ) -> trigger ( ) ; return $ framework -> update ( ) ; }
docstring: Update the details for a competency framework.
  
  Requires moodle/competency:competencymanage capability at the system context.
  
  @param stdClass $record The new details for the framework. Note - must contain an id that points to the framework to update.
  @return boolean
docstring_tokens: Update the details for a competency framework .